From 251740e57ca109b704c89b156168b306f7ebb36d Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Wed, 19 Sep 2018 16:03:46 +0200 Subject: [fuel] Retire Danube stream - cleanup deploy tooling for old-style artifacts (ISO-based); - remove danube stream, related jobs and hacks required for them; Change-Id: Ib2486173df1ec83f2dbc08a5e9faf950bffb4b06 Signed-off-by: Alexandru Avadanii --- jjb/armband/armband-ci-jobs.yaml | 29 +++++++----------- jjb/fuel/fuel-daily-jobs.yaml | 51 +++++++----------------------- jjb/fuel/fuel-deploy.sh | 47 +++------------------------- jjb/fuel/fuel-download-artifact.sh | 63 -------------------------------------- jjb/global/slave-params.yaml | 8 ----- 5 files changed, 26 insertions(+), 172 deletions(-) delete mode 100755 jjb/fuel/fuel-download-artifact.sh (limited to 'jjb') diff --git a/jjb/armband/armband-ci-jobs.yaml b/jjb/armband/armband-ci-jobs.yaml index 959115ac2..666a0f596 100644 --- a/jjb/armband/armband-ci-jobs.yaml +++ b/jjb/armband/armband-ci-jobs.yaml @@ -208,24 +208,17 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' # Armband uses Fuel's log collection project job, no need to duplicate - - conditional-step: - condition-kind: not - condition-operand: - condition-kind: regex-match - regex: 'danube' - label: '{stream}' - steps: - - trigger-builds: - - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{installer}-deploy-{pod}-daily-{stream}' diff --git a/jjb/fuel/fuel-daily-jobs.yaml b/jjb/fuel/fuel-daily-jobs.yaml index 4bc813cf1..73d33d63b 100644 --- a/jjb/fuel/fuel-daily-jobs.yaml +++ b/jjb/fuel/fuel-daily-jobs.yaml @@ -21,11 +21,6 @@ branch: 'stable/{stream}' disabled: false gs-pathname: '/{stream}' - danube: &danube - stream: danube - branch: 'stable/{stream}' - disabled: false - gs-pathname: '/{stream}' # ------------------------------- # POD, INSTALLER, AND BRANCH MAPPING # ------------------------------- @@ -78,29 +73,14 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-vpp-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - # danube scenario for Dovetail only - - 'os-odl_l2-bgpvpn-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' exclude: - - scenario: os-odl_l2-bgpvpn-ha - stream: master - - scenario: os-odl_l2-bgpvpn-ha - stream: fraser - - scenario: os-ovn-nofeature-noha - stream: danube - - scenario: os-ovn-nofeature-ha - stream: danube - scenario: os-odl-ovs-noha stream: fraser - scenario: os-nosdn-vpp-ha stream: fraser - scenario: os-nosdn-vpp-noha stream: fraser - - scenario: os-nosdn-vpp-ha - stream: danube - - scenario: os-nosdn-vpp-noha - stream: danube jobs: - 'fuel-{scenario}-{pod}-daily-{stream}' @@ -223,24 +203,17 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - - conditional-step: - condition-kind: not - condition-operand: - condition-kind: regex-match - regex: 'danube' - label: '{stream}' - steps: - - trigger-builds: - - project: 'fuel-collect-logs-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'fuel-collect-logs-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' publishers: - email-fuel-ptl @@ -290,8 +263,6 @@ - description-setter: description: "Built on $NODE_NAME" - track-begin-timestamp - - shell: - !include-raw-escape: ./fuel-download-artifact.sh - shell: !include-raw-escape: ./fuel-deploy.sh diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index f20827adc..9d71f0833 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-license-identifier: Apache-2.0 ############################################################################## -# Copyright (c) 2017 Ericsson AB, Mirantis Inc., Enea Software AB and others. +# Copyright (c) 2018 Ericsson AB, Mirantis Inc., Enea Software AB and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at @@ -12,38 +12,12 @@ set -o pipefail export TERM="vt220" -if [[ "$BRANCH" =~ 'danube' ]]; then - # source the file so we get OPNFV vars - # shellcheck disable=SC1091 - source latest.properties - - # echo the info about artifact that is used during the deployment - echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" - - # for Danube deployments (no artifact for current master or newer branches) - # checkout the commit that was used for building the downloaded artifact - # to make sure the ISO and deployment mechanism uses same versions - echo "Checking out ${OPNFV_GIT_SHA1}" - git checkout "${OPNFV_GIT_SHA1}" --quiet - - # releng wants us to use nothing else but opnfv.iso for now. We comply. - ISO_FILE_ARG="-i file://${WORKSPACE}/opnfv.iso" -fi - -# shellcheck disable=SC2153 -if [[ "${JOB_NAME}" =~ 'verify' ]]; then - # set simplest scenario for virtual deploys to run for verify - DEPLOY_SCENARIO="os-nosdn-nofeature-noha" -fi - # set deployment parameters export TMPDIR=${HOME}/tmpdir # shellcheck disable=SC2153 LAB_NAME=${NODE_NAME/-*} # shellcheck disable=SC2153 POD_NAME=${NODE_NAME/*-} -# Armband might override LAB_CONFIG_URL, all others use the default -LAB_CONFIG_URL=${LAB_CONFIG_URL:-'ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab'} # Fuel requires deploy script to be ran with sudo, Armband does not SUDO='sudo -E' @@ -69,26 +43,14 @@ mkdir -p "${TMPDIR}" chmod a+x "${HOME}" "${TMPDIR}" cd "${WORKSPACE}" || exit 1 -if [[ "$BRANCH" =~ (danube|euphrates) ]]; then - if [[ "${LAB_CONFIG_URL}" =~ ^(git|ssh):// ]]; then - echo "Cloning securedlab repo ${BRANCH}" - LOCAL_CFG="${TMPDIR}/securedlab" - rm -rf "${LOCAL_CFG}" - git clone --quiet --branch "${BRANCH}" "${LAB_CONFIG_URL}" "${LOCAL_CFG}" - LAB_CONFIG_ARG="-b file://${LOCAL_CFG}" - BRIDGE_ARG="-B ${BRIDGE:-pxebr}" - else - LAB_CONFIG_ARG="-b ${LAB_CONFIG_URL}" - fi -fi # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" # construct the command -DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh ${LAB_CONFIG_ARG:-} \ - -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} ${ISO_FILE_ARG:-} \ - -S ${TMPDIR} ${BRIDGE_ARG:-} \ +DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh \ + -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \ + -S ${TMPDIR} \ -L ${WORKSPACE}/${FUEL_LOG_FILENAME}" # log info to console @@ -97,7 +59,6 @@ echo "--------------------------------------------------------" echo "Scenario: ${DEPLOY_SCENARIO}" echo "Lab: ${LAB_NAME}" echo "POD: ${POD_NAME}" -[[ "${BRANCH}" =~ 'danube' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" echo echo "Starting the deployment using ${INSTALLER_TYPE}. This could take some time..." echo "--------------------------------------------------------" diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh deleted file mode 100755 index 02ca10305..000000000 --- a/jjb/fuel/fuel-download-artifact.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o pipefail - -# disable Fuel ISO download for master branch -[[ ! "$BRANCH" =~ (danube) ]] && exit 0 - -# use proxy url to replace the normal URL, or googleusercontent.com will be blocked randomly -[[ "$NODE_NAME" =~ (zte) ]] && GS_URL=${GS_BASE_PROXY%%/*}/$GS_URL - -# get the latest.properties file in order to get info regarding latest artifact -echo "Downloading http://$GS_URL/latest.properties" -curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties - -# check if we got the file -[[ -f $WORKSPACE/latest.properties ]] || exit 1 - -# source the file so we get artifact metadata -source $WORKSPACE/latest.properties - -# echo the info about artifact that is used during the deployment -OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/} -echo "Using $OPNFV_ARTIFACT for deployment" - -# check if we already have the ISO to avoid redownload -ISOSTORE="/iso_mount/opnfv_ci/${BRANCH##*/}" -if [[ -f "$ISOSTORE/$OPNFV_ARTIFACT" ]]; then - echo "ISO exists locally. Skipping the download and using the file from ISO store" - ln -s $ISOSTORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso - echo "--------------------------------------------------------" - echo - ls -al $WORKSPACE/opnfv.iso - echo - echo "--------------------------------------------------------" - echo "Done!" - exit 0 -fi - -[[ "$NODE_NAME" =~ (zte) ]] && OPNFV_ARTIFACT_URL=${GS_BASE_PROXY%%/*}/$OPNFV_ARTIFACT_URL - -# log info to console -echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL" -echo "This could take some time..." -echo "--------------------------------------------------------" -echo - -# download the file -curl -L -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 - -# list the file -ls -al $WORKSPACE/opnfv.iso - -echo -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/global/slave-params.yaml b/jjb/global/slave-params.yaml index 5b9ce413c..e83a10265 100644 --- a/jjb/global/slave-params.yaml +++ b/jjb/global/slave-params.yaml @@ -272,10 +272,6 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' - parameter: name: 'auto-baremetal-defaults' @@ -408,10 +404,6 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' - parameter: name: 'joid-virtual-defaults' -- cgit 1.2.3-korg