Note: the first bazel build is going to stall for some time while building the base images on docker without any output due to bazelbuild/bazel#1289.
Docker:
Gcloud:
gcloud auth login gcloud set project bazel-public
The classical worflow when modfiying ci.bazel.io is to first test the change on ci-staging.bazel.io, so a complete cycle would looks like:
jenkins/jobs/jobs.bzl
../gce/vm.sh start staging
.bazel run //gcr:deploy-staging
to deploy the change to the staging instance.bazel run //gcr:deploy
.There is a way to run a local jenkins instance with a docker executor node, by running
bazel run //jenkins:test [-- -p port]
It will setup a Jenkins instance without security on port port
(8080 by default) and one node running Ubuntu Wily in Docker. This should be enough for local testing. To stop the instance, goes to http://localhost:8080/safeExit
and this will shutdown cleanly.
You can connect additional instance by modifying the UI to test for other platforms. This does not enable to test:
If the only modification needed are to Groovy code under jenkins/lib
, they can be updated in the running container, without restarting jenkins. The script jenkins/transfer-lib.sh
will transfer the lib folder to the running container started by bazel run //jenkins:test
. The wrapper around that script jenkins/transfer-lib-to-staging.sh
will do the same but transfer in the container running on the jenkins controller for the staging instance.