Skip to content

Commit

Permalink
airbyte-ci: only set docker hub secrets on dagger client if they exist (
Browse files Browse the repository at this point in the history
  • Loading branch information
erohmensing committed Oct 23, 2023
1 parent 15c3c41 commit 6ff299e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ This command runs the Python tests for a airbyte-ci poetry package.
## Changelog
| Version | PR | Description |
| ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| 2.2.6 | [#31752](https://github.com/airbytehq/airbyte/pull/31752) | Only authenticate when secrets are available.
| 2.2.5 | [#31718](https://github.com/airbytehq/airbyte/pull/31718) | Authenticate the sidecar docker daemon to DockerHub. |
| 2.2.4 | [#31535](https://github.com/airbytehq/airbyte/pull/31535) | Improve gradle caching when building java connectors. |
| 2.2.3 | [#31688](https://github.com/airbytehq/airbyte/pull/31688) | Fix failing `CheckBaseImageUse` step when not running on PR. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,17 @@ async def run_connectors_pipelines(
# HACK: This is to get a long running dockerd service to be shared across all the connectors pipelines
# Using the "normal" service binding leads to restart of dockerd during pipeline run that can cause corrupted docker state
# See https://github.com/airbytehq/airbyte/issues/27233
docker_hub_username_secret = dagger_client.set_secret("DOCKER_HUB_USERNAME", contexts[0].docker_hub_username)
docker_hub_password_secret = dagger_client.set_secret("DOCKER_HUB_PASSWORD", contexts[0].docker_hub_password)

dockerd_service = docker.with_global_dockerd_service(dagger_client, docker_hub_username_secret, docker_hub_password_secret)
docker_hub_username = contexts[0].docker_hub_username
docker_hub_password = contexts[0].docker_hub_password

if docker_hub_username and docker_hub_password:
docker_hub_username_secret = dagger_client.set_secret("DOCKER_HUB_USERNAME", docker_hub_username)
docker_hub_password_secret = dagger_client.set_secret("DOCKER_HUB_PASSWORD", docker_hub_password)
dockerd_service = docker.with_global_dockerd_service(dagger_client, docker_hub_username_secret, docker_hub_password_secret)
else:
dockerd_service = docker.with_global_dockerd_service(dagger_client)

async with anyio.create_task_group() as tg_main:
tg_main.start_soon(dockerd_service.sync)
await ( # Wait for the docker service to be ready
Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "2.2.5"
version = "2.2.6"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down

0 comments on commit 6ff299e

Please sign in to comment.