Open kwmonroe opened 7 years ago
Here is an example from my jenkins job that runs some commands in jujubox:
docker run --rm -v /var/lib/jenkins/jobs/kubernetes-e2e-gce/workspace/juju:/home/ubuntu/.local/share/juju -v /var/lib/jenkins/jobs/kubernetes-e2e-gce/workspace:/home/ubuntu/workspace --entrypoint /bin/bash jujusolutions/jujubox:latest -c 'sudo chown -R ubuntu:ubuntu /home/ubuntu/.local/share/juju && juju add-model jenkins-kubernetes-e2e-gce-2'
Basically --entrypoint /bin/bash
has to be before the name of the container, and -c 'command'
has to be after the name of the container if you want to run the command and see the output in the log.
Yup, the pertinent bits are this:
docker run ... jujusolutions/charmbox sh -c '<cmd>'
needs to become this:
docker run ... --entrypoint /bin/bash jujusolutions/charmbox -c '<cmd>'
The "-c
It's in the Jenkins job, which is not part of the review queue infrastructure, per se.
Thanks for the bug report. For reference, this will need to be fixed here: https://github.com/tvansteenburgh/jenkins-charm-bundle-slave/blob/master/build-cloud.sh
Yeah, we should probably move that repo.
@tvansteenburgh thanks for the pointer! PR opened:
https://github.com/tvansteenburgh/jenkins-charm-bundle-slave/pull/1
Merged and installed on the jenkins host.
The jenkins host and the build-cloud.sh script referenced above need to be updated to use juju2 by default. Right now it's still on juju1, which is why we're getting test errors - the host is on juju1 but the container is using juju2. juju2 is installed on the jenkins machine, it just needs to become the default juju. And there may need to be some fiddling with clouds/controllers/credentials to make sure we have access to the same clouds that we have currently.
Example failure:
http://juju-ci.vapour.ws/job/charm-bundle-test-gce/221/console
charmbox now uses an ENTRYPOINT instead of a CMD. this means the revq tests cannot
docker run ... sh -c <blah>
. Instead, docker run needs to override the entrypoint with bash. This is similar to how we fixed build-cloud:https://github.com/juju-solutions/build-cloud/pull/86/files