summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/slave-params.yml15
-rw-r--r--jjb/releng/opnfv-docker-arm.yml77
-rw-r--r--jjb/releng/opnfv-docker.sh8
-rw-r--r--jjb/releng/opnfv-docker.yml4
4 files changed, 100 insertions, 4 deletions
diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml
index 79accebef..546c75d20 100644
--- a/jjb/global/slave-params.yml
+++ b/jjb/global/slave-params.yml
@@ -349,6 +349,21 @@
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
description: 'Git URL to use on this Jenkins Slave'
+- parameter:
+ name: 'opnfv-build-ubuntu-arm-defaults'
+ parameters:
+ - label:
+ name: SLAVE_LABEL
+ default: 'opnfv-build-ubuntu-arm'
+ description: 'Slave label on Jenkins'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/build_output
+ description: "Directory where the build artifact will be located upon the completion of the build."
#####################################################
# Parameters for none-CI PODs
#####################################################
diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml
new file mode 100644
index 000000000..09c9f335e
--- /dev/null
+++ b/jjb/releng/opnfv-docker-arm.yml
@@ -0,0 +1,77 @@
+##############################################
+# job configuration for docker build and push
+##############################################
+
+- project:
+
+ name: opnfv-docker-arm
+
+ master: &master
+ stream: master
+ branch: '{stream}'
+ disabled: false
+ danube: &danube
+ stream: danube
+ branch: 'stable/{stream}'
+ disabled: true
+ functest-arm-receivers: &functest-arm-receivers
+ receivers: >
+ cristina.pauna@enea.com
+ alexandru.avadanii@enea.com
+ other-receivers: &other-receivers
+ receivers: ''
+
+ project:
+ # projects with jobs for master
+ - 'functest':
+ <<: *master
+ <<: *functest-arm-receivers
+ # projects with jobs for stable
+
+ jobs:
+ - '{project}-docker-build-arm-push-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: '{project}-docker-build-arm-push-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ parameters: &parameters
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - 'opnfv-build-ubuntu-arm-defaults'
+ - string:
+ name: PUSH_IMAGE
+ default: "true"
+ description: "To enable/disable pushing the image to Dockerhub."
+ - string:
+ name: DOCKER_REPO_NAME
+ default: "opnfv/{project}_aarch64"
+ description: "Dockerhub repo to be pushed to."
+ - string:
+ name: RELEASE_VERSION
+ default: ""
+ description: "Release version, e.g. 1.0, 2.0, 3.0"
+ - string:
+ name: DOCKERFILE
+ default: "Dockerfile.aarch64"
+ description: "Dockerfile to use for creating the image."
+
+ scm:
+ - git-scm
+
+ builders: &builders
+ - shell:
+ !include-raw-escape: ./opnfv-docker.sh
+
+ triggers:
+ - pollscm:
+ cron: "*/30 * * * *"
+
+ publishers:
+ - email:
+ recipients: '{receivers}'
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh
index 40669bcb7..c906e1fcd 100644
--- a/jjb/releng/opnfv-docker.sh
+++ b/jjb/releng/opnfv-docker.sh
@@ -12,6 +12,7 @@ set -o nounset
set -o pipefail
+
echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..."
echo "--------------------------------------------------------"
echo
@@ -51,10 +52,8 @@ if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then
done
fi
-
-# cd to directory where Dockerfile is located
cd $WORKSPACE/docker
-if [ ! -f ./Dockerfile ]; then
+if [ ! -f ${DOCKERFILE} ]; then
echo "ERROR: Dockerfile not found."
exit 1
fi
@@ -78,7 +77,8 @@ fi
echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
echo "--------------------------------------------------------"
echo
-cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH ."
+cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BRANCH
+ -f $DOCKERFILE ."
echo ${cmd}
${cmd}
diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml
index 70d38f2e8..90a91f802 100644
--- a/jjb/releng/opnfv-docker.yml
+++ b/jjb/releng/opnfv-docker.yml
@@ -103,6 +103,10 @@
name: RELEASE_VERSION
default: ""
description: "Release version, e.g. 1.0, 2.0, 3.0"
+ - string:
+ name: DOCKERFILE
+ default: "Dockerfile"
+ description: "Dockerfile to use for creating the image."
scm:
- git-scm