Docker–fourth part–part 20
Time to push to docker
1. putting the docker password into the pipeline variables
2. Modifying the yaml
3. Waiting for build
Error in Docker: Incorrect name or password
Now, I want to create 2 jobs to isolate Docker from the main build.
I encounter some errors in the yaml file . That shows fast in the AzureDevops, but you must figure what it is by reading the line
/azure-pipelines.yml: (Line: 8, Col: 7, Idx: 271) – (Line: 8, Col: 7, Idx: 271): Mapping values are not allowed in this context.
/azure-pipelines.yml: (Line: 45, Col: 3, Idx: 1225) – (Line: 45, Col: 4, Idx: 1226): While parsing a block mapping, did not find expected key.
Job Build Docker has an invalid name. Valid names may only contain alphanumeric characters and ‘_’ and may not start with a number.
(a name attribte was not indented, steps was not found before script, build name having spaces)
Now trying to build again. Error because I have put the password variable from Azure secret? Delete the variable, putting another variable with the same name, not secret. Works!
Now I have on docker hub a new image, ignatandrei/infovalutar : https://hub.docker.com/r/ignatandrei/infovalutar
You can run with
docker run –rm -it -p 8080:8080 ignatandrei/infovalutar:latest
And then go to http://localhost:8080/swagger/
And that was all! ( pipeline definition at https://dev.azure.com/ignatandrei0674/InfoValutar/_build?definitionId=5&_a=summary )
InfovalutarAnd one hour passes...
(This is the result of 1 hour per day auto-challenge as a full cycle developer for an exchange rates application)
( You can see the sources at https://github.com/ignatandrei/InfoValutar/ )