From 9328ffef8c14397cb110f010e3afb8a671c0016e Mon Sep 17 00:00:00 2001 From: Hagop Bozawglanian Date: Mon, 11 Feb 2019 19:47:37 +0000 Subject: VNFRQTS - Update JJB to upload artifacts Update the VNFRQTS JJB to upload RAW artifacts to nexus. Change-Id: I34a3239bbe6d0f757c3f71591c8a2c358e67a0e5 Issue-ID: VNFRQTS-538 Signed-off-by: Hagop Bozawglanian --- jjb/vnfrqts/build-and-upload.yaml | 15 +++++++++++++-- jjb/vnfrqts/build-needs.sh | 7 ------- jjb/vnfrqts/post-upload-artifact.sh | 5 +++++ jjb/vnfrqts/pre-build-needs.sh | 8 ++++++++ jjb/vnfrqts/vnfrqts-requirements.yaml | 5 +++-- 5 files changed, 29 insertions(+), 11 deletions(-) delete mode 100644 jjb/vnfrqts/build-needs.sh create mode 100644 jjb/vnfrqts/post-upload-artifact.sh create mode 100644 jjb/vnfrqts/pre-build-needs.sh (limited to 'jjb') diff --git a/jjb/vnfrqts/build-and-upload.yaml b/jjb/vnfrqts/build-and-upload.yaml index b97fd468a..bf804f36a 100644 --- a/jjb/vnfrqts/build-and-upload.yaml +++ b/jjb/vnfrqts/build-and-upload.yaml @@ -6,6 +6,10 @@ name: '{project-name}-{stream}-build-and-upload' + pre_script: '' + post_script: '' + artifact_name: '' + project-type: freestyle concurrent: true node: '{build-node}' @@ -43,8 +47,15 @@ - timed: 'H H * * *' builders: - - shell: '{script}' + - shell: '{obj:pre_script}' + - lf-infra-create-netrc: + server-id: ecomp-raw + - inject: + properties-content: | + ARTIFACT_NAME={artifact_name} + - shell: '{obj:post_script}' + - lf-provide-maven-settings-cleanup publishers: - infra-shiplogs: - maven-version: '{maven-version}' + maven-version: '{maven-version}' \ No newline at end of file diff --git a/jjb/vnfrqts/build-needs.sh b/jjb/vnfrqts/build-needs.sh deleted file mode 100644 index 85de18bfa..000000000 --- a/jjb/vnfrqts/build-needs.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -virtualenv $WORKSPACE/venv-tox -source $WORKSPACE/venv-tox/bin/activate -pip install --upgrade pip -pip install -r etc/requirements.txt -ls -tox -e docs \ No newline at end of file diff --git a/jjb/vnfrqts/post-upload-artifact.sh b/jjb/vnfrqts/post-upload-artifact.sh new file mode 100644 index 000000000..77193128a --- /dev/null +++ b/jjb/vnfrqts/post-upload-artifact.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -e -o pipefail +echo "-n --upload-file $ARTIFACT_NAME https://nexus.onap.org/content/sites/raw/$JOB_BASE_NAME/$GERRIT_BRANCH/$ARTIFACT_NAME" +curl -n --upload-file "$ARTIFACT_NAME" "https://nexus.onap.org/content/sites/raw/$JOB_BASE_NAME/$GERRIT_BRANCH/$ARTIFACT_NAME" \ No newline at end of file diff --git a/jjb/vnfrqts/pre-build-needs.sh b/jjb/vnfrqts/pre-build-needs.sh new file mode 100644 index 000000000..da1d5e2d1 --- /dev/null +++ b/jjb/vnfrqts/pre-build-needs.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +virtualenv $WORKSPACE/venv-tox +source $WORKSPACE/venv-tox/bin/activate +pip install --upgrade pip +pip install -r etc/requirements.txt +ls +tox -e needs \ No newline at end of file diff --git a/jjb/vnfrqts/vnfrqts-requirements.yaml b/jjb/vnfrqts/vnfrqts-requirements.yaml index 9d1a483af..5442aae4c 100644 --- a/jjb/vnfrqts/vnfrqts-requirements.yaml +++ b/jjb/vnfrqts/vnfrqts-requirements.yaml @@ -17,5 +17,6 @@ branch: 'master' jobs: - '{project-name}-{stream}-build-and-upload': - script: - !include-raw-escape: 'build-needs.sh' + pre_script: !include-raw-escape: pre-build-needs.sh + artifact_name: docs/data/needs.json + post_script: !include-raw-escape: post-upload-artifact.sh -- cgit 1.2.3-korg