Skip to content
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

gcr-auth error on Windows machine executor #88

Open
bchu-oanda opened this issue May 24, 2024 · 0 comments
Open

gcr-auth error on Windows machine executor #88

bchu-oanda opened this issue May 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bchu-oanda
Copy link
Contributor

Orb version:

gcp-gcr: circleci/[email protected]
windows: circleci/[email protected]

What happened:

We are using a Windows machine executor to perform perform Docker builds and pushes. We use the gcp-gcr/gcr-auth command to authenticate to use our private container registry in GCP. The gcloud auth configure-docker step fails:

Adding credentials for all GCR repositories.
WARNING: A long list of credential helpers may cause delays running 'docker build'. We recommend passing the registry name to configure only the registry you are using.
Docker configuration file updated.
bash: line 17: sudo: command not found

Exited with code exit status 127

Expected behavior:

The gcr-auth command succeeds on Windows executors.

Additional Information:

CircleCI config.yml:

version: 2.1

orbs:
  gcp-gcr: circleci/[email protected]
  windows: circleci/[email protected]

jobs:
  windows_build:
    executor:
      name: windows/server-2019
      shell: bash.exe -eo pipefail
    parameters:
      gcloud_version:
        type: string
    steps:
      - checkout
      - gcp-gcr/gcr-auth:
          use_oidc: true
      - gcp-gcr/build-image:
          dockerfile: Dockerfile.windows
          image: my-windows-test
          tag: << parameters.gcloud_version >>
      - gcp-gcr/push-image:
          image: my-windows-test
          tag: << parameters.gcloud_version >>

workflows:
  version: 2

  build:
    jobs:
      - windows_build:
          name: "<< matrix.gcloud_version >> Windows build"
          matrix:
            parameters:
              gcloud_version: ["471.0.0", "477.0.0"]
          context:
            - gar-rw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant