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

Image created is of type Image Index #330

Closed
AboulEinein opened this issue Feb 21, 2024 · 3 comments · Fixed by #339
Closed

Image created is of type Image Index #330

AboulEinein opened this issue Feb 21, 2024 · 3 comments · Fixed by #339
Labels
bug Something isn't working

Comments

@AboulEinein
Copy link

Orb version

v9.0.2

What happened

      - aws-ecr/build_and_push_image:
          setup_remote_docker: true
          remote_docker_layer_caching: true
          auth:
            - aws-cli/setup:
          repo: 'repo'
          tag: '$CIRCLE_BUILD_NUM,latest'

I have the above code in my workflow, but for some reason I get 2 images pushed to ECR, one with a 0 size and no tags and the other one with the correct tags but it's Artifact Type is Image Index.
How can I change the behavior to have one image only, also the ECR scan is not running on the generated image because of it's type.

Expected behavior

1 image to be created

@hylaride
Copy link

hylaride commented Mar 11, 2024

We also are getting the same noise added to our repos. A workaround was to not to have build_and_push_image push the image, but have another push_image step, but 9.0.3 and 9.0.4 version of the orb broke for us (we are now pinning 9.0.2).

@AboulEinein FYI a workaround that works for us (if you pin to 9.0.2) is like I stated above and have push_image: false in build_and_push_image and then do this right after:

- aws-ecr/push_image:
        region: YOUR_REGION
        account_id: YOUR_ECR_ACCOUNT_ID
        repo: `repo`
        tag: '$CIRCLE_BUILD_NUM,latest'

Hopefully they fix both our issues soon!

@AboulEinein
Copy link
Author

@hylaride I made it work by adding the following extra_build_args: '--provenance=false' which disable

@nicoalonsop
Copy link
Contributor

Instead of adding extra_build_args: '--provenance=false' you can create an Environment variable on the project or context with BUILDX_NO_DEFAULT_ATTESTATIONS=1.
Doing it in this way you don't need to change the code 😃

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

Successfully merging a pull request may close this issue.

3 participants