theia-ide / theia-apps

Theia applications examples - docker images, desktop apps, packagings
Apache License 2.0
1.04k stars 345 forks source link

CI-CD fails at Docker login #454

Closed DucNgn closed 3 years ago

DucNgn commented 3 years ago

Description

To log in and publish images to DockerHub, CI-CD requires DOCKER_USERNAME and DOCKER_PASSWORD variables to be present in the repo's secrets

Additional links:

Update:

The names of the required 2 variables in the secrets were updated

cc: @marcdumais-work

marcdumais-work commented 3 years ago

cc: @akosyakov : I think we used to have these configured, but I do not see them ATM. Would you add them again?

akosyakov commented 3 years ago

@marcdumais-work Marc do you think you can do it or someone from Ericsson team?

DucNgn commented 3 years ago

@akosyakov Unfortunately, I don't think anyone in our team has access to Dockerhub credentials.

akosyakov commented 3 years ago

Marc should have an account on dockerhub which is an owner of theia org.

marcdumais-work commented 3 years ago

Marc should have an account on dockerhub which is an owner of theia org.

I'll dig around - maybe I have that account on my personal computer.

marcdumais-work commented 3 years ago

@akosyakov confirmed.

marcdumais-work commented 3 years ago

I have set the two secrets. I'll relaunch the latest build and see what happens.

marcdumais-work commented 3 years ago

Hi @DukeNgn ,

It's not working - docker login seems to expect a real password, rather than a security token. I have found this action: https://github.com/marketplace/actions/docker-login

Can you try using it in place of the current manual docker login? I have setup the secrets to match the names in the example.

vince-fugnitto commented 3 years ago

Re-opening as the login was not yet successful.

marcdumais-work commented 3 years ago

Let's try this again - I just updated the secrets and will restart a build to test.

marcdumais-work commented 3 years ago

Build ongoing: https://github.com/theia-ide/theia-apps/runs/1763190356

marcdumais-work commented 3 years ago

I think it worked but there's a delay before the images are visible. I see one now to it's probably fine: https://hub.docker.com/r/theiaide/theia-https

image