Skip to content

Commit 3d3ccec

Browse files
committed
Merge branch 'george/auto-bumper' into george/auto-bumperrr
2 parents e3523e0 + 7c30b1a commit 3d3ccec

File tree

3 files changed

+61
-7
lines changed

3 files changed

+61
-7
lines changed

.github/workflows/publish-command.yml

+59-5
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,20 @@ jobs:
9898
- name: Install Java
9999
uses: actions/setup-java@v1
100100
with:
101-
java-version: '17'
101+
java-version: "17"
102102
- name: Install Pyenv and Tox
103103
# 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/
104104
run: |
105105
python3 -m pip install --quiet virtualenv==16.7.9 --user
106106
python3 -m virtualenv venv
107107
source venv/bin/activate
108108
pip install --quiet tox==3.24.4
109+
- name: Install yq
110+
run: |
111+
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
112+
sudo add-apt-repository ppa:rmescandon/yq
113+
sudo apt update
114+
sudo apt install yq -y
109115
- name: Test and install CI scripts
110116
# all CI python packages have the prefix "ci_"
111117
run: |
@@ -153,20 +159,20 @@ jobs:
153159
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_CONNECTOR_RELEASE_AUTH_TOKEN }}
154160
SENTRY_ORG: airbyte-5j
155161
SENTRY_PROJECT: airbyte-connectors
156-
- name: Add Success Comment
162+
- name: Add Published Success Comment
157163
if: github.event.inputs.comment-id && success()
158164
uses: peter-evans/create-or-update-comment@v1
159165
with:
160166
comment-id: ${{ github.event.inputs.comment-id }}
161167
body: |
162-
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
163-
- name: Add Failure Comment
168+
> :rocket: Successfully published ${{github.event.inputs.connector}}
169+
- name: Add Published Failure Comment
164170
if: github.event.inputs.comment-id && !success()
165171
uses: peter-evans/create-or-update-comment@v1
166172
with:
167173
comment-id: ${{ github.event.inputs.comment-id }}
168174
body: |
169-
> :x: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
175+
> :x: Failed to publish ${{github.event.inputs.connector}}
170176
- name: Slack Notification - Failure
171177
if: failure()
172178
uses: rtCamp/action-slack-notify@master
@@ -177,6 +183,54 @@ jobs:
177183
SLACK_COLOR: DC143C
178184
SLACK_TITLE: "Failed to publish connector ${{ github.event.inputs.connector }} from branch ${{ github.ref }}"
179185
SLACK_FOOTER: ""
186+
- name: Check if connector in definitions yaml
187+
run: |
188+
connector="airbyte/${{ env.IMAGE_NAME }}"
189+
definitionpath=./airbyte-config/init/src/main/resources/seed/
190+
sourcecheck=$(yq e ".. | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\")" "$definitionpath"source_definitions.yaml)
191+
destcheck=$(yq e ".. | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\")" "$definitionpath"destination_definitions.yaml)
192+
if [[ (-z "$sourcecheck" && -z "$destcheck") ]]
193+
then exit 1
194+
fi
195+
- name: Bump version in definitions yaml
196+
run: |
197+
connector="airbyte/${{ env.IMAGE_NAME }}"
198+
definitionpath=./airbyte-config/init/src/main/resources/seed/
199+
sourcename=$(yq e ".[] | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\") | .name" "$definitionpath"source_definitions.yaml)
200+
destname=$(yq e ".[] | select(has(\"dockerRepository\")) | select(.dockerRepository == \"$connector\") | .name" "$definitionpath"destination_definitions.yaml)
201+
if [ -z "$sourcename" ]
202+
then yq e "(.[] | select(.name == \"$destname\").dockerImageTag)|=\"${{ env.IMAGE_VERSION }}\"" -i "$definitionpath"destination_definitions.yaml
203+
else yq e "(.[] | select(.name == \"$sourcename\").dockerImageTag)|=\"${{ env.IMAGE_VERSION }}\"" -i "$definitionpath"source_definitions.yaml
204+
fi
205+
- name: Run gradle process changes
206+
run: |
207+
./gradlew :airbyte-config:init:processResources
208+
- name: git commit and push
209+
run: |
210+
git add -u
211+
git commit -m "auto-bump connector version"
212+
git push origin ${{ github.ref }}
213+
- name: Add Version Bump Success Comment
214+
if: github.event.inputs.comment-id && success()
215+
uses: peter-evans/create-or-update-comment@v1
216+
with:
217+
comment-id: ${{ github.event.inputs.comment-id }}
218+
body: |
219+
> :rocket: Auto-bumped version for ${{github.event.inputs.connector}}
220+
- name: Add Version Bump Failure Comment
221+
if: github.event.inputs.comment-id && !success()
222+
uses: peter-evans/create-or-update-comment@v1
223+
with:
224+
comment-id: ${{ github.event.inputs.comment-id }}
225+
body: |
226+
> :x: Couldn't auto-bump version for ${{github.event.inputs.connector}}
227+
- name: Add Final Success Comment
228+
if: github.event.inputs.comment-id && success()
229+
uses: peter-evans/create-or-update-comment@v1
230+
with:
231+
comment-id: ${{ github.event.inputs.comment-id }}
232+
body: |
233+
> :white_check_mark: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
180234
# In case of self-hosted EC2 errors, remove this block.
181235
stop-publish-image-runner:
182236
name: Stop Build EC2 Runner

airbyte-integrations/connectors/destination-dev-null/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ ENV ENABLE_SENTRY true
1717

1818
COPY --from=build /airbyte /airbyte
1919

20-
LABEL io.airbyte.version=0.2.3
20+
LABEL io.airbyte.version=0.2.6
2121
LABEL io.airbyte.name=airbyte/destination-dev-null

airbyte-integrations/connectors/source-apify-dataset/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

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

0 commit comments

Comments
 (0)