summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/3rd_party_ci/download-netvirt-artifact.sh18
-rwxr-xr-xjjb/3rd_party_ci/install-netvirt.sh18
-rw-r--r--jjb/3rd_party_ci/odl-netvirt.yml7
-rw-r--r--jjb/apex/apex-snapshot-deploy.sh28
-rw-r--r--jjb/apex/apex.yml30
-rw-r--r--jjb/copper/copper.yml8
-rw-r--r--jjb/daisy4nfv/daisy-project-jobs.yml12
-rw-r--r--jjb/daisy4nfv/daisy4nfv-verify-jobs.yml6
-rw-r--r--jjb/functest/functest-ci-jobs.yml2
-rwxr-xr-xjjb/functest/functest-cleanup.sh12
-rwxr-xr-xjjb/functest/set-functest-env.sh20
-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
-rw-r--r--jjb/releng/testapi-automate.yml14
-rw-r--r--jjb/releng/testapi-backup-mongodb.sh2
-rw-r--r--jjb/releng/testapi-docker-deploy.sh6
18 files changed, 231 insertions, 56 deletions
diff --git a/jjb/3rd_party_ci/download-netvirt-artifact.sh b/jjb/3rd_party_ci/download-netvirt-artifact.sh
index fe8066cb8..6aea01d2a 100755
--- a/jjb/3rd_party_ci/download-netvirt-artifact.sh
+++ b/jjb/3rd_party_ci/download-netvirt-artifact.sh
@@ -3,20 +3,28 @@ set -o errexit
set -o nounset
set -o pipefail
+ODL_ZIP=distribution-karaf-0.6.0-SNAPSHOT.zip
+
echo "Attempting to fetch the artifact location from ODL Jenkins"
CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~master~$GERRIT_CHANGE_ID/detail"
# due to limitation with the Jenkins Gerrit Trigger, we need to use Gerrit REST API to get the change details
-ODL_JOB_URL=$(curl -s $CHANGE_DETAILS_URL | grep netvirt-patch-test-current-carbon | tail -1 | \
- sed 's/\\n//g' | awk '{print $6}')
-NETVIRT_ARTIFACT_URL="${ODL_JOB_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/0.6.0-SNAPSHOT/distribution-karaf-0.6.0-SNAPSHOT.tar.gz"
+ODL_BUILD_JOB_NUM=$(curl -s $CHANGE_DETAILS_URL | grep -Eo 'netvirt-distribution-check-carbon/[0-9]+' | tail -1 | grep -Eo [0-9]+)
+
+NETVIRT_ARTIFACT_URL="https://jenkins.opendaylight.org/releng/job/netvirt-distribution-check-carbon/${ODL_BUILD_JOB_NUM}/artifact/${ODL_ZIP}"
echo -e "URL to artifact is\n\t$NETVIRT_ARTIFACT_URL"
echo "Downloading the artifact. This could take time..."
-wget -q -O $NETVIRT_ARTIFACT $NETVIRT_ARTIFACT_URL
+wget -q -O $ODL_ZIP $NETVIRT_ARTIFACT_URL
if [[ $? -ne 0 ]]; then
echo "The artifact does not exist! Probably removed due to ODL Jenkins artifact retention policy."
echo "Rerun netvirt-patch-test-current-carbon to get artifact rebuilt."
exit 1
fi
+
+#TODO(trozet) remove this once odl-pipeline accepts zip files
+echo "Converting artifact zip to tar.gz"
+unzip $ODL_ZIP
+tar czf /tmp/${NETVIRT_ARTIFACT} $(echo $ODL_ZIP | sed -n 's/\.zip//p')
+
echo "Download complete"
-ls -al $NETVIRT_ARTIFACT
+ls -al /tmp/${NETVIRT_ARTIFACT}
diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh
index ce2a50cd0..ed1a12bc8 100755
--- a/jjb/3rd_party_ci/install-netvirt.sh
+++ b/jjb/3rd_party_ci/install-netvirt.sh
@@ -7,8 +7,18 @@ SNAP_CACHE=$HOME/snap_cache
# clone opnfv sdnvpn repo
git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn
-if [ ! -f "$NETVIRT_ARTIFACT" ]; then
- echo "ERROR: ${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist"
+if [ ! -f "/tmp/${NETVIRT_ARTIFACT}" ]; then
+ echo "ERROR: /tmp/${NETVIRT_ARTIFACT} specified as NetVirt Artifact, but file does not exist"
+ exit 1
+fi
+
+if [ ! -f "${SNAP_CACHE}/node.yaml" ]; then
+ echo "ERROR: node.yaml pod config missing in ${SNAP_CACHE}"
+ exit 1
+fi
+
+if [ ! -f "${SNAP_CACHE}/id_rsa" ]; then
+ echo "ERROR: id_rsa ssh creds missing in ${SNAP_CACHE}"
exit 1
fi
@@ -16,6 +26,8 @@ fi
# but we really should check the cache here, and not use a single cache folder
# for when we support multiple jobs on a single slave
pushd sdnvpn/odl-pipeline/lib > /dev/null
+# FIXME (trozet) remove this once permissions are fixed in sdnvpn repo
+chmod +x odl_reinstaller.sh
./odl_reinstaller.sh --pod-config ${SNAP_CACHE}/node.yaml \
- --odl-artifact ${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa
+ --odl-artifact /tmp/${NETVIRT_ARTIFACT} --ssh-key-file ${SNAP_CACHE}/id_rsa
popd > /dev/null
diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml
index f3a4c0236..dcc6ac17d 100644
--- a/jjb/3rd_party_ci/odl-netvirt.yml
+++ b/jjb/3rd_party_ci/odl-netvirt.yml
@@ -62,8 +62,8 @@
branch: '{branch}'
- string:
name: NETVIRT_ARTIFACT
- default: $WORKSPACE/distribution-karaf.tar.gz
- - 'odl-netvirt-virtual-defaults'
+ default: distribution-karaf.tar.gz
+ - 'odl-netvirt-virtual-intel-defaults'
triggers:
- gerrit:
@@ -101,7 +101,7 @@
GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION
NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT
APEX_ENV_NUMBER=$APEX_ENV_NUMBER
- node-parameters: false
+ node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
- multijob:
@@ -129,6 +129,7 @@
predefined-parameters: |
DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
FUNCTEST_SUITE_NAME=healthcheck
+ RC_FILE_PATH=$HOME/cloner-info/overcloudrc
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: false
diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh
index a99955f9a..05a2d4820 100644
--- a/jjb/apex/apex-snapshot-deploy.sh
+++ b/jjb/apex/apex-snapshot-deploy.sh
@@ -41,23 +41,26 @@ fi
local_snap_checksum=""
# check snap cache directory exists
+# if snapshot cache exists, find the checksum
if [ -d "$SNAP_CACHE" ]; then
- latest_snap=$(ls -Art | grep tar.gz | tail -n 1)
+ latest_snap=$(ls ${SNAP_CACHE} | grep tar.gz | tail -n 1)
if [ -n "$latest_snap" ]; then
- local_snap_checksum=$(sha512sum ${latest_snap} | cut -d' ' -f1)
+ local_snap_checksum=$(sha512sum ${SNAP_CACHE}/${latest_snap} | cut -d' ' -f1)
fi
else
mkdir -p ${SNAP_CACHE}
fi
# compare check sum and download latest snap if not up to date
-if [ "$local_snap_checksum" -ne "$latest_snap_checksum" ]; then
+if [ "$local_snap_checksum" != "$latest_snap_checksum" ]; then
snap_url=$(cat opnfv.properties | grep OPNFV_SNAP_URL | awk -F "=" '{print $2}')
if [ -z "$snap_url" ]; then
echo "ERROR: Snap URL from snapshot.properties is null!"
exit 1
fi
echo "INFO: SHA mismatch, will download latest snapshot"
+ # wipe cache
+ rm -rf ${SNAP_CACHE}/*
wget --directory-prefix=${SNAP_CACHE}/ ${snap_url}
snap_tar=$(basename ${snap_url})
else
@@ -66,9 +69,8 @@ fi
echo "INFO: Snapshot to be used is ${snap_tar}"
-# create tmp directory and unpack snap
-mkdir -p ./tmp
-pushd ./tmp > /dev/null
+# move to snap cache dir and unpack
+pushd ${SNAP_CACHE} > /dev/null
tar xvf ${snap_tar}
# create each network
@@ -86,22 +88,22 @@ for network_def in ${virsh_networks}; do
sudo virsh net-start ${network}
fi
echo "Checking if OVS bridge is missing for network: ${network}"
- if ! ovs-vsctl show | grep "br-${network}"; then
- ovs-vsctl add-br br-${network}
+ if ! sudo ovs-vsctl show | grep "br-${network}"; then
+ sudo ovs-vsctl add-br br-${network}
echo "OVS Bridge created: br-${network}"
if [ "br-${network}" == 'br-admin' ]; then
echo "Configuring IP 192.0.2.99 on br-admin"
sudo ip addr add 192.0.2.99/24 dev br-admin
sudo ip link set up dev br-admin
elif [ "br-${network}" == 'br-external' ]; then
- echo "Configuring IP 192.168.37.99 on br-external"
- sudo ip addr add 192.168.37.99/24 dev br-external
+ echo "Configuring IP 192.168.37.1 on br-external"
+ sudo ip addr add 192.168.37.1/24 dev br-external
sudo ip link set up dev br-external
fi
fi
done
-echo "Virsh networks up: $(virsh net-list)"
+echo "Virsh networks up: $(sudo virsh net-list)"
echo "Bringing up Overcloud VMs..."
virsh_vm_defs=$(ls baremetal*.xml)
@@ -134,9 +136,9 @@ netvirt_url="http://${admin_controller_ip}:8081/restconf/operational/network-top
source overcloudrc
counter=1
while [ "$counter" -le 10 ]; do
- if curl --fail ${admin_controller_ip}:80; then
+ if curl --fail --silent ${admin_controller_ip}:80 > /dev/null; then
echo "Overcloud Horizon is up...Checking if OpenDaylight NetVirt is up..."
- if curl --fail ${netvirt_url} > /dev/null; then
+ if curl --fail --silent -u admin:admin ${netvirt_url} > /dev/null; then
echo "OpenDaylight is up. Overcloud deployment complete"
exit 0
else
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index e3f0f53bc..ff9fbec14 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -672,6 +672,36 @@
build-step-failure-threshold: 'never'
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'apex-deploy-baremetal-os-odl-gluon-noha-{stream}'
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-build-{stream}/.build
+ OPNFV_CLEAN=yes
+ git-revision: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ block: true
+ - trigger-builds:
+ - project: 'functest-apex-{daily-slave}-daily-{stream}'
+ predefined-parameters:
+ DEPLOY_SCENARIO=os-odl-gluon-noha
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+ - trigger-builds:
+ - project: 'yardstick-apex-{slave}-daily-{stream}'
+ predefined-parameters:
+ DEPLOY_SCENARIO=os-odl-gluon-noha
+ block: true
+ same-node: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
# Colorado Build
- job-template:
name: 'apex-build-colorado'
diff --git a/jjb/copper/copper.yml b/jjb/copper/copper.yml
index eff66ba29..ea1af473c 100644
--- a/jjb/copper/copper.yml
+++ b/jjb/copper/copper.yml
@@ -59,4 +59,10 @@
builders:
- shell: |
- echo "Nothing to verify!"
+ #!/bin/bash
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+
+ cd $WORKSPACE/ci
+ shellcheck -f tty tests/*.sh
diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml
index f712adb0a..156740980 100644
--- a/jjb/daisy4nfv/daisy-project-jobs.yml
+++ b/jjb/daisy4nfv/daisy-project-jobs.yml
@@ -182,21 +182,21 @@
name: 'daisy-build-daily-macro'
builders:
- shell:
- !include-raw-escape: ./daisy4nfv-basic.sh
+ !include-raw: ./daisy4nfv-basic.sh
- shell:
- !include-raw-escape: ./daisy4nfv-build.sh
+ !include-raw: ./daisy4nfv-build.sh
- shell:
- !include-raw-escape: ./daisy4nfv-upload-artifact.sh
+ !include-raw: ./daisy4nfv-upload-artifact.sh
- shell:
- !include-raw-escape: ./daisy4nfv-workspace-cleanup.sh
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
- builder:
name: 'daisy-deploy-daily-macro'
builders:
- shell:
- !include-raw-escape: ./daisy4nfv-download-artifact.sh
+ !include-raw: ./daisy4nfv-download-artifact.sh
- shell:
- !include-raw-escape: ./daisy4nfv-deploy.sh
+ !include-raw: ./daisy4nfv-deploy.sh
- builder:
name: 'daisy-test-daily-macro'
diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
index febce6f82..ee82c14b2 100644
--- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
+++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
@@ -169,11 +169,11 @@
name: 'daisy-verify-build-macro'
builders:
- shell:
- !include-raw-escape: ./daisy4nfv-basic.sh
+ !include-raw: ./daisy4nfv-basic.sh
- shell:
- !include-raw-escape: ./daisy4nfv-build.sh
+ !include-raw: ./daisy4nfv-build.sh
- shell:
- !include-raw-escape: ./daisy4nfv-workspace-cleanup.sh
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
#####################################
# parameter macros
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index a2b5aa1ff..49901bea2 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -234,7 +234,7 @@
- string:
name: CLEAN_DOCKER_IMAGES
default: 'false'
- description: 'Remove downloaded docker images (opnfv/functest:*)'
+ description: 'Remove downloaded docker images (opnfv/functest*:*)'
- functest-parameter:
gs-pathname: '{gs-pathname}'
diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh
index b03d4778d..fc277b9ed 100755
--- a/jjb/functest/functest-cleanup.sh
+++ b/jjb/functest/functest-cleanup.sh
@@ -3,14 +3,22 @@
[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
echo "Cleaning up docker containers/images..."
+HOST_ARCH=$(uname -m)
FUNCTEST_IMAGE=opnfv/functest
-# Remove containers along with image opnfv/functest:<none>
+if [ "$HOST_ARCH" = "aarch64" ]; then
+ FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"
+fi
+
+# Remove containers along with image opnfv/functest*:<none>
dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}'))
if [[ -n ${dangling_images} ]]; then
echo " Removing $FUNCTEST_IMAGE:<none> images and their containers..."
for image_id in "${dangling_images[@]}"; do
echo " Removing image_id: $image_id and its containers"
- docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect}
+ containers=$(docker ps -a | grep $image_id | awk '{print $1}')
+ if [[ -n "$containers" ]];then
+ docker rm -f $containers >${redirect}
+ fi
docker rmi $image_id >${redirect}
done
fi
diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh
index afd656f52..abec480dc 100755
--- a/jjb/functest/set-functest-env.sh
+++ b/jjb/functest/set-functest-env.sh
@@ -14,8 +14,9 @@ if [[ ${INSTALLER_TYPE} == 'joid' ]]; then
fi
if [[ ${RC_FILE_PATH} != '' ]] && [[ -f ${RC_FILE_PATH} ]] ; then
+ echo "Credentials file detected: ${RC_FILE_PATH}"
# volume if credentials file path is given to Functest
- rc_file_vol="-v $RC_FILE_PATH:/home/opnfv/functest/conf/openstack.creds"
+ rc_file_vol="-v ${RC_FILE_PATH}:/home/opnfv/functest/conf/openstack.creds"
fi
@@ -70,17 +71,22 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}"
+HOST_ARCH=$(uname -m)
+FUNCTEST_IMAGE="opnfv/functest"
+if [ "$HOST_ARCH" = "aarch64" ]; then
+ FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}"
+fi
-echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
-docker pull opnfv/functest:$DOCKER_TAG >/dev/null
+echo "Functest: Pulling image ${FUNCTEST_IMAGE}:${DOCKER_TAG}"
+docker pull ${FUNCTEST_IMAGE}:$DOCKER_TAG >/dev/null
cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \
${custom_params} ${TESTCASE_OPTIONS} \
- opnfv/functest:${DOCKER_TAG} /bin/bash"
+ ${FUNCTEST_IMAGE}:${DOCKER_TAG} /bin/bash"
echo "Functest: Running docker run command: ${cmd}"
${cmd} >${redirect}
sleep 5
-container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1)
+container_id=$(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | awk '{print $1}' | head -1)
echo "Container ID=${container_id}"
if [ -z ${container_id} ]; then
echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing."
@@ -91,8 +97,8 @@ echo "Starting the container: docker start ${container_id}"
docker start ${container_id}
sleep 5
docker ps >${redirect}
-if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then
- echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..."
+if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then
+ echo "The container ${FUNCTEST_IMAGE} with ID=${container_id} has not been properly started. Exiting..."
exit 1
fi
if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml
index 0aeab4ce4..429828e8e 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
diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml
index 0b6c36e59..dd76538a3 100644
--- a/jjb/releng/testapi-automate.yml
+++ b/jjb/releng/testapi-automate.yml
@@ -21,12 +21,18 @@
- job:
name: 'testapi-mongodb-backup'
- slave-label: 'testresults'
-
parameters:
+ - label:
+ name: SLAVE_LABEL
+ default: 'testresults'
+ description: 'Slave label on Jenkins'
- project-parameter:
- project: '{project}'
- branch: '{branch}'
+ project: 'releng'
+ branch: 'master'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/releng
+ description: 'Git URL to use on this Jenkins Slave'
scm:
- git-scm
diff --git a/jjb/releng/testapi-backup-mongodb.sh b/jjb/releng/testapi-backup-mongodb.sh
index 52957ab12..8dba17beb 100644
--- a/jjb/releng/testapi-backup-mongodb.sh
+++ b/jjb/releng/testapi-backup-mongodb.sh
@@ -26,6 +26,6 @@ if [ $? != 0 ]; then
exit 1
else
echo "Uploading mongodump to artifact $artifact_dir"
- /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://testingrohit/"$artifact_dir"/
+ /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://artifacts.opnfv.org/"$artifact_dir"/
echo "MongoDump can be found at http://artifacts.opnfv.org/$artifact_dir"
fi
diff --git a/jjb/releng/testapi-docker-deploy.sh b/jjb/releng/testapi-docker-deploy.sh
index 04d71f76e..b4e60b09a 100644
--- a/jjb/releng/testapi-docker-deploy.sh
+++ b/jjb/releng/testapi-docker-deploy.sh
@@ -4,7 +4,7 @@ function check() {
# Verify hosted
sleep 5
- cmd=`curl -s --head --request GET http://testresults.opnfv.org/auto/swagger/spec | grep '200 OK' > /dev/null`
+ cmd=`curl -s --head --request GET http://testresults.opnfv.org/test/swagger/spec | grep '200 OK' > /dev/null`
rc=$?
echo $rc
@@ -63,7 +63,7 @@ else
fi
echo "Running a container with the new image"
-sudo docker run -dti -p "8711:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/auto" opnfv/testapi:latest
+sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:latest
if check; then
echo "TestResults Hosted."
@@ -71,7 +71,7 @@ else
echo "TestResults Hosting Failed"
if [[ $(sudo docker images | grep "opnfv/testapi" | grep "old" | awk '{print $3}') ]]; then
echo "Running old Image"
- sudo docker run -dti -p "8711:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/auto" opnfv/testapi:old
+ sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:old
exit 1
fi
fi