Skip to content

Commit

Permalink
Merge branch 'george/auto-bumper' into george/auto-bumperrr
Browse files Browse the repository at this point in the history
  • Loading branch information
Phlair committed Apr 4, 2022
2 parents e3523e0 + 7c30b1a commit 3d3ccec
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 7 deletions.
64 changes: 59 additions & 5 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,20 @@ jobs:
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: '17'
java-version: "17"
- name: Install Pyenv and Tox
# Beside PyEnv, this does not set any runtimes up because it uses an AMI image that has everything pre-installed. See https://github.com/airbytehq/airbyte/issues/4559/
run: |
python3 -m pip install --quiet virtualenv==16.7.9 --user
python3 -m virtualenv venv
source venv/bin/activate
pip install --quiet tox==3.24.4
- name: Install yq
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
- name: Test and install CI scripts
# all CI python packages have the prefix "ci_"
run: |
Expand Down Expand Up @@ -153,20 +159,20 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_CONNECTOR_RELEASE_AUTH_TOKEN }}
SENTRY_ORG: airbyte-5j
SENTRY_PROJECT: airbyte-connectors
- name: Add Success Comment
- name: Add Published Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
- name: Add Failure Comment
> :rocket: Successfully published ${{github.event.inputs.connector}}
- name: Add Published Failure Comment
if: github.event.inputs.comment-id && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
> :x: Failed to publish ${{github.event.inputs.connector}}
- name: Slack Notification - Failure
if: failure()
uses: rtCamp/action-slack-notify@master
Expand All @@ -177,6 +183,54 @@ jobs:
SLACK_COLOR: DC143C
SLACK_TITLE: "Failed to publish connector ${{ github.event.inputs.connector }} from branch ${{ github.ref }}"
SLACK_FOOTER: ""
- name: Check if connector in definitions yaml
run: |
connector="airbyte/${{ env.IMAGE_NAME }}"
definitionpath=./airbyte-config/init/src/main/resources/seed/
sourcecheck=$(yq e ".. | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\")" "$definitionpath"source_definitions.yaml)
destcheck=$(yq e ".. | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\")" "$definitionpath"destination_definitions.yaml)
if [[ (-z "$sourcecheck" && -z "$destcheck") ]]
then exit 1
fi
- name: Bump version in definitions yaml
run: |
connector="airbyte/${{ env.IMAGE_NAME }}"
definitionpath=./airbyte-config/init/src/main/resources/seed/
sourcename=$(yq e ".[] | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\") | .name" "$definitionpath"source_definitions.yaml)
destname=$(yq e ".[] | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\") | .name" "$definitionpath"destination_definitions.yaml)
if [ -z "$sourcename" ]
then yq e "(.[] | select(.name == \"$destname\").dockerImageTag)|=\"${{ env.IMAGE_VERSION }}\"" -i "$definitionpath"destination_definitions.yaml
else yq e "(.[] | select(.name == \"$sourcename\").dockerImageTag)|=\"${{ env.IMAGE_VERSION }}\"" -i "$definitionpath"source_definitions.yaml
fi
- name: Run gradle process changes
run: |
./gradlew :airbyte-config:init:processResources
- name: git commit and push
run: |
git add -u
git commit -m "auto-bump connector version"
git push origin ${{ github.ref }}
- name: Add Version Bump Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :rocket: Auto-bumped version for ${{github.event.inputs.connector}}
- name: Add Version Bump Failure Comment
if: github.event.inputs.comment-id && !success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :x: Couldn't auto-bump version for ${{github.event.inputs.connector}}
- name: Add Final Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.inputs.comment-id }}
body: |
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
# In case of self-hosted EC2 errors, remove this block.
stop-publish-image-runner:
name: Stop Build EC2 Runner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ ENV ENABLE_SENTRY true

COPY --from=build /airbyte /airbyte

LABEL io.airbyte.version=0.2.3
LABEL io.airbyte.version=0.2.6
LABEL io.airbyte.name=airbyte/destination-dev-null
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.3
LABEL io.airbyte.version=0.1.6
LABEL io.airbyte.name=airbyte/source-apify-dataset

2 comments on commit 3d3ccec

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Apify Dataset(#11712)

Measures

Name Value Name Value Name Value
Duplicated Lines (%) 0.0 Lines to Cover 41 Coverage 0.0
Security Rating A Quality Gate Status OK Bugs 0
Vulnerabilities 0 Code Smells 7 Reliability Rating A
Lines of Code 63 Duplicated Blocks 0 Blocker Issues 0
Critical Issues 0 Major Issues 0 Minor Issues 7

Detected Issues

Rule File Description Message
python:mypy_valid_type (MINOR) source_apify_dataset/source.py:46 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: ... def check(self, logger: AirbyteLogger, config: json) -> AirbyteConne...
python:mypy_index (MINOR) source_apify_dataset/source.py:60 Check indexing operations Value of type json? is not indexable . Code line: dataset_id = config["datasetId"]
python:mypy_valid_type (MINOR) source_apify_dataset/source.py:69 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: ...ef discover(self, logger: AirbyteLogger, config: json) -> AirbyteCatal...
python:mypy_valid_type (MINOR) source_apify_dataset/source.py:97 Check that type (annotation) is valid Module "json" is not valid as a type . Code line: self, logger: AirbyteLogger, config: json, catalog: Configured...
python:mypy_valid_type (MINOR) source_apify_dataset/source.py:97 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...config: json, catalog: ConfiguredAirbyteCatalog, state: Dict[str, any]
python:mypy_index (MINOR) source_apify_dataset/source.py:120 Check indexing operations Value of type json? is not indexable . Code line: dataset_id = config["datasetId"]
python:mypy_attr_defined (MINOR) source_apify_dataset/source.py:121 Check that attribute exists json? has no attribute "get" . Code line: clean = config.get("clean", False)

Coverage (0.0%)

File Coverage File Coverage
source_apify_dataset/init.py 0.0 source_apify_dataset/source.py 0.0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Destination Dev Null(#11712)

Measures

Name Value Name Value Name Value
Security Rating A Code Smells 0 Coverage 0.0
Lines of Code 39 Lines to Cover 17 Bugs 0
Duplicated Blocks 0 Quality Gate Status OK Vulnerabilities 0
Duplicated Lines (%) 0.0 Reliability Rating A Blocker Issues 0
Critical Issues 0 Major Issues 0 Minor Issues 0

Coverage (0.0%)

File Coverage File Coverage
src/main/java/io/airbyte/integrations/destination/dev_null/DevNullDestination.java 0.0

Please sign in to comment.