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

Enable new image for Nouveau to be published in CI to Elastic Container Repository (ECR) #9685

Open
mrjones-plip opened this issue Dec 3, 2024 · 6 comments
Assignees
Labels
Type: Technical issue Improve something that users won't notice

Comments

@mrjones-plip
Copy link
Contributor

Describe the issue
A new service is being added to CHT Core, Nouveau, and it needs a new image published via CI

Describe the improvement you'd like
Do any ECR and related work to allow the image to be published

@mrjones-plip mrjones-plip added the Type: Technical issue Improve something that users won't notice label Dec 3, 2024
@mrjones-plip mrjones-plip moved this from Awaiting Triage to In Progress in Site Reliability Support Dashboard Dec 3, 2024
@mrjones-plip
Copy link
Contributor Author

@m5r reported running the CI job now, this error is returned:

ERROR: failed to solve: failed to push 720541322708.dkr.ecr.eu-west-2.amazonaws.com/medic/cht-couchdb-nouveau:4.15.0-couchdb-nouveau.12124430292: unexpected status from HEAD request to https://720541322708.dkr.ecr.eu-west-2.amazonaws.com/v2/medic/cht-couchdb-nouveau/blobs/sha256:268db4a4b80fa4e519d1a26fa5d6382df8df33e19d63f21dc3bdb09b53dc56f2: 403 Forbidden

@henokgetachew tried to add some perms in ECR:

{
    "repository": {
        "repositoryArn": "arn:aws:ecr:eu-west-2:720541322708:repository/medic/cht-couchdb-nouveau",
        "registryId": "720541322708",
        "repositoryName": "medic/cht-couchdb-nouveau",
        "repositoryUri": "720541322708.dkr.ecr.eu-west-2.amazonaws.com/medic/cht-couchdb-nouveau",
        "createdAt": "2024-12-03T13:05:44.979000+03:00",
        "imageTagMutability": "MUTABLE",
        "imageScanningConfiguration": {
            "scanOnPush": false
        },
        "encryptionConfiguration": {
            "encryptionType": "AES256"
        }
    }
}

@mrjones-plip
Copy link
Contributor Author

5th try is still failing the the 403 error above

@henokgetachew henokgetachew self-assigned this Dec 11, 2024
@henokgetachew
Copy link
Contributor

henokgetachew commented Dec 11, 2024

The issue here was very simple that it was difficult not to overlook. The repo i created was a private repo. Not a public one.

@henokgetachew
Copy link
Contributor

@m5r can you now test?

@m5r
Copy link
Member

m5r commented Dec 11, 2024

@henokgetachew just gave it two more tries to be certain and it's still failing 😟

https://github.com/medic/cht-core/actions/runs/12273653842/job/34244889443?pr=9541#step:13:875

@henokgetachew
Copy link
Contributor

Ah, now I see the issue! The way the builds work is that branch builds are pushed to the private repo whereas master builds are pushed to the public repo.

Private Registry Push:

push 720541322708.dkr.ecr.eu-west-2.amazonaws.com/cht-couchdb-nouveau:<tag>

Public Registry Push:

push public.ecr.aws/medic/cht-couchdb-nouveau:<tag>

The error we were seeing earlier was because the code is trying to push to the private registry but using the repository that was set up in the public registry.

Not sure where in the build that's configured (cc: @dianabarsan )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Technical issue Improve something that users won't notice
Projects
Status: In Progress
Development

No branches or pull requests

3 participants