Merge "Migrate to gerrit-maven-stage (CLAMP)"
[ci-management.git] / jjb / vnfrqts / post-upload-artifact.sh
1 #!/bin/bash
2
3 set -e -o pipefail
4 set -- $ARTIFACT_NAME
5 if [ -z "$ARTIFACT_NAME" ]
6 then
7     echo "ERROR NO ARTIFACTS ENTERED"
8 else
9     if [ -z "$2" ]
10     then
11         cd $WORKSPACE/docs/data
12         echo "-n --upload-file $ARTIFACT_NAME https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$ARTIFACT_NAME"
13         curl -n --upload-file "$ARTIFACT_NAME" "https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$ARTIFACT_NAME"
14     else
15         cd $WORKSPACE/ice_validator/output
16         echo "-n --upload-file $1 https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$1"
17         curl -n --upload-file "$1" "https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$1"
18         echo "-n --upload-file $2 https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$2"
19         curl -n --upload-file "$2" "https://nexus.onap.org/content/sites/raw/$PROJECT_ID/$GERRIT_BRANCH/$2"
20     fi
21 fi