Add job to upload files for documentation to nexus.
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: Ia67a7b0572e7e7e0ac1aa4514e1370db7135588b
Issue-ID: VNFSDK-696
diff --git a/jjb/vnfsdk/upload-artifact.sh b/jjb/vnfsdk/upload-artifact.sh
new file mode 100644
index 0000000..a307ad6
--- /dev/null
+++ b/jjb/vnfsdk/upload-artifact.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -e -o pipefail
+if [ -z "$PROJECT_ID" ]
+then
+ echo "ERROR: NO PROJECT ID ENTERED"
+ exit 1
+else
+ cd $WORKSPACE/csarvalidation/target/generated-docs/Honolulu
+ for file in *.csv ; do
+ echo "-n --upload-file $file https://nexus.onap.org/content/sites/raw/$PROJECT_ID/Honolulu/$file"
+ curl -n --upload-file "$file" "https://nexus.onap.org/content/sites/raw/$PROJECT_ID/Honolulu/$file"
+ done
+ exit 0
+fi
diff --git a/jjb/vnfsdk/vnfsdk-validation.yaml b/jjb/vnfsdk/vnfsdk-validation.yaml
index d7f4b27..fb4d2b7 100644
--- a/jjb/vnfsdk/vnfsdk-validation.yaml
+++ b/jjb/vnfsdk/vnfsdk-validation.yaml
@@ -40,7 +40,7 @@
project-name: 'vnfsdk-validation'
branch: 'master'
mvn-settings: 'vnfsdk-validation-settings'
- mvn-goals: 'clean install'
+ mvn-goals: 'clean install -DskipDocsGeneration=false'
mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
- project:
@@ -63,3 +63,17 @@
build-node: ubuntu1804-builder-4c-4g
branch: 'master'
mvn-settings: 'vnfsdk-validation-settings'
+
+- project:
+ name: vnfsdk-validation-upload-docs
+ project: 'vnfsdk/validation'
+ project-name: 'vnfsdk-requirements'
+ mvn-settings: 'vnfsdk-validation-settings'
+ mvn-global-settings: 'global-settings'
+ stream:
+ - 'master':
+ branch: 'master'
+ jobs:
+ - '{project-name}-{stream}-build-and-upload':
+ project_id: org.onap.vnfsdk.refrepo
+ post_script: !include-raw-escape: ./upload-artifact.sh