When docker runner is used, Bamboo executes a series of Base scripts;initialiseDockerContainer.sh.
#!/bin/sh DELIMITER=123_MOUNTPOINT_321 homeMountsInContainer=/tmp/homemountpoints if [ ! -d ${homeMountsInContainer} ] ; then exit fi for mountPoint in $(find ${homeMountsInContainer} -type d -name ${DELIMITER} -prune) ; do relativePath=$(echo $mountPoint | sed -e s@^${homeMountsInContainer}/@@ -e s@/${DELIMITER}@@) echo Processing $relativePath ... target=~/${relativePath} if mountpoint -q "${target}" ; then rm -rf ${target} 2>/dev/null echo Rewiring contents of ${mountPoint} to mount point ${target} for entry in $(ls -A ${mountPoint}) ; do ln -s "${mountPoint}/${entry}" ${target} done else echo Rewiring ${mountPoint} to ${target} rm -rf ${target} mkdir -p $(dirname ${target}) ln -s "${mountPoint}" "${target}" fi done rm $0
After the container is considered initialized Bamboo will generate 2 scripts per each task in a job runInDocker<DIGITS>.sh with the exemption of a script task which has 3 scripts (where the 3rd is the body of the script task).
Here is a simple Script Task which created script runInDocker1111111.sh
#!/bin/sh cd 'C:\Users\voseg\bamboo-home\local-working-dir\DEV-DTIDR-JOB1' umask 000 'C:\Users\voseg\bamboo-home\temp\DEV-DTIDR-JOB1-22-ScriptBuildTask-11319997664902311449.bat' exit $?
this wraps the body of the script task DEV-DTIDR-JOB1-22-ScriptBuildTask-11319997664902311449.bat
#!/bin/sh docker cp /home/voseghale/workdir/runInDocker.sh 645b8d62-6205-3949-bdc9-439124a0b33b654330:/tmp/runInDocker1111111.sh docker exec -u root 645b8d62-6205-3949-bdc9-439124a0b33b654330 chown root:root /tmp/runInDocker1111111.sh docker exec -u root 645b8d62-6205-3949-bdc9-439124a0b33b654330 chmod 755 /tmp/rrunInDocker1111111.sh docker exec -e 'bamboo_planRepository_1_branch=master' -e 'bamboo_build_commandline__1000031=/usr/bin/docker exec 31ab8d62-6205-4949-bdc9-729124a0b33b688130 /tmp/initialiseContainer.sh' -e 'bamboo_planRepo 7sitory_1_branchDisplayName=master' -e 'bamboo_repository_revision_number=33365ece288a1f2fa284a26d56639718f14765be' -e 'MAVEN2_HOME=/usr' -e 'bamboo_resultsUrl=http://192.168.1.116:8086/browse/TEST-TES4-JOB 81-39'.... \tmp\runInDocker6133634956987747987.sh
In summary when a Job in Isolated build in Docker container, Bamboo:
VICTOR-OSEGHALE
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
0 comments