name: '{project-name}-{stream}-build-and-upload'
 
+    pre_script: ''
+    post_script: ''
+    artifact_name: ''
+
     project-type: freestyle
     concurrent: true
     node: '{build-node}'
       - 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
 
--- /dev/null
+#!/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
 
 #!/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
 
           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