adop-docker-compose icon indicating copy to clipboard operation
adop-docker-compose copied to clipboard

Job /job/ExampleWorkspace/job/ExampleProject/job/Create_Environment fails

Open oscarrenalias opened this issue 8 years ago • 5 comments

Job /job/ExampleWorkspace/job/ExampleProject/job/Create_Environment doesn't work:

[EnvInject] - Inject global passwords.
Started by user Admin User
[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Injecting as environment variables the properties content 
WORKSPACE_NAME=ExampleWorkspace
PROJECT_NAME=ExampleWorkspace/ExampleProject

[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building remotely on Swarm_Slave-68f7e58b (swarm java8 ldap aws docker) in workspace /workspace/ExampleWorkspace/ExampleProject/Create_Environment

Deleting project workspace... done

[ssh-agent] Using credentials jenkins (ADOP Jenkins Master)
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent]   Java/JNR ssh-agent
[ssh-agent] Started.
Cloning the remote Git repository
Cloning repository ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template
 > git init /workspace/ExampleWorkspace/ExampleProject/Create_Environment # timeout=10
Fetching upstream changes from ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template
 > git --version # timeout=10
using GIT_SSH to set credentials ADOP Jenkins Master
 > git -c core.askpass=true fetch --tags --progress ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template # timeout=10
Fetching upstream changes from ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template
using GIT_SSH to set credentials ADOP Jenkins Master
 > git -c core.askpass=true fetch --tags --progress ssh://jenkins@gerrit:29418/ExampleWorkspace/ExampleProject/adop-cartridge-java-environment-template +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 86f2e0b110d7569d7933d77c6478d7e8e425c483 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 86f2e0b110d7569d7933d77c6478d7e8e425c483
 > git rev-list 86f2e0b110d7569d7933d77c6478d7e8e425c483 # timeout=10
[Create_Environment] $ /bin/sh -xe /tmp/hudson3927040214662628747.sh
+ set +x
CI, tomcat.conf
TLS configuration is invalid - make sure your DOCKER_TLS_VERIFY and DOCKER_CERT_PATH are set correctly.
You might need to run `eval "$(docker-machine env default)"`
Build step 'Execute shell' marked build as failure
[ssh-agent] Stopped.
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE

I tried defining DOCKER_TLS_VERIFY and DOCKER_CERT_PATH within the shell script that is embedded in the job, but it does not seem to make any difference. Where exactly are the TLS certs for the engine, and how should they be transferred to the node?

Please note that this instance is a single node ADOP server, created from OS X, where the gen-certs step was skipped because it won't work on OS X (see related issue #73)

oscarrenalias avatar May 09 '16 20:05 oscarrenalias

This issue is directly related to the fact that gen-certs was skipped.

You can manually follow the script to generate the certificates and upload them to Jenkins slave (correct directory should be //root/.docker/)

dsingh07 avatar May 11 '16 10:05 dsingh07

Can this be closed here and raised in the correct repository please if it is still an issue? https://github.com/Accenture/adop-cartridge-java

nickdgriffin avatar Jun 17 '16 09:06 nickdgriffin

where is the script that is mentioned in: "You can manually follow the script to generate the certificates and upload them to Jenkins slave (correct directory should be //root/.docker/)"

teamschwarz avatar Aug 16 '16 16:08 teamschwarz

Hi @teamschwarz

The certificate generation function is part of a cli command in adop compose init found here: https://github.com/Accenture/adop-docker-compose/blob/master/cmd/compose#L181

dsingh07 avatar Aug 16 '16 16:08 dsingh07

I think an important point here is that when the certificate generation fails as part of running quickstart, it kind of fails silently (the script does stop, but it does not show an error to the user) and then when you go on and try the platform, the certificates are not generated, and it fails. PR #104 should help avoiding the certificate generation error itself, but if it does fail on the cert gen, it is also changed so that it shows an error to the user

josequaresma avatar Oct 14 '16 20:10 josequaresma