diff options
author | Hagop Bozawglanian <hagop.bozawglanian@att.com> | 2019-02-11 19:47:37 +0000 |
---|---|---|
committer | Hagop Bozawglanian <hagop.bozawglanian@att.com> | 2019-02-12 00:42:28 +0000 |
commit | 9328ffef8c14397cb110f010e3afb8a671c0016e (patch) | |
tree | 8172019d82545d00215bb023cc28ccb57aa05a59 /jjb/vnfrqts | |
parent | a77f93070c0a35334eb6cc85553b3f3a0554b76d (diff) |
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 <hagop.bozawglanian@att.com>
Diffstat (limited to 'jjb/vnfrqts')
-rw-r--r-- | jjb/vnfrqts/build-and-upload.yaml | 15 | ||||
-rw-r--r-- | jjb/vnfrqts/post-upload-artifact.sh | 5 | ||||
-rw-r--r-- | jjb/vnfrqts/pre-build-needs.sh (renamed from jjb/vnfrqts/build-needs.sh) | 3 | ||||
-rw-r--r-- | jjb/vnfrqts/vnfrqts-requirements.yaml | 5 |
4 files changed, 23 insertions, 5 deletions
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/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/build-needs.sh b/jjb/vnfrqts/pre-build-needs.sh index 85de18bfa..da1d5e2d1 100644 --- a/jjb/vnfrqts/build-needs.sh +++ b/jjb/vnfrqts/pre-build-needs.sh @@ -1,7 +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 docs
\ No newline at end of file +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 |