The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

264347 (6) [Avatar] Offline
#1
Hi,

Really liking the MEAP and looking forward to the release of the next chapter(s). I've forked the https://github.com/Securing-DevOps/invoicer repo but unfortunately it won't build on CircleCI.

Basicaly, if you look at the output of the CircleCI build, under the MACHINE section, you get a subsection entitled 'Exporting env vars from circle.yml' just before a subsection entitled 'Exporting env vars from project settings'.

The following line in the circle.yml will therefore not evaluate as expected:

DOCKER_REPO: "$(if [ $CIRCLE_PROJECT_USERNAME == 'Securing-DevOps' ]; then echo securingdevops; else echo $DOCKER_USER; fi)"

The DOCKER_USER environment variable hasn't been set yet...

I've very limited experience with CircleCI, but I think the the only thing you can do if to also set DOCKER_REPO as a project environment variable in CircleCI.

I've added this as an issue ( and will submit a pull request in the next day or two.

Thanks

Martin
264347 (6) [Avatar] Offline
#2
I've created a pull request to resolve the environment variable issue.

Unfortunately the build has failed again due to out dated dependencies - I'll push a change set to resolve that too.
Julien Vehent (14) [Avatar] Offline
#3
Thanks for the report. The issue should now be fixed upstream.
264347 (6) [Avatar] Offline
#4
Thanks, I'll check it out later today.
264347 (6) [Avatar] Offline
#5
Just rebased my fork of https://github.com/Securing-DevOps/invoicer, I get a green build on Circle CI and the docker image has been uploaded to my Docker Hub account.

During the docker build I did however notice something that looked like an error (even though it didn't break the build):

Enter the new value, or press ENTER for the default
	Full Name []: 	Room Number []: 	Work Phone []: 	Home Phone []: 	Other []: Use of uninitialized value $answer in chop at /usr/sbin/adduser line 582.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 583.
Is the information correct? [Y/n]  ---> 1b0a1d493e1b


Also, after every step in the docker build there was an error removing the intermediate container:
nosuchcontainer: no such id:
But like I said, this didn't prevent the build from succeeding.