summaryrefslogtreecommitdiffstats
path: root/jjb/releng/opnfv-docker.sh
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Remove former docker build jobsCédric Ollivier1-168/+0
Change-Id: Ie8dbca74cfb68eaa3610a14b81cb1f53d95dc399 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-09-14Switch Docker Namespace from OPNFV to AnuketTrevor Bramwell1-7/+7
This updates the container builds to be published to hub.docker.com/u/anuket over hub.docker.com/u/opnfv. Change-Id: I8a182277fc35f9d04925cc63b4eedf57a4b25f0c Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2020-02-21Push Docker Release from Tags on the Master BranchTrevor Bramwell1-3/+7
Any change that was merged to master for docker builds was tagged as latest, regardless if that change was triggered by a new tag. This fixes the docker script logic to allow containers to be tagged and pushed from tags on the master branch. Change-Id: I80e019b90d2dd3dd216005a3bd62d6d741c1d507 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2019-10-03Remove all compass jobsAric Gardner1-6/+6
Remove all jobs associated or dependant on compass Signed-off-by: Aric Gardner <agardner@linuxfoundation.org> Change-Id: I2bdac50e535736e51d815fc12c4141158f1ef852
2019-03-26Provide a way to add extra arguements when building docker imagesStamatis Katsaounis1-1/+7
This patch adds a parameter for extra arguements to be used to build OPNFV docker images. Change-Id: I65d5b96e5b0db348a4f200e6ef26b5b6ca65b348 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-07-03jjb/releng: fix partial image name matchingYibo Cai1-7/+23
Docker image building script opnfv-docker.sh tries to remove existing images before and after building. It simply uses grep to matching image names, which may cause partial name matching problems. Ex. opnfv/compass-tasks will match both opnfv/compass-tasks and opnfv/compass-tasks-base, and may lead to accidentally removing of images still in use when several building tasks run concurrently. Error log: https://build.opnfv.org/ci/job/compass-tasks-build-arm64-master/6/console Change-Id: I1a83f801c5e0cc889cd9e17b8d1b4d895f1f68a9 Signed-off-by: Yibo Cai <yibo.cai@arm.com>
2018-05-21Fix Manual Triggering of Docker JobsTrevor Bramwell1-1/+1
When manually triggering a docker job (or even through timed builds), GERRIT_EVENT_TYPE will not get set. This does gets set when the job is triggered by a Gerrit event (ex: ref-updated, comment-added). Specifying the variable lookup to default to nothing (ex: "${FOO:-}") should allow non-Gerrit triggered jobs to complete successfully. Change-Id: Ic1ba8ebef0967b0f20a2d6385ce0e0b4876901dc Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2018-05-17Fix Docker Container Build TaggingTrevor Bramwell1-1/+8
Builds triggered by tags have a typo in the extraction of the tag name. This change includes a method for retriggering a tag build with the comment "retag TAG_NAME". Change-Id: Ie035e0922f8c073d3e360917ea7ccd6fa76d7b20 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2018-02-28Pull the latest parent when building containersCédric Ollivier1-1/+1
Change-Id: I534c14f4415c16661fb95966077621497c6f9cdc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-23Output version before Docker buildsTrevor Bramwell1-2/+2
Its helpful to know which version of docker is being used to build a project when debugging build failures. Change-Id: I2bb9c5386d1d69e61c4477913f5f0162acd0c47d Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2018-01-16Merge "Docker Builds from Git Tag"Trevor Bramwell1-0/+3
2018-01-09Docker Builds from Git TagTrevor Bramwell1-0/+3
Facilitates the creation of docker images from tags pushed to Gerrit, which should remove the need to manually trigger 'tagged' builds. Fixes a typo in the 'gerrit-trigger-tag-created' macro, replaces 'RELEASE_VERSION' with 'GERRIT_REFNAME', and adds the tag-trigger to docker builds. Change-Id: I6d8f8f34b1c51d74bb98211dfae21c37cf9356fa Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2017-12-25Allow building docker image from specified pathYujun Zhang1-2/+4
Change-Id: Iab40fc2c719050d36a614fe529ca22634b59b7bc Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>
2017-12-22Putting the required backmbeierl1-0/+1
This is required for StorPerf multi-arch and causes all the StorPerf ARM builds to fail if it is not present. Change-Id: I302c0471a52759cd9c051741e2b0bb086b87e8eb Signed-off-by: mbeierl <mark.beierl@dell.com>
2017-11-21compass: Build Docker images with jjbwutianwei1-25/+35
JIRA: COMPASS-567 Add compass4nfv-docker.yml compass-tasks-k8s and compass-tasks-osa are dependent on compass-compass-tasks. So we have to phase to build docker images phase 1. execute the multijob 'build compass-tasks images' Only the phase 1 is successful then excute the phase 2 phase 2. execute the multijob 'build all compass images' Modify the opnfv-docker.sh 1. Add a function remove_containers_images 2. call the remove_containers_images when beginning and finishing build to solve the problem of rmove of images due to dependancy Change-Id: I66fb27260cf114da96417361e80c8183db3233bd Signed-off-by: wutianwei <wutianwei1@huawei.com>
2017-11-08Remove not consumed argument 'ARCH' from docker buildDelia Popescu1-1/+0
Change-Id: I955479b8bc33c4a7445292901aa4228a413aa4c1 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2017-11-07Refactor arch-specific Dockerfile patchingDelia Popescu1-14/+7
CHANGE: Obsolete "Dockerfile.aarch64" support, only "Dockerfile.$(uname -m).patch" mechanism is to be used from now on. It is correlated with https://gerrit.opnfv.org/gerrit/#/c/46797/ Change-Id: If765550681d283dea7e3522f21080ea2c5e2fda4 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2017-10-18Update release tags for Docker buildsJose Lausuch1-2/+8
Change-Id: I3c4d71239dfe66773931f5f5b9349faab443aa2d Signed-off-by: Jose Lausuch <jalausuch@suse.com>
2017-09-29Keep Docker builds from thrashing on same serverTrevor Bramwell1-0/+11
There is a possiblity of multiple docker builds of a docker repo being scheduled on the same host: 1) Patch is merged 2) Docker build is triggered 3) New patch is merged before the Docker build/push finishes triggering a second build 4) First build fails as second build starts by cleaning image from first build Reintroducing the check for builds in progress, but specific to the Docker repo, should allow mulitiple Docker builds on a node to run, while keeping multiple builds on a per-repo basis from thrashing each other. JIRA: RELENG-315 Change-Id: I74c01850a036c831b93a8cd5fa8522337abb9ff4 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2017-09-26Remove Restriction on Total Docker Builds per NodeTrevor Bramwell1-11/+0
The docker build script will only allow one docker build at a time. As docker builds are now restricted to one per-node by project through the throttle-build plugin, this restriction can be lifted. JIRA: RELENG-315 Change-Id: I4c430f99eaaed831fa0c49284280a8fa9fbe13c8 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2017-09-14opnfv-docker.sh: Fix unbound ARCH_TAGAlexandru Avadanii1-0/+1
Jenkins does not set ARCH_TAG to an empty string; instead it does not set that variable at all when the input is empty. Fix this by providing a default empty string in the script. Change-Id: Iec4c38068b1ab3e8dd124f49b36759eedb084f4a Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-13Optional Architecture Specific Pushmbeierl1-0/+7
Enables optional argument to specify the architecture to use when building and pushing the image. If project defines it, the arch is added to the docker version like so: arch-version. This matches the tag convention used by multiarch/alpine. Change-Id: I699c2aba05c55291b5f8c48bcc1daacceae6154b JIRA: STORPERF-210 Signed-off-by: mbeierl <mark.beierl@dell.com>
2017-07-24Multiple Dockerfile Builds per ProjectTrevor Bramwell1-1/+1
Instead of defining docker build jobs in terms of projects, we define them in terms of dockerrepos. Each dockerrepo is associated with a specific project and may have a seperate Dockerfile (which defaults to 'Dockerfile' if unspecified), and location for files needed by the Dockerfile (default: 'docker'). This should allow for running multiple docker builds out of a single project repository without having to modify the current docker build scripts. The output of this job configuration should match what is currently in Jenkins. Change-Id: I9089d57a0c7cc56be4225b56e96bec56be258f1f Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
2017-06-20Support to build docker image with commit idMatthewLi1-9/+9
JIRA: DOVETAIL-447 this support dovetail to make tag/container snapshot at some commit id this will also used for functest/yardstick if needed, since their danube.2.0/3.0 may not satisfy dovetail requirements, while their snapshots at some commit id satisfy. Change-Id: I76cf6df586d1c9f0f563c6bfc039e3e271dc3de8 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-05-03dovetail: docker tag supportMatthewLi1-7/+7
JIRA: DOVETAIL-419 since dovetal has no A/B/C/D branch, only have master, need docker image name sth like opnfv/dovetail:plugfest_april_2017 rather than opnfv/dovetail:<release>.1.0, etc. then when RELEASE_VERSION is empty, generate opnfv/dovetail:latest ortherwise opnfv/dovetail:<RELEASE_VERSION> Change-Id: I92573bee35da16305074393401e5e5da65aaa22c Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-31Add wait method for Docker buildsjose.lausuch1-8/+10
By default, if a docker build job triggers and there is another one running at the same time, it will abort the job. This adds a wait method with a timeout to avoid that. Change-Id: Ica86885c60ce4137c85474ec4b7441ac5bab600c Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-03-15Merge "Allow creation of Dockerfile.aarch64 through patch"Fatih Degirmenci1-3/+13
2017-03-14Fix the RELEASE_VERSION unbound issuehelenyao1-1/+1
'RELEASE_VERSION: unbound variable' popped up when building stable docker image Change-Id: I5d4582aea2f154e0bc34cdccdd05b9df64032ed2 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-03-13Allow creation of Dockerfile.aarch64 through patchCristina Pauna1-3/+13
When building an aarch64 docker image an Dockerfile.aarch64 file is expected to exist. With this patch we may create it from the x86 Dockerfile by applying an aarch64 patch This feature can be used with qtip, via https://gerrit.opnfv.org/gerrit/#/c/30185/ JIRA: ARMBAND-219 Change-Id: I71e1e1852e31f92fb1f1947542f7f397b996541f Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-02-22Merge "dovetail: docker build not set branch parameter"Jose Lausuch1-2/+6
2017-02-20dovetail: docker build not set branch parameterMatthewLi1-2/+6
JIRA: DOVETAIL-354 1)in https://build.opnfv.org/ci/view/dovetail/job/dovetail-compass-baremetal-debug-master/200/artifact/results/dovetail_report.txt Version isn't correct, version should be obtained from https://git.opnfv.org/dovetail/tree/setup.cfg 2)since dovetail not have A/B/C/D branches such as Danube, no need to set branch parameter when doing "docker build", if branch parameter settled, the "version" info in setup.cfg will not obtained. 3)related patch https://gerrit.opnfv.org/gerrit/#/c/29045/ Change-Id: I2b2880e417460a4a3da3e108bb83800e2acb3a83 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-02-16[docker] Use image IDs instead of tagsjose.lausuch1-5/+5
If we use tags, when there are remaining images without the tag <none> it fails and get the following error: Removing docker image opnfv/functest:<none>... Error response from daemon: Error parsing reference: "opnfv/functest:<none>" is not a valid repository/tag By using IDs we make sure we delete the images. Change-Id: Ib336dc73168bac909c42dd4a9681ef07d477dc7b Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-10Add jobs to build arm functest imagesCristina Pauna1-4/+4
Jenkins slave arm-build3 was added to build the docker image on arm This commit adds jobs to use that jenkins slave. JIRA: ARMBAND-108 Change-Id: I7b293d119ca3347983940639fe0cfea1098b18f3 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-02-01merge GIT_BRANCH and GERRIT_BRANCH into BRANCHRyota MIBU1-5/+4
GIT_BRANCH parameter is different; master or stable/danube in daily jobs, but 'refs/changes/57/27657/6' in verify jobs. This breaks some job builders triggered by the both types of jobs. We have GERRIT_BRANCH parameter for verify jobs to identify stream and expected branch into the patch will be merged after it got +2 and submitted. To avoid further confusion and to have common job builders for daily and verify jobs, this patch introduce BRANCH parameter. GERRIT_BRANCH is now deprecated. Change-Id: Ibcd42c1cd8a0be0f330878b21d3011f1ec97043b Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
2016-12-08Fix typo in docker opnfv jobsjose.lausuch1-1/+1
Change-Id: Iff8145eec8946355fd92ebfeacbc0a7661af4b1b Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-12-01Add possibility to build a Release Docker imagejose.lausuch1-1/+7
New flag that if it's not empty, it will build the image with the given tag instead of using master/stable. These release builds will need to be triggered manually by a Jenkins user with rights to build jobs. The respective projects take the responsability to build the release docker image whenever they consider it is the right time. Change-Id: I49b087e80eb134b8b3ddef8399f61eeac9b29619 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-11-29Rearrange Releng Job and Parameter FilesTrevor Bramwell1-0/+92
Individual project jobs can now be tested using: jenkins-jobs test -r jjb/global:jjb/$project - Rename '.yaml' files to '.yml' so they get checked by the verify-releng.sh script, and update the script to include checking of '.yaml' files. - Move parameter and macro files under new 'global' directory. Change-Id: I6b74f5d8af2bced3256a7f4a33983df5310511a2 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>