From: Jingzhao Date: Mon, 13 May 2019 06:12:08 +0000 (+0800) Subject: Add compass task for iec CI/CD in community X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=refs%2Fchanges%2F75%2F675%2F1;p=ci-management.git Add compass task for iec CI/CD in community For integrating the compass into IEC CI platform, the task about it in CI scripts was added. Then, the compass will deploy 3 virtual hosts on the host. And for function checking, it will be updated in the future. Change-Id: I57472de5c0eacf5134d7fa9152993bb9475b413d Signed-off-by: Jingzhao --- diff --git a/jjb/iec/iec-compass-build.sh b/jjb/iec/iec-compass-build.sh new file mode 100755 index 0000000..64cea9e --- /dev/null +++ b/jjb/iec/iec-compass-build.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +echo "begin build compass" +git clone https://github.com/opnfv/compass4nfv.git + +cd compass4nfv + +COMPASS_WORK_DIR=$WORKSPACE/../compass-work +mkdir -p $COMPASS_WORK_DIR +ln -s $COMPASS_WORK_DIR work + +sudo docker rm -f `docker ps | grep compass | cut -f1 -d' '` || true + +curl -s http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true + +./build.sh + +exit 0 diff --git a/jjb/iec/iec-compass-deploy.sh b/jjb/iec/iec-compass-deploy.sh new file mode 100755 index 0000000..e3dd4e8 --- /dev/null +++ b/jjb/iec/iec-compass-deploy.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +cd compass4nfv + +echo "Compass Deploy successful" +exit 0 diff --git a/jjb/iec/iec-compass-destroy.sh b/jjb/iec/iec-compass-destroy.sh new file mode 100755 index 0000000..5f0a072 --- /dev/null +++ b/jjb/iec/iec-compass-destroy.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +rm -rf compass4nfv +exit 0 diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 391cdfa..b0cc699 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -24,6 +24,9 @@ - fuel-virtual: slave-label: 'aarch64_dev' scenario: 'k8-calico-iec-noha' + - compass-virtual: + slave-label: 'aarch64_dev' + scenario: 'k8-calico-iec-noha' jobs: - 'iec-{deploy-type}-daily-{stream}' @@ -145,8 +148,26 @@ choosing-strategy: default builders: - - shell: - !include-raw-escape: ./iec-fuel-deploy.sh + - description-setter: + description: "POD: $NODE_NAME" + - conditional-step: + condition-kind: regex-match + regex: 'compass-.*' + label: '{deploy-type}' + steps: + - shell: + !include-raw-escape: ./iec-compass-build.sh + - shell: + !include-raw-escape: ./iec-compass-deploy.sh + - shell: + !include-raw-escape: ./iec-compass-destroy.sh + - conditional-step: + condition-kind: regex-match + regex: 'fuel-.*' + label: '{deploy-type}' + steps: + - shell: + !include-raw-escape: ./iec-fuel-deploy.sh publishers: - email: @@ -167,3 +188,7 @@ name: 'iec-fuel-baremetal-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'iec-compass-virtual-daily-master-trigger' + triggers: + - timed: '0 13 * * *'