Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Document GitLab with private container registries #414

Merged
merged 6 commits into from
May 14, 2023
Merged

Conversation

0x2b3bfa0
Copy link
Member

Closes #387, opens #413

@0x2b3bfa0 0x2b3bfa0 added the documentation Markdown files label Dec 6, 2022
@0x2b3bfa0 0x2b3bfa0 requested a review from a team December 6, 2022 15:22
@0x2b3bfa0 0x2b3bfa0 self-assigned this Dec 6, 2022
@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Dec 6, 2022

LGTM but can't confirm the correctness (i.e. approve).

@shcheklein shcheklein temporarily deployed to cml-dev-gitlab-ecr-qft58zmfjzo December 6, 2022 20:33 Inactive
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

4b8a672

Link Check Report

All 9 links passed!

@shcheklein shcheklein temporarily deployed to cml-dev-gitlab-ecr-qft58zmfjzo December 6, 2022 20:46 Inactive
@shcheklein shcheklein temporarily deployed to cml-dev-gitlab-ecr-qft58zmfjzo December 6, 2022 21:01 Inactive
@@ -448,7 +448,101 @@ The same credentials can also be used for

</admon>

### On-premise (Local) Runners
## GitLab CI/CD and container images from private registries
Copy link
Contributor

Choose a reason for hiding this comment

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

this is GL specific? what about GH?

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Dec 19, 2022

Choose a reason for hiding this comment

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

This is GitLab-specific. On GitHub it's not possible.1

Footnotes

  1. Read as «not easy enough to be documented»

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Dec 19, 2022

Choose a reason for hiding this comment

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

The closest approximation I can think of is this (not working) example:

on: push
jobs:
  authentication:
    runs-on: ubuntu-latest
    outputs:
      username: ${{ steps.authenticate.outputs.username }}
      password: ${{ steps.authenticate.outputs.password }}
    steps:
      - id: authenticate
        run: |
          echo "username=AWS" >> $GITHUB_OUTPUT
          echo "password=$(aws ecr get-login-password --region us-east-1)" >> $GITHUB_OUTPUT
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  example:
    needs: authentication
    runs-on: ubuntu-latest
    container:
      image: ACCOUNT.dkr.ecr.REGION.amazonaws.com/REPOSITORY:TAG
      credentials:
        username: ${{ needs.authentication.outputs.username }}
        password: ${{ needs.authentication.outputs.password }}
    steps:
      - run: true

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@casperdcl casperdcl Dec 20, 2022

Choose a reason for hiding this comment

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

kewl. I think this perhaps deserves a new page?
or perhaps https://cml.dev/doc/ref/runner#examples?

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Dec 20, 2022

Choose a reason for hiding this comment

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

It is about self-hosted runners, on GitLab, with private container registries. Definition of niche.

@casperdcl casperdcl self-assigned this Dec 20, 2022
@0x2b3bfa0
Copy link
Member Author

🔔 @casperdcl: meow! 🐱

@shcheklein
Copy link
Member

@0x2b3bfa0 can we merge this?

@0x2b3bfa0
Copy link
Member Author

Yes! @shcheklein, can you please approve it?

@0x2b3bfa0 0x2b3bfa0 enabled auto-merge (squash) May 14, 2023 15:11
@0x2b3bfa0 0x2b3bfa0 merged commit ccc7c0b into master May 14, 2023
@0x2b3bfa0 0x2b3bfa0 deleted the gitlab-ecr branch May 14, 2023 15:24
@github-actions
Copy link

Link Check Report

There were no links to check!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Markdown files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document usage of Docker credential helpers on GitLab
4 participants