@@ -28,35 +28,6 @@ concurrency:
28
28
cancel-in-progress : false
29
29
30
30
jobs :
31
- # We are using these runners because they are the same as the one for `publish-command.yml`
32
- # One problem we had using `ubuntu-latest` for example is that the user is not root and some commands would fail in
33
- # `manage.sh` (specifically `apt-get`)
34
- start-publish-docker-image-runner-0 :
35
- name : Start Build EC2 Runner 0
36
- runs-on : ubuntu-latest
37
- outputs :
38
- label : ${{ steps.start-ec2-runner.outputs.label }}
39
- ec2-instance-id : ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
40
- steps :
41
- - name : Checkout Airbyte
42
- uses : actions/checkout@v3
43
- with :
44
- repository : airbytehq/airbyte
45
- ref : master
46
- - name : Check PAT rate limits
47
- run : |
48
- ./tools/bin/find_non_rate_limited_PAT \
49
- ${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
50
- ${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
51
- - name : Start AWS Runner
52
- id : start-ec2-runner
53
- uses : ./.github/actions/start-aws-runner
54
- with :
55
- aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
56
- aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
57
- github-token : ${{ env.PAT }}
58
- label : ${{ github.run_id }}-publisher
59
-
60
31
build-cdk :
61
32
runs-on : ubuntu-latest
62
33
steps :
@@ -127,14 +98,10 @@ jobs:
127
98
repository : ${{ github.event.inputs.repo }}
128
99
ref : ${{ github.event.inputs.gitref }}
129
100
token : ${{ secrets.GH_PAT_MAINTENANCE_OSS }}
130
- - name : " Publish Python CDK: bump version"
101
+ - name : " Publish Python CDK: bump Poetry package version"
131
102
id : bumpversion
132
103
run : |
133
104
cd airbyte-cdk/python
134
- # Bump docker image version
135
- # TODO: this should not be necessary, as it's the source-declarative-manifest one which should be published separately
136
- pip install bumpversion
137
- bumpversion ${{ github.event.inputs.release-type }}
138
105
# Bump package version
139
106
poetry version ${{ github.event.inputs.release-type }}
140
107
new_version="$(poetry version -s)"
@@ -143,8 +110,8 @@ jobs:
143
110
- name : Commit and Push Changes
144
111
uses : stefanzweifel/git-auto-commit-action@v4
145
112
with :
146
- file_pattern : airbyte-cdk/python/pyproject.toml airbyte-cdk/python/.bumpversion.cfg airbyte-cdk/python/ CHANGELOG.md airbyte-cdk/python/Dockerfile
147
- commit_message : 🤖 Bump ${{ github.event.inputs.release-type }} version of Python CDK
113
+ file_pattern : airbyte-cdk/python/pyproject.toml airbyte-cdk/python/CHANGELOG.md
114
+ commit_message : 🤖 ${{ github.event.inputs.release-type }} bump Python CDK to version $NEW_VERSION
148
115
commit_user_name : Octavia Squidington III
149
116
commit_user_email :
[email protected]
150
117
- name : Post failure to Slack channel dev-connectors-extensibility
@@ -221,34 +188,54 @@ jobs:
221
188
env :
222
189
SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
223
190
224
- publish-docker-image :
225
- timeout-minutes : 240
191
+ bump-manifest-source :
192
+ name : Bump CDK dependency of source-declarative-manifest
226
193
needs :
227
- - start-publish-docker-image-runner-0
194
+ - bump-version
228
195
- publish-cdk
229
- runs-on : runner-pool-${{ github.run_id }}
196
+ runs-on : ubuntu-latest
230
197
steps :
198
+ - uses : actions/setup-python@v4
199
+ with :
200
+ python-version : " 3.10"
201
+ - name : Install Poetry
202
+ id : install_poetry
203
+ uses : snok/install-poetry@v1
231
204
- name : Checkout Airbyte
232
205
uses : actions/checkout@v3
233
206
with :
234
- repository : airbytehq/airbyte
207
+ repository : ${{ github.event.inputs.repo }}
235
208
ref : ${{ github.event.inputs.gitref }}
236
- - name : Install Python
237
- uses : actions/setup-python@v4
209
+ - name : Bump CDK dependency of source-declarative-manifest
210
+ run : |
211
+ cd airbyte-integrations/connectors/source-declarative-manifest
212
+ poetry add airbyte-cdk==${{needs.bump-version.outputs.new_cdk_version}}
213
+ - name : Bump version of source-declarative-manifest
214
+ uses : ./.github/actions/run-airbyte-ci
238
215
with :
239
- python-version : " 3.10"
240
- - name : Publish source-declarative-manifest
241
- id : publish
242
- env :
243
- DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
244
- DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
245
- # Oracle expects this variable to be set. Although usually present, this is not set by default on Github virtual runners.
246
- TZ : UTC
247
-
216
+ context : " master" # TODO: figure out why changing this yells with `The ci_gcs_credentials was not set on this PipelineContext.`
217
+ dagger_cloud_token : ${{ secrets.DAGGER_CLOUD_TOKEN_2 }}
218
+ docker_hub_password : ${{ secrets.DOCKER_HUB_PASSWORD }}
219
+ docker_hub_username : ${{ secrets.DOCKER_HUB_USERNAME }}
220
+ gcp_gsm_credentials : ${{ secrets.GCP_GSM_CREDENTIALS }}
221
+ gcs_credentials : ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
222
+ github_token : ${{ secrets.GITHUB_TOKEN }}
223
+ metadata_service_gcs_credentials : ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
224
+ sentry_dsn : ${{ secrets.SENTRY_AIRBYTE_CI_DSN }}
225
+ slack_webhook_url : ${{ secrets.PUBLISH_ON_MERGE_SLACK_WEBHOOK }}
226
+ spec_cache_gcs_credentials : ${{ secrets.SPEC_CACHE_SERVICE_ACCOUNT_KEY_PUBLISH }}
227
+ s3_build_cache_access_key_id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
228
+ s3_build_cache_secret_key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
229
+ # There is no pull request number as we do this manually, so will just reference when we started doing it manually for now
230
+ subcommand : " connectors --concurrency=1 --execute-timeout=3600 --name=source-declarative-manifest bump_version ${{ github.event.inputs.release-type }} '36501' 'Bump CDK version to ${{ steps.bumpversion.outputs.NEW_VERSION }}'"
231
+ python_registry_token : ${{ secrets.PYPI_TOKEN }}
232
+ - name : Commit and Push Changes
233
+ uses : stefanzweifel/git-auto-commit-action@v4
248
234
with :
249
- command : |
250
- docker login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD}
251
- ./tools/integrations/manage.sh publish airbyte-cdk/python false
235
+ file_pattern : docs/integrations/sources/low-code.md airbyte-integrations/connectors/source-declarative-manifest/*
236
+ commit_message : 🤖 Cut version ${{needs.bump-version.outputs.new_cdk_version}} of source-declarative-manifest
237
+ commit_user_name : Octavia Squidington III
238
+ commit_user_email :
[email protected]
252
239
- name : Post failure to Slack channel dev-connectors-extensibility
253
240
if : ${{ failure() }}
254
241
@@ -257,13 +244,20 @@ jobs:
257
244
channel-id : C04J1M66D8B
258
245
payload : |
259
246
{
260
- "text": "Error during `publish-docker-image` while publishing Python CDK! ",
247
+ "text": ":warning: A new version of Python CDK has been released but Connector Builder hasn't been automatically updated ",
261
248
"blocks": [
262
249
{
263
250
"type": "section",
264
251
"text": {
265
252
"type": "mrkdwn",
266
- "text": "Error while publishing Docker image following Python CDK release!"
253
+ "text": "A new version of Python CDK has been released with <https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/CHANGELOG.md|changelog>: ${{ github.event.inputs.changelog-message }}\n\n"
254
+ }
255
+ },
256
+ {
257
+ "type": "section",
258
+ "text": {
259
+ "type": "mrkdwn",
260
+ "text": ":warning: Could not automatically create a PR for Connector Builder>\n"
267
261
}
268
262
},
269
263
{
@@ -382,33 +376,3 @@ jobs:
382
376
}
383
377
env :
384
378
SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
385
-
386
- # In case of self-hosted EC2 errors, remove this block.
387
- stop-publish-docker-image-runner-0 :
388
- if : ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
389
- name : Stop Build EC2 Runner
390
- needs :
391
- - start-publish-docker-image-runner-0 # required to get output from the start-runner job
392
- - publish-docker-image # required to wait when the main job is done
393
- runs-on : ubuntu-latest
394
- steps :
395
- - name : Configure AWS credentials
396
- uses : aws-actions/configure-aws-credentials@v1
397
- with :
398
- aws-access-key-id : ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
399
- aws-secret-access-key : ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
400
- aws-region : us-east-2
401
- - name : Checkout Airbyte
402
- uses : actions/checkout@v3
403
- - name : Check PAT rate limits
404
- run : |
405
- ./tools/bin/find_non_rate_limited_PAT \
406
- ${{ secrets.GH_PAT_BUILD_RUNNER_OSS }} \
407
- ${{ secrets.GH_PAT_BUILD_RUNNER_BACKUP }}
408
- - name : Stop EC2 runner
409
-
410
- with :
411
- mode : stop
412
- github-token : ${{ env.PAT }}
413
- label : ${{ needs.start-publish-docker-image-runner-0.outputs.label }}
414
- ec2-instance-id : ${{ needs.start-publish-docker-image-runner-0.outputs.ec2-instance-id }}
0 commit comments