Skip to content

Make publish command work with private repos by adding JWT into curl headers #13141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 24, 2022

Conversation

noahkawasaki-airbyte
Copy link
Contributor

@noahkawasaki-airbyte noahkawasaki-airbyte commented May 24, 2022

What

Make private docker images work in the publish command by getting a docker token back and adding it into the curl command. The docker login command that runs in the GHA beforehand doesnt seem to provide the auth needed.

Here's logs showing this worked on an image I created manually to test this out

+ image_name=airbyte/private-repo-test
+ image_version=0.1.0
+ TAG_URL=https://hub.docker.com/v2/repositories/airbyte/private-repo-test/tags/0.1.0
++ curl --silent --output /dev/null --write-out '%***http_code***' -H 'Authorization: JWT *****' https://hub.docker.com/v2/repositories/airbyte/private-repo-test/tags/0.1.0
+ DOCKERHUB_RESPONSE_CODE=200
+ [[ 200 == \4\0\4 ]]

Ran here: https://github.com/airbytehq/airbyte/actions/runs/2379418746

Closes #12584

How

Describe the solution

@noahkawasaki-airbyte
Copy link
Contributor Author

noahkawasaki-airbyte commented May 24, 2022

/publish connector=connectors/destination-snowflake

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/2379332021
🚀 Successfully published connectors/destination-snowflake
🚀 Auto-bumped version for connectors/destination-snowflake
✅ connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/2379332021

@noahkawasaki-airbyte
Copy link
Contributor Author

noahkawasaki-airbyte commented May 24, 2022

/publish connector=connectors/destination-snowflake run-tests=false

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/2379361435
❌ Failed to publish connectors/destination-snowflake
❌ Couldn't auto-bump version for connectors/destination-snowflake

@octavia-squidington-iii octavia-squidington-iii temporarily deployed to more-secrets May 24, 2022 17:00 Inactive
@noahkawasaki-airbyte
Copy link
Contributor Author

noahkawasaki-airbyte commented May 24, 2022

/publish connector=connectors/destination-snowflake run-tests=false

🕑 connectors/destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/2379418746
🚀 Successfully published connectors/destination-snowflake
❌ Couldn't auto-bump version for connectors/destination-snowflake

@noahkawasaki-airbyte noahkawasaki-airbyte temporarily deployed to more-secrets May 24, 2022 17:09 Inactive
@noahkawasaki-airbyte noahkawasaki-airbyte temporarily deployed to more-secrets May 24, 2022 17:19 Inactive
@noahkawasaki-airbyte noahkawasaki-airbyte changed the title Make publish command work with private repos Make publish command work with private repos by adding JWT into curl headers May 24, 2022
Copy link
Contributor

@tuliren tuliren left a comment

Choose a reason for hiding this comment

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

Nice!

What private connector images do we have? I thought we don't have one anymore after Databricks has been made public.

@noahkawasaki-airbyte
Copy link
Contributor Author

I just manually made one called private-repo-test for the sake of testing. Not sure how many connectors are private, just saw the ticket and it looked like a quick thing so I took it lol

@noahkawasaki-airbyte noahkawasaki-airbyte merged commit 7a79216 into master May 24, 2022
@noahkawasaki-airbyte noahkawasaki-airbyte deleted the noah/publish-docker-repo branch May 24, 2022 17:55
jscottpolevault pushed a commit to jscottpolevault/airbyte that referenced this pull request Jun 1, 2022
…headers (airbytehq#13141)

* Make publish command work with private repos by adding in JWT token to headers for curl

Co-authored-by: Octavia Squidington III <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The publish command no longer works for private docker repository
3 participants