engine: Refactor kubernetes release jobs 69/5369/6
authorFatih Degirmenci <fatih.degirmenci@est.tech>
Fri, 10 Jul 2020 19:47:40 +0000 (19:47 +0000)
committerFatih Degirmenci <fatih.degirmenci@est.tech>
Sat, 11 Jul 2020 20:34:59 +0000 (20:34 +0000)
Change-Id: I28c8f08d16687ffddc8f9d6f491ef04ec1b07d53

33 files changed:
jjb/engine/engine-jobs/engine-verify-deploy-test.yaml [moved from jjb/engine/verify-jobs/engine-verify-deploy-test.yaml with 100% similarity]
jjb/engine/engine-jobs/engine-verify-package.yaml [moved from jjb/engine/verify-jobs/engine-verify-package.yaml with 100% similarity]
jjb/engine/engine-jobs/engine-verify-tox.yaml [moved from jjb/engine/verify-jobs/engine-verify-tox.yaml with 100% similarity]
jjb/engine/engine-macros.yaml
jjb/engine/ironic-jobs/ironic-verify-deploy-test.yaml [moved from jjb/engine/verify-jobs/ironic-verify-deploy-test.yaml with 100% similarity]
jjb/engine/ironic-jobs/ironic-verify-package.yaml [moved from jjb/engine/verify-jobs/ironic-verify-package.yaml with 100% similarity]
jjb/engine/ironic-jobs/ironic-verify-tox.yaml [moved from jjb/engine/verify-jobs/ironic-verify-tox.yaml with 100% similarity]
jjb/engine/kubernetes-jobs/kubernetes-release-deploy-test.yaml [moved from jjb/engine/kubernetes-periodic-jobs/kubernetes-offline-deploy-test-jobs.yaml with 51% similarity]
jjb/engine/kubernetes-jobs/kubernetes-release-jobs.yaml [moved from jjb/engine/kubernetes-periodic-jobs/kubernetes-offline-release-jobs.yaml with 53% similarity]
jjb/engine/kubernetes-jobs/kubernetes-verify-deploy-test.yaml [moved from jjb/engine/verify-jobs/kubernetes-verify-deploy-test.yaml with 100% similarity]
jjb/engine/kubernetes-jobs/kubernetes-verify-package.yaml [moved from jjb/engine/verify-jobs/kubernetes-verify-package.yaml with 100% similarity]
jjb/engine/kubernetes-jobs/kubernetes-verify-tox.yaml [moved from jjb/engine/verify-jobs/kubernetes-verify-tox.yaml with 100% similarity]
jjb/engine/onap-jobs/onap-verify-deploy-test.yaml [moved from jjb/engine/verify-jobs/onap-verify-deploy-test.yaml with 100% similarity]
jjb/engine/onap-jobs/onap-verify-package.yaml [moved from jjb/engine/verify-jobs/onap-verify-package.yaml with 100% similarity]
jjb/engine/onap-jobs/onap-verify-tox.yaml [moved from jjb/engine/verify-jobs/onap-verify-tox.yaml with 100% similarity]
jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml [deleted file]
jjb/engine/onap-periodic-jobs/onap-online-deploy-test-jobs.yaml [deleted file]
jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml [deleted file]
jjb/engine/onap-periodic-jobs/onap-parameter-macros.yaml [deleted file]
jjb/engine/onap-periodic-jobs/scripts/deploy.sh [deleted file]
jjb/engine/onap-periodic-jobs/scripts/onap-healthcheck.sh [deleted file]
jjb/engine/onap-periodic-jobs/scripts/oom-healthcheck.sh [deleted file]
jjb/engine/onap-periodic-jobs/scripts/package.sh [deleted file]
jjb/engine/onap-periodic-jobs/scripts/promote.sh [deleted file]
jjb/engine/openstack-jobs/openstack-verify-deploy-test.yaml [moved from jjb/engine/verify-jobs/openstack-verify-deploy-test.yaml with 100% similarity]
jjb/engine/openstack-jobs/openstack-verify-package.yaml [moved from jjb/engine/verify-jobs/openstack-verify-package.yaml with 100% similarity]
jjb/engine/openstack-jobs/openstack-verify-tox.yaml [moved from jjb/engine/verify-jobs/openstack-verify-tox.yaml with 100% similarity]
jjb/engine/scripts/deploy.sh
jjb/engine/scripts/functest.sh
jjb/engine/scripts/generate-change-metadata.sh
jjb/engine/scripts/generate-release-metadata.sh [new file with mode: 0755]
jjb/engine/scripts/package.sh
jjb/engine/scripts/promote.sh

index 1c1376e280cbe51436b3379b0cb9a58e10746282..32d44e033d0b7ddb00c195d2329e5359d2d9e354 100644 (file)
       - shell:
           !include-raw: ./scripts/generate-change-metadata.sh
 
       - shell:
           !include-raw: ./scripts/generate-change-metadata.sh
 
+- builder:
+    name: 'generate-release-metadata-macro'
+    builders:
+      - shell:
+          !include-raw: ./scripts/generate-release-metadata.sh
+
 - builder:
     name: 'promote-macro'
     builders:
 - builder:
     name: 'promote-macro'
     builders:
similarity index 51%
rename from jjb/engine/kubernetes-periodic-jobs/kubernetes-offline-deploy-test-jobs.yaml
rename to jjb/engine/kubernetes-jobs/kubernetes-release-deploy-test.yaml
index a386984ff6248003b320be825fa401b202632aff..f7041d8652bc74907cffabeab69b46bf9683b3ee 100644 (file)
 # ============LICENSE_END=========================================================
 
 - project:
 # ============LICENSE_END=========================================================
 
 - project:
-    name: 'kubernetes-deploy-test-offline'
+    name: 'kubernetes-deploy-test'
 
 
-    project: 'kubernetes-deploy-test-offline'
+    project: 'kubernetes-deploy-test'
 
     stream:
       - 'master':
 
     stream:
       - 'master':
-          branch: '{stream}'
+          branch: 'master'
+          deploy-scenario: 'k8-multus-plugins'
+      - '1_17':
+          branch: '1.17'
+          deploy-scenario: 'k8-multus-plugins'
+      - '1_16':
+          branch: '1.16'
+          deploy-scenario: 'k8-calico-nofeature'
+      - '1_15':
+          branch: '1.15'
+          deploy-scenario: 'k8-calico-nofeature'
 
     distro:
       - ubuntu1804
 
 
     distro:
       - ubuntu1804
 
-    deploy-scenario:
-      - k8-multus-plugins
-
-    type:
-      - baremetal:
-          pod-name: est-baremetal
-          provisioner-type: bifrost
-          installer-type: kubespray
-          slave-label: baremetal-deploy
-          yardstick-dispatcher: 'file'
-
     environment-type:
       - offline:
           disabled: false
           execution-mode: offline-deployment
           pdf: 'file:///opt/engine/offline/git/hwconfig/pods'
           idf: 'file:///opt/engine/offline/git/hwconfig/pods'
     environment-type:
       - offline:
           disabled: false
           execution-mode: offline-deployment
           pdf: 'file:///opt/engine/offline/git/hwconfig/pods'
           idf: 'file:///opt/engine/offline/git/hwconfig/pods'
+          openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
 
     phase:
       - deploy:
           build-timeout: 60
 
     phase:
       - deploy:
           build-timeout: 60
+          execution-mode: offline-deployment
       - functest:
           build-timeout: 210
       - functest:
           build-timeout: 210
+          execution-mode: online-test
       - yardstick:
           build-timeout: 30
       - yardstick:
           build-timeout: 30
+          execution-mode: online-test
 
     jobs:
 
     jobs:
-      - '{deploy-scenario}-{environment-type}-{distro}-{type}-periodic'
-      - 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
+      - 'kubernetes-release-{environment-type}-deploy-test-{distro}-baremetal-{stream}'
+      - 'kubernetes-release-{environment-type}-{phase}-{distro}-baremetal-{stream}'
 
 - job-template:
 
 - job-template:
-    name: '{deploy-scenario}-{environment-type}-{distro}-{type}-periodic'
+    name: 'kubernetes-release-{environment-type}-deploy-test-{distro}-baremetal-{stream}'
 
     project-type: multijob
 
     disabled: '{obj:disabled}'
 
 
     project-type: multijob
 
     disabled: '{obj:disabled}'
 
-    concurrent: true
+    node: baremetal-deploy
+
+    concurrent: false
 
     parameters:
 
     parameters:
-      - label:
-          name: SLAVE_LABEL
-          default: '{slave-label}'
-          description: 'Slave label to schedule this job on.'
-      - string:
-          name: PROVISIONER_TYPE
-          default: '{provisioner-type}'
-          description: 'Provisioner type to use'
-      - string:
-          name: INSTALLER_TYPE
-          default: '{installer-type}'
-          description: 'Installer type to use'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: '{deploy-scenario}'
-          description: 'Scenario to deploy and test'
       - string:
           name: PDF
           default: '{pdf}/${{NODE_NAME}}-pdf.yml'
       - string:
           name: PDF
           default: '{pdf}/${{NODE_NAME}}-pdf.yml'
-          description: 'PDF file to use for deployment'
+          description: 'PDF file to use for deployment. DO NOT MODIFY!'
       - string:
           name: IDF
           default: '{idf}/${{NODE_NAME}}-idf.yml'
       - string:
           name: IDF
           default: '{idf}/${{NODE_NAME}}-idf.yml'
-          description: 'IDF file to use for deployment'
+          description: 'IDF file to use for deployment. DO NOT MODIFY!'
       - string:
       - string:
-          name: CI_LOOP
-          default: 'periodic'
-          description: 'CI loop type'
+          name: SLAVE_LABEL
+          default: 'baremetal-deploy'
+          description: 'Type of the slave'
 
     properties:
       - logrotate
       - throttle:
           max-per-node: 1
 
     properties:
       - logrotate
       - throttle:
           max-per-node: 1
-          max-total: 3
+          max-total: 1
           option: project
 
     wrappers:
       - build-timeout:
           timeout: 300
       - mask-passwords
           option: project
 
     wrappers:
       - build-timeout:
           timeout: 300
       - mask-passwords
-      - fix-workspace-permissions
+      - pre-scm-buildstep:
+          failOnError: true
+          buildsteps:
+            - shell: |
+                #!/bin/bash
+                sudo chown -R $USER:$USER $WORKSPACE || exit 1
+                # offline nodes can not resolve Nordix Artifactory and Gerrit
+                if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
+                  echo "Info  : Offline deployment. Adding City OpenStack Endpoint, Nordix Artifactory and Gerrit Public IP to /etc/hosts"
+                  sudo sed -i 's/^search/# search/' /etc/resolv.conf
+                  sudo bash -c "cat << EOF >> /etc/hosts
+                # managed by engine
+                91.106.198.25 artifactory.nordix.org
+                91.106.198.142 gerrit.nordix.org
+                86.107.242.50 fra1.citycloud.com
+                # managed by engine
+                EOF"
+                  # we need to get rid of search domain as well
+                  sudo sed -i 's/^search/# search/' /etc/resolv.conf
+                fi
+
+    scm:
+      - git:
+          url: https://gerrit.nordix.org/infra/engine.git
+          branches:
+            - master
+          timeout: 15
+          wipe-workspace: true
 
     builders:
       - description-setter:
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
+          description: $DEPLOY_SCENARIO
       - 'download-artifact-macro'
       - multijob:
       - 'download-artifact-macro'
       - multijob:
-          name: "Offline Deployment on {type}"
+          name: "Offline Deployment on Baremetal using {deploy-scenario}"
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
-            - name: 'kubernetes-{environment-type}-deploy-{distro}-{type}-periodic'
+            - name: 'kubernetes-release-{environment-type}-deploy-{distro}-baremetal-{stream}'
               current-parameters: true
               current-parameters: true
+              git-revision: true
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
-          name: functest
+          name: Functional Testing
           condition: ALWAYS
           projects:
           condition: ALWAYS
           projects:
-            - name: 'kubernetes-{environment-type}-functest-{distro}-{type}-periodic'
+            - name: 'kubernetes-release-{environment-type}-functest-{distro}-baremetal-{stream}'
               current-parameters: true
               current-parameters: true
+              git-revision: false
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
-          name: yardstick
+          name: Platform Benchmarking
           condition: ALWAYS
           projects:
           condition: ALWAYS
           projects:
-            - name: 'kubernetes-{environment-type}-yardstick-{distro}-{type}-periodic'
+            - name: 'kubernetes-release-{environment-type}-yardstick-{distro}-baremetal-{stream}'
               current-parameters: true
               current-parameters: true
+              git-revision: false
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
 
 - job-template:
               node-parameters: true
               kill-phase-on: FAILURE
               abort-all-job: true
 
 - job-template:
-    name: 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
+    name: 'kubernetes-release-{environment-type}-{phase}-{distro}-baremetal-{stream}'
 
     disabled: '{obj:disabled}'
 
     parameters:
 
     disabled: '{obj:disabled}'
 
     parameters:
+      - string:
+          name: EXECUTION_MODE
+          default: '{execution-mode}'
+          description: 'Execution mode'
       - string:
           name: TEST_REPO_URL
           default: 'https://gerrit.nordix.org/infra/test.git'
       - string:
           name: TEST_REPO_URL
           default: 'https://gerrit.nordix.org/infra/test.git'
           description: 'Test suite to run'
       - string:
           name: YARDSTICK_DISPATCHER
           description: 'Test suite to run'
       - string:
           name: YARDSTICK_DISPATCHER
-          default: '{yardstick-dispatcher}'
+          default: 'file'
           description: 'Dispatcher to use for Yardstick reporting'
 
     properties:
       - logrotate
       - throttle:
           max-per-node: 1
           description: 'Dispatcher to use for Yardstick reporting'
 
     properties:
       - logrotate
       - throttle:
           max-per-node: 1
-          max-total: 3
+          max-total: 1
           option: project
 
     wrappers:
           option: project
 
     wrappers:
           timeout: '{build-timeout}'
       - mask-passwords
       - fix-workspace-permissions
           timeout: '{build-timeout}'
       - mask-passwords
       - fix-workspace-permissions
+      - credentials-binding:
+          - file:
+              credential-id: '{openrc-credentials-file}'
+              variable: OPENRC_FILE
 
     builders:
       - description-setter:
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
+          description: $DEPLOY_SCENARIO
       - '{phase}-macro'
       - '{phase}-macro'
similarity index 53%
rename from jjb/engine/kubernetes-periodic-jobs/kubernetes-offline-release-jobs.yaml
rename to jjb/engine/kubernetes-jobs/kubernetes-release-jobs.yaml
index 0bfd4fb96e70a343bda2c690636c03c1de956719..9aad833d8a31cf95ca184b606bc70d52ba22aa7a 100644 (file)
 # ============LICENSE_END=========================================================
 
 - project:
 # ============LICENSE_END=========================================================
 
 - project:
-    name: 'kubernetes-release-offline'
+    name: 'kubernetes-release'
 
 
-    project: 'kubernetes-release-offline'
+    project: 'kubernetes-release'
+
+    stream:
+      - 'master':
+          branch: 'master'
+          deploy-scenario: 'k8-multus-plugins'
+          promote-stack: 'false'
+      - '1_17':
+          branch: '1.17'
+          deploy-scenario: 'k8-multus-plugins'
+          promote-stack: 'true'
+      - '1_16':
+          branch: '1.16'
+          deploy-scenario: 'k8-calico-nofeature'
+          promote-stack: 'true'
+      - '1_15':
+          branch: '1.15'
+          deploy-scenario: 'k8-calico-nofeature'
+          promote-stack: 'true'
 
     environment-type:
       - offline:
 
     environment-type:
       - offline:
           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
 
     jobs:
           openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
 
     jobs:
-      - 'kubernetes-periodic-release-{environment-type}-{distro}'
-      - 'kubernetes-periodic-package-{distro}'
-      - 'kubernetes-periodic-promote-{distro}'
+      - 'kubernetes-release-{distro}-{stream}'
+      - 'kubernetes-package-{distro}-{stream}'
+      - 'kubernetes-promote-{distro}-{stream}'
 
 - job-template:
 
 - job-template:
-    name: 'kubernetes-periodic-release-{environment-type}-{distro}'
+    name: 'kubernetes-release-{distro}-{stream}'
 
     project-type: multijob
 
     disabled: '{obj:disabled}'
 
 
     project-type: multijob
 
     disabled: '{obj:disabled}'
 
+    node: 'engine-package-{distro}-fra'
+
     concurrent: false
 
     parameters:
       - string:
     concurrent: false
 
     parameters:
       - string:
-          name: EXECUTION_MODE
-          default: '{execution-mode}'
-          description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment'
+          name: BRANCH
+          default: '{branch}'
+          description: 'Branch the job is created for. DO NOT MODIFY!'
       - string:
           name: DISTRO
           default: '{distro}'
       - string:
           name: DISTRO
           default: '{distro}'
-          description: 'Distribution to use for configuring target nodes (networking etc.)'
-      - string:
-          name: INSTALLER_TYPE
-          default: 'kubespray'
-          description: 'Installer type to use'
+          description: 'Distribution to provision and configre target nodes with. DO NOT MODIFY!'
       - string:
           name: DEPLOY_SCENARIO
       - string:
           name: DEPLOY_SCENARIO
-          default: 'k8-multus-plugins'
-          description: 'Scenario to deploy and test'
+          default: '{deploy-scenario}'
+          description: 'Scenario to test change with. This depends on the branch of the stack.'
+      - string:
+          name: CI_LOOP
+          default: 'release'
+          description: 'CI loop type. DO NOT MODIFY!'
       - string:
           name: VERBOSITY
       - string:
           name: VERBOSITY
-          default: 'true'
-          description: 'Verbosity setting for the engine - true or false - default is false'
+          default: 'false'
+          description: 'Engine verbosity'
       - string:
       - string:
-          name: ARTIFACTS_TO_UPLOAD
-          default: "k8s-installer-ubuntu1804.bsx offline-package.tgz"
-          description: 'Artifacts to upload'
+          name: NORDIX_ENGINE_VERSION
+          default: 'master'
+          description: 'Engine version of engine to package, deploy, test, release'
       - string:
       - string:
-          name: ARTIFACT_TO_DOWNLOAD
-          default: "k8s-installer-ubuntu1804.bsx"
-          description: 'Artifact to download'
+          name: STACK_TYPE
+          default: 'kubernetes'
+          description: 'Stack to package, deploy, test, release'
       - string:
       - string:
-          name: NORDIX_ARM_PUBLIC_IP
-          default: '91.106.198.25'
-          description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name'
+          name: STACK_VERSION
+          default: '{branch}'
+          description: 'Stack version of engine to package, deploy, test, release'
       - string:
       - string:
-          name: NORDIX_ARM_HTTPS_URL
-          default: 'https://artifactory.nordix.org/artifactory'
-          description: 'URL to Nordix Artifactory'
+          name: NORDIX_KUBESPRAY_VERSION
+          default: '{branch}'
+          description: 'Kubespray version of engine to package, deploy, test, release'
       - string:
       - string:
-          name: NORDIX_ARM_REPO
-          default: 'nordix-kubernetes'
-          description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
+          name: NORDIX_BIFROST_VERSION
+          default: 'master'
+          description: 'Bifrost version of engine to package, deploy, test, release'
       - string:
       - string:
-          name: CI_LOOP
-          default: 'periodic'
-          description: 'CI loop type'
-      - label:
-          name: SLAVE_LABEL
-          default: 'engine-package-ubuntu1804-fra'
-          description: 'Slave label to schedule this job on.'
+          name: NORDIX_HEAT_VERSION
+          default: 'master'
+          description: 'Heat version of engine to package, deploy, test, release'
+      - string:
+          name: PROMOTE_STACK
+          default: '{promote-stack}'
+          description: 'Heat version of engine to package, deploy, test, release'
 
     properties:
       - logrotate
 
     properties:
       - logrotate
-      - build-blocker:
-          use-build-blocker: true
-          blocking-jobs:
-            - 'engine-verify-package-.*'
-            - 'onap-sdc-periodic-release-offline-.*'
-            - 'onap-so-periodic-release-offline-.*'
-            - 'kubernetes-periodic-release-offline-.*'
-          block-level: 'NODE'
+      # NOTE (fdegir): throttle categories are controlled in jenkins global configuration
+      - throttle:
+          enabled: true
+          max-per-node: 1
+          max-total: 1
+          option: category
+          categories:
+            - engine-verify-package
 
     wrappers:
       - build-timeout:
           timeout: 600
       - mask-passwords
       - fix-workspace-permissions
 
     wrappers:
       - build-timeout:
           timeout: 600
       - mask-passwords
       - fix-workspace-permissions
+      - openstack:
+          single-use: True
 
     triggers:
       - pollscm:
 
     triggers:
       - pollscm:
-          cron: "H 0,8,16 * * *"
+          cron: "#H 0,8,16 * * *"
 
     scm:
       - git:
 
     scm:
       - git:
           wipe-workspace: true
 
     builders:
           wipe-workspace: true
 
     builders:
+      - 'generate-release-metadata-macro'
+      - inject:
+          properties-file: "$WORKSPACE/release.properties"
       - 'generate-ssh-keypair-macro'
       - 'generate-ssh-keypair-macro'
-      - 'generate-build-metadata-macro'
       - 'wait-pkg-mgr-macro'
       - multijob:
       - 'wait-pkg-mgr-macro'
       - multijob:
-          name: package
+          name: Packaging
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
-            - name: 'kubernetes-periodic-package-{distro}'
-              current-parameters: true
+            - name: 'kubernetes-package-{distro}-{stream}'
+              current-parameters: false
               git-revision: true
               node-parameters: true
               git-revision: true
               node-parameters: true
-              property-file: "$WORKSPACE/build.properties"
+              property-file: "$WORKSPACE/release.properties"
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
-          name: release test k8-multus-plugins
+          name: Release Test {deploy-scenario}
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
-            - name: 'k8-multus-plugins-offline-{distro}-baremetal-periodic'
+            - name: 'kubernetes-release-offline-deploy-test-{distro}-baremetal-{stream}'
               current-parameters: false
               current-parameters: false
-              git-revision: false
+              git-revision: true
               node-parameters: false
               node-parameters: false
-              property-file: "$WORKSPACE/build.properties"
-              predefined-parameters: |
-                EXECUTION_MODE=$EXECUTION_MODE
-                NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP
-                ARTIFACT_TO_DOWNLOAD=$ARTIFACT_TO_DOWNLOAD
-                VERBOSITY=$VERBOSITY
+              property-file: "$WORKSPACE/release.properties"
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
               kill-phase-on: FAILURE
               abort-all-job: true
       - multijob:
-          name: promotion
+          name: Promotion
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
           condition: SUCCESSFUL
           execution-type: PARALLEL
           projects:
-            - name: 'kubernetes-periodic-promote-{distro}'
-              current-parameters: true
+            - name: 'kubernetes-promote-{distro}-{stream}'
+              current-parameters: false
               git-revision: true
               node-parameters: true
               git-revision: true
               node-parameters: true
-              property-file: "$WORKSPACE/build.properties"
+              property-file: "$WORKSPACE/release.properties"
               kill-phase-on: FAILURE
               abort-all-job: true
 
 - job-template:
               kill-phase-on: FAILURE
               abort-all-job: true
 
 - job-template:
-    name: 'kubernetes-periodic-package-{distro}'
+    name: 'kubernetes-package-{distro}-{stream}'
 
     disabled: '{obj:disabled}'
 
     concurrent: false
 
 
     disabled: '{obj:disabled}'
 
     concurrent: false
 
+    parameters:
+      - string:
+          name: EXECUTION_MODE
+          default: 'packaging'
+          description: 'Execution mode to run engine'
+
     properties:
       - logrotate
 
     properties:
       - logrotate
 
       - 'upload-artifact-macro'
 
 - job-template:
       - 'upload-artifact-macro'
 
 - job-template:
-    name: 'kubernetes-periodic-promote-{distro}'
+    name: 'kubernetes-promote-{distro}-{stream}'
 
     disabled: '{obj:disabled}'
 
 
     disabled: '{obj:disabled}'
 
diff --git a/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml b/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml
deleted file mode 100644 (file)
index d7aaeaf..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-- builder:
-    name: 'onap-package-builder-macro'
-    builders:
-      - shell:
-          !include-raw: ./scripts/package.sh
-
-- builder:
-    name: 'onap-deploy-builder-macro'
-    builders:
-      - shell:
-          !include-raw: ../scripts/wait-for-pkg-manager.sh
-      - shell:
-          !include-raw: ./scripts/deploy.sh
-
-- builder:
-    name: 'onap-oom-healthcheck-builder-macro'
-    builders:
-      - shell:
-          !include-raw: ./scripts/oom-healthcheck.sh
-
-- builder:
-    name: 'onap-healthcheck-builder-macro'
-    builders:
-      - shell:
-          !include-raw: ./scripts/onap-healthcheck.sh
-
-- builder:
-    name: 'onap-promote-builder-macro'
-    builders:
-      - shell:
-          !include-raw: ./scripts/promote.sh
-
-# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/engine/onap-periodic-jobs/onap-online-deploy-test-jobs.yaml b/jjb/engine/onap-periodic-jobs/onap-online-deploy-test-jobs.yaml
deleted file mode 100644 (file)
index d031d4c..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-#--------------------------------------------------------------------------------------
-# The jobs declared in this JJB configuration file are used for deploying and testing
-# ONAP scenario onap-nofeature-noha.
-#--------------------------------------------------------------------------------------
-
-- project:
-    name: 'onap-deploy-test-online'
-
-    project: 'infra/engine'
-
-    distro:
-      - ubuntu1804
-
-    deploy-scenario:
-      - k8-calico-onap:
-          deploy-scenario-version: master
-          deploy-scenario-refspec: master
-
-    onap-profile:
-      - sdc
-      - so
-
-    onap-branch:
-      - elalto:
-          onap-version: elalto
-          nordix-branch: master
-          engine-version: master
-          engine-refspec: master
-          disabled: false
-      - master:
-          onap-version: master
-          nordix-branch: master
-          engine-version: master
-          engine-refspec: master
-          disabled: false
-
-    type:
-      - cloud:
-          pod-name: est-cloud
-          provisioner-type: bifrost
-          installer-type: kubespray
-
-    environment-type:
-      - online:
-          execution-mode: online-deployment
-
-    cloud:
-      - city:
-          slave-label: 'engine-jumphost-online-ubuntu1804-fra'
-          openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
-          daily-trigger: '@midnight'
-
-    ci-loop:
-      - periodic
-
-    job-phase:
-      - deploy:
-          build-timeout: 420
-      - oom-healthcheck:
-          build-timeout: 30
-          test-type: oom-healthcheck
-      - healthcheck:
-          build-timeout: 30
-          test-type: onap-healthcheck
-
-    jobs:
-      - '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-      - 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-
-- job-template:
-    name: '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-
-    project-type: multijob
-
-    disabled: '{obj:disabled}'
-
-    concurrent: false
-
-    parameters:
-      - project-parameters:
-          project: '{project}'
-          branch: '{nordix-branch}'
-      - nordix-gerrit-parameters
-      - label:
-          name: SLAVE_LABEL
-          default: '{slave-label}'
-          description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
-      - string:
-          name: PROVISIONER_TYPE
-          default: 'heat'
-          description: 'Provisioner to use for provisioning nodes'
-      - string:
-          name: INSTALLER_TYPE
-          default: 'kubespray'
-          description: 'Installer to use for deploying the scenario'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: '{deploy-scenario}'
-          description: 'Scenario to deploy and test'
-      - string:
-          name: DEPLOY_TYPE
-          default: '{type}'
-          description: 'Type of the deployment'
-      - string:
-          name: DISTRO
-          default: '{distro}'
-          description: 'Distribution to use for configuring target nodes (networking etc.)'
-      - string:
-          name: ONAP_VERSION
-          default: '{onap-version}'
-          description: 'ONAP version to deploy'
-      - string:
-          name: ONAP_PROFILE
-          default: '{onap-profile}'
-          description: 'ONAP profile to deploy - could be sdc or so.'
-      - string:
-          name: OPENSTACK_CLOUD_PROVIDER
-          default: '{cloud}'
-          description: 'Name of the cloud where this job is run'
-      - string:
-          name: STACK_NAME
-          default: 'nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
-          description: 'Stack to create'
-      - string:
-          name: KEYPAIR_NAME
-          default: 'keypair-nordix-cicd-{deploy-scenario}-{onap-profile}-{onap-branch}'
-          description: 'Keypair to create and use'
-      - string:
-          name: HEAT_ENVIRONMENT_FILENAME
-          default: 'heat-environment-{cloud}-{distro}-{onap-profile}.yaml'
-          description: 'Heat environment file to use'
-      - string:
-          name: EXECUTION_MODE
-          default: '{execution-mode}'
-          description: 'Engine execution mode - could be online-deployment or offline-deployment'
-      - string:
-          name: ENGINE_VERSION
-          default: '{engine-version}'
-          description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
-      - string:
-          name: ENGINE_REFSPEC
-          default: '{engine-refspec}'
-          description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
-      - string:
-          name: DEPLOY_SCENARIO_VERSION
-          default: '{deploy-scenario-version}'
-          description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
-      - string:
-          name: DEPLOY_SCENARIO_REFSPEC
-          default: '{deploy-scenario-refspec}'
-          description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
-      - string:
-          name: POD_NAME
-          default: 'none'
-          description: 'Development purposes only! Set to none for disabling test results DB reporting.'
-      - string:
-          name: TEST_TYPE
-          default: 'oom-healthcheck'
-          description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
-      - string:
-          name: NORDIX_ARM_REPO_URL
-          default: 'https://artifactory.nordix.org/artifactory'
-          description: 'URL to Nordix Artifactory'
-      - string:
-          name: NORDIX_HARBOR_REPO_URL
-          default: 'registry.nordix.org'
-          description: 'URL to Nordix Harbor'
-      - string:
-          name: XTESTING_REPO_URL
-          default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
-          description: 'URL to Nordix xtesting-onap repository'
-      - string:
-          name: ENGINE_ANSIBLE_PARAMS
-          default: ''
-          description: 'Extra parameters that can be added when run the play books.'
-
-    properties:
-      - logrotate
-      - build-blocker:
-          use-build-blocker: true
-          blocking-jobs:
-            - 'cloud-infra-verify-engine-.*'
-            - 'cloud-infra-verify-scenario-.*'
-            - 'cloud-infra-periodic-engine-.*'
-            - 'onap-.*'
-            - 'k8-.*'
-            - 'os-.*'
-            - 'nolabs-.*'
-          block-level: 'NODE'
-      - throttle:
-          max-per-node: 1
-          max-total: 1
-          option: project
-
-    wrappers:
-      - mask-passwords
-      - build-timeout:
-          timeout: 630
-      - fix-workspace-permissions
-
-    triggers:
-      - timed: '{daily-trigger}'
-
-    scm:
-      - git-scm:
-          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
-          branch: '{nordix-branch}'
-          refspec: ''
-          wipe_workspace: true
-          clean_before: false
-
-    builders:
-      - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_PROFILE
-      - multijob:
-          name: Deploy ONAP using OOM (not activated)
-          condition: ALWAYS
-          projects:
-            - name: 'onap-{onap-profile}-{environment-type}-deploy-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-              current-parameters: false
-              predefined-parameters: |
-                DISTRO=$DISTRO
-                PROVISIONER_TYPE=$PROVISIONER_TYPE
-                INSTALLER_TYPE=$INSTALLER_TYPE
-                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-                ONAP_VERSION=$ONAP_VERSION
-                ONAP_PROFILE=$ONAP_PROFILE
-                POD_NAME=$POD_NAME
-                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
-                STACK_NAME=$STACK_NAME
-                KEYPAIR_NAME=$KEYPAIR_NAME
-                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
-                EXECUTION_MODE=$EXECUTION_MODE
-                ENGINE_VERSION=$ENGINE_VERSION
-                ENGINE_REFSPEC=$ENGINE_REFSPEC
-                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
-                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
-                XTESTING_REPO_URL=$XTESTING_REPO_URL
-                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-              git-revision: true
-              node-parameters: true
-              kill-phase-on: NEVER
-              abort-all-job: false
-      - multijob:
-          name: K8S and OOM Healthcheck using xtesting (not activated)
-          condition: ALWAYS
-          projects:
-            - name: 'onap-{onap-profile}-{environment-type}-oom-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-              current-parameters: false
-              predefined-parameters: |
-                DISTRO=$DISTRO
-                PROVISIONER_TYPE=$PROVISIONER_TYPE
-                INSTALLER_TYPE=$INSTALLER_TYPE
-                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-                ONAP_VERSION=$ONAP_VERSION
-                ONAP_PROFILE=$ONAP_PROFILE
-                TEST_TYPE=oom-healthcheck
-                POD_NAME=$POD_NAME
-                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
-                STACK_NAME=$STACK_NAME
-                KEYPAIR_NAME=$KEYPAIR_NAME
-                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
-                EXECUTION_MODE=$EXECUTION_MODE
-                ENGINE_VERSION=$ENGINE_VERSION
-                ENGINE_REFSPEC=$ENGINE_REFSPEC
-                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
-                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
-                XTESTING_REPO_URL=$XTESTING_REPO_URL
-                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-              node-parameters: true
-              kill-phase-on: NEVER
-              abort-all-job: false
-      - multijob:
-          name: ONAP Healthcheck using xtesting (not activated)
-          execution-type: SEQUENTIALLY
-          condition: ALWAYS
-          projects:
-            - name: 'onap-{onap-profile}-{environment-type}-healthcheck-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-              current-parameters: false
-              predefined-parameters: |
-                SLAVE_LABEL=$SLAVE_LABEL
-                DISTRO=$DISTRO
-                PROVISIONER_TYPE=$PROVISIONER_TYPE
-                INSTALLER_TYPE=$INSTALLER_TYPE
-                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-                ONAP_VERSION=$ONAP_VERSION
-                ONAP_PROFILE=$ONAP_PROFILE
-                TEST_TYPE=sdc-healthcheck
-                POD_NAME=$POD_NAME
-                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
-                STACK_NAME=$STACK_NAME
-                KEYPAIR_NAME=$KEYPAIR_NAME
-                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
-                ENGINE_VERSION=$ENGINE_VERSION
-                EXECUTION_MODE=$EXECUTION_MODE
-                ENGINE_REFSPEC=$ENGINE_REFSPEC
-                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
-                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
-                XTESTING_REPO_URL=$XTESTING_REPO_URL
-                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-              node-parameters: true
-              kill-phase-on: NEVER
-              abort-all-job: false
-            - name: 'onap-{onap-profile}-{environment-type}-healthdist-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-              current-parameters: false
-              predefined-parameters: |
-                SLAVE_LABEL=$SLAVE_LABEL
-                DISTRO=$DISTRO
-                PROVISIONER_TYPE=$PROVISIONER_TYPE
-                INSTALLER_TYPE=$INSTALLER_TYPE
-                DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-                ONAP_VERSION=$ONAP_VERSION
-                ONAP_PROFILE=$ONAP_PROFILE
-                TEST_TYPE=onap-healthcheck
-                POD_NAME=$POD_NAME
-                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
-                STACK_NAME=$STACK_NAME
-                KEYPAIR_NAME=$KEYPAIR_NAME
-                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
-                EXECUTION_MODE=$EXECUTION_MODE
-                ENGINE_VERSION=$ENGINE_VERSION
-                ENGINE_REFSPEC=$ENGINE_REFSPEC
-                DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
-                DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
-                XTESTING_REPO_URL=$XTESTING_REPO_URL
-                ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-              node-parameters: true
-              kill-phase-on: NEVER
-              abort-all-job: false
-
-- job-template:
-    name: 'onap-{onap-profile}-{environment-type}-{job-phase}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}'
-
-    disabled: false
-
-    concurrent: true
-
-    properties:
-      - logrotate
-
-    parameters:
-      - onap-parameter-macro
-
-    wrappers:
-      - mask-passwords
-      - build-timeout:
-          timeout: '{build-timeout}'
-      - fix-workspace-permissions
-      - credentials-binding:
-          - username-password-separated:
-              credential-id: 'nordix-cicd-arm-credentials'
-              username: NORDIX_ARM_USERNAME
-              password: NORDIX_ARM_TOKEN
-          - username-password-separated:
-              credential-id: 'nordix-cicd-harbor-credentials'
-              username: NORDIX_HARBOR_USERNAME
-              password: NORDIX_HARBOR_PASSWORD
-
-    scm:
-      - git-scm:
-          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
-          branch: '{nordix-branch}'
-          refspec: ''
-          wipe_workspace: true
-          clean_before: false
-
-    builders:
-      - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_PROFILE
-      - 'onap-{job-phase}-builder-macro'
-
-# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml b/jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml
deleted file mode 100644 (file)
index ae54cb8..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
----
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-- project:
-    name: 'onap-release-online'
-
-    project: 'onap-release-online'
-
-    environment-type:
-      - online:
-          disabled: true
-          execution-mode: online-deployment
-
-    onap-branch:
-      - elalto:
-          onap-version: elalto
-      - master:
-          onap-version: master
-
-    onap-profile:
-      - sdc
-      - so
-
-    distro:
-      - ubuntu1804
-
-    phase:
-      - package
-      - promote
-
-    cloud:
-      - city:
-          openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
-
-    jobs:
-      - 'onap-{onap-profile}-periodic-release-{environment-type}-{distro}-{onap-branch}'
-      - 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
-      - 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
-
-- job-template:
-    name: 'onap-{onap-profile}-periodic-release-{environment-type}-{distro}-{onap-branch}'
-
-    project-type: multijob
-
-    disabled: '{obj:disabled}'
-
-    concurrent: false
-
-    parameters:
-      - string:
-          name: EXECUTION_MODE
-          default: '{execution-mode}'
-          description: 'Engine execution mode - online-deployment or offline-deployment - default is online-deployment'
-      - string:
-          name: DISTRO
-          default: '{distro}'
-          description: 'Distribution to use for configuring target nodes (networking etc.)'
-      - string:
-          name: INSTALLER_TYPE
-          default: 'kubespray'
-          description: 'Installer type to use'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: 'k8-calico-onap'
-          description: 'Scenario to deploy and test'
-      - string:
-          name: ONAP_PROFILE
-          default: '{onap-profile}'
-          description: 'ONAP Profile to deploy and test'
-      - string:
-          name: VERBOSITY
-          default: 'true'
-          description: 'Verbosity setting for the engine - true or false - default is false'
-      - string:
-          name: ARTIFACTS_TO_UPLOAD
-          default: "onap-{onap-profile}-installer-ubuntu1804.bsx offline-package.tgz"
-          description: 'Artifacts to upload'
-      - string:
-          name: ARTIFACT_TO_DOWNLOAD
-          default: "onap-{onap-profile}-installer-ubuntu1804.bsx"
-          description: 'Artifact to download'
-      - string:
-          name: NORDIX_ARM_PUBLIC_IP
-          default: '91.106.198.25'
-          description: 'Public IP of Nordix Artifactory. Offline deployments can not resolve domain name'
-      - string:
-          name: NORDIX_ARM_HTTPS_URL
-          default: 'https://artifactory.nordix.org/artifactory'
-          description: 'URL to Nordix Artifactory'
-      - string:
-          name: NORDIX_ARM_REPO
-          default: 'nordix-onap'
-          description: 'Name of the repository to upload and download artifact to/from. Depends on the stack'
-      - string:
-          name: CI_LOOP
-          default: 'periodic'
-          description: 'CI loop type'
-      - label:
-          name: SLAVE_LABEL
-          default: 'engine-package-ubuntu1804-fra'
-          description: 'Slave label to schedule this job on.'
-
-    properties:
-      - logrotate
-      - build-blocker:
-          use-build-blocker: true
-          blocking-jobs:
-            - 'engine-verify-package-.*'
-            - 'onap-sdc-periodic-release-offline-.*'
-            - 'onap-so-periodic-release-offline-.*'
-            - 'kubernetes-periodic-release-offline-.*'
-          block-level: 'NODE'
-
-    wrappers:
-      - build-timeout:
-          timeout: 600
-      - mask-passwords
-      - fix-workspace-permissions
-
-    triggers:
-      - pollscm:
-          cron: "H 0,8,16 * * *"
-
-    scm:
-      - git:
-          url: https://gerrit.nordix.org/infra/engine.git
-          branches:
-            - master
-          timeout: 15
-          wipe-workspace: true
-
-    builders:
-      - 'generate-ssh-keypair-macro'
-      - 'generate-build-metadata-macro'
-      - 'wait-pkg-mgr-macro'
-      - multijob:
-          name: package
-          condition: SUCCESSFUL
-          execution-type: PARALLEL
-          projects:
-            - name: 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
-              current-parameters: true
-              git-revision: true
-              node-parameters: true
-              property-file: "$WORKSPACE/build.properties"
-              kill-phase-on: FAILURE
-              abort-all-job: true
-      - multijob:
-          name: release test k8-calico-onap {onap-profile}
-          condition: SUCCESSFUL
-          execution-type: PARALLEL
-          projects:
-            - name: 'k8-calico-onap-{onap-profile}-online-ubuntu1804-city-cloud-periodic-{onap-branch}'
-              current-parameters: false
-              git-revision: false
-              node-parameters: false
-              property-file: "$WORKSPACE/build.properties"
-              predefined-parameters: |
-                EXECUTION_MODE=$EXECUTION_MODE
-                NORDIX_ARM_PUBLIC_IP=$NORDIX_ARM_PUBLIC_IP
-                ARTIFACT_TO_DOWNLOAD=$ARTIFACT_TO_DOWNLOAD
-                VERBOSITY=$VERBOSITY
-              kill-phase-on: FAILURE
-              abort-all-job: true
-      - multijob:
-          name: promotion
-          condition: SUCCESSFUL
-          execution-type: PARALLEL
-          projects:
-            - name: 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
-              current-parameters: true
-              git-revision: true
-              node-parameters: true
-              property-file: "$WORKSPACE/build.properties"
-              kill-phase-on: FAILURE
-              abort-all-job: true
-
-- job-template:
-    name: 'onap-{onap-profile}-periodic-package-{distro}-{onap-branch}'
-
-    disabled: '{obj:disabled}'
-
-    concurrent: false
-
-    properties:
-      - logrotate
-
-    wrappers:
-      - build-timeout:
-          timeout: 70
-      - credentials-binding:
-          - username-password-separated:
-              credential-id: 'nordix-cicd-arm-credentials'
-              username: NORDIX_ARM_USERNAME
-              password: NORDIX_ARM_TOKEN
-      - mask-passwords
-      - fix-workspace-permissions
-
-    scm:
-      - git:
-          url: https://gerrit.nordix.org/infra/engine.git
-          branches:
-            - master
-          timeout: 15
-          wipe-workspace: true
-
-    builders:
-      - 'onap-package-builder-macro'
-
-- job-template:
-    name: 'onap-{onap-profile}-periodic-promote-{distro}-{onap-branch}'
-
-    disabled: '{obj:disabled}'
-
-    concurrent: false
-
-    properties:
-      - logrotate
-
-    wrappers:
-      - build-timeout:
-          timeout: 30
-      - credentials-binding:
-          - username-password-separated:
-              credential-id: 'nordix-cicd-arm-credentials'
-              username: NORDIX_ARM_USERNAME
-              password: NORDIX_ARM_TOKEN
-      - mask-passwords
-      - fix-workspace-permissions
-
-    scm:
-      - git:
-          url: https://gerrit.nordix.org/infra/engine.git
-          branches:
-            - master
-          timeout: 15
-          wipe-workspace: true
-
-    builders:
-      - 'onap-promote-builder-macro'
diff --git a/jjb/engine/onap-periodic-jobs/onap-parameter-macros.yaml b/jjb/engine/onap-periodic-jobs/onap-parameter-macros.yaml
deleted file mode 100644 (file)
index 30f1fd4..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
----
-#
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-# macros used by all job types on cloud
-- parameter:
-    name: 'onap-parameter-macro'
-    parameters:
-      - project-parameters:
-          project: 'infra/engine'
-          branch: 'master'
-      - nordix-gerrit-parameters
-      - label:
-          name: SLAVE_LABEL
-          default: 'engine-jumphost-online-ubuntu1804-fra'
-          description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
-      - string:
-          name: PROVISIONER_TYPE
-          default: 'heat'
-          description: 'Provisioner to use for provisioning nodes'
-      - string:
-          name: INSTALLER_TYPE
-          default: 'kubespray'
-          description: 'Installer to use for deploying the scenario'
-      - string:
-          name: DEPLOY_SCENARIO
-          default: 'k8-calico-onap'
-          description: 'Scenario to deploy and test'
-      - string:
-          name: DEPLOY_TYPE
-          default: 'cloud'
-          description: 'Type of the deployment'
-      - string:
-          name: DISTRO
-          default: 'ubuntu1804'
-          description: 'Distribution to use for configuring target nodes (networking etc.)'
-      - string:
-          name: ONAP_VERSION
-          default: '{onap-version}'
-          description: 'ONAP version to deploy'
-      - string:
-          name: ONAP_PROFILE
-          default: 'sdc'
-          description: 'ONAP profile to deploy - could be sdc or so.'
-      - string:
-          name: OPENSTACK_CLOUD_PROVIDER
-          default: 'city'
-          description: 'Name of the cloud where this job is run'
-      - string:
-          name: STACK_NAME
-          default: 'nordix-cicd-k8-calico-onap-sdc-master'
-          description: 'Stack to create'
-      - string:
-          name: KEYPAIR_NAME
-          default: 'keypair-nordix-cicd-k8-calico-onap-sdc-master'
-          description: 'Keypair to create and use'
-      - string:
-          name: HEAT_ENVIRONMENT_FILENAME
-          default: 'heat-environment-city-ubuntu1804-sdc.yaml'
-          description: 'Heat environment file to use'
-      - string:
-          name: EXECUTION_MODE
-          default: 'online-deployment'
-          description: 'Engine execution mode - could be online-deployment or offline-deployment'
-      - string:
-          name: ENGINE_VERSION
-          default: 'master'
-          description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
-      - string:
-          name: ENGINE_REFSPEC
-          default: 'master'
-          description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
-      - string:
-          name: DEPLOY_SCENARIO_VERSION
-          default: 'master'
-          description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
-      - string:
-          name: DEPLOY_SCENARIO_REFSPEC
-          default: 'master'
-          description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
-      - string:
-          name: POD_NAME
-          default: 'none'
-          description: 'Development purposes only! Set to none for disabling test results DB reporting.'
-      - string:
-          name: TEST_TYPE
-          default: 'oom-healthcheck'
-          description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
-      - string:
-          name: NORDIX_ARM_REPO_URL
-          default: 'https://artifactory.nordix.org/artifactory'
-          description: 'URL to Nordix Artifactory'
-      - string:
-          name: NORDIX_HARBOR_REPO_URL
-          default: 'registry.nordix.org'
-          description: 'URL to Nordix Harbor'
-      - string:
-          name: XTESTING_REPO_URL
-          default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
-          description: 'URL to Nordix xtesting-onap repository'
-      - string:
-          name: ENGINE_ANSIBLE_PARAMS
-          default: ''
-          description: 'Extra parameters that can be added when run the play books.'
-
-# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/engine/onap-periodic-jobs/scripts/deploy.sh b/jjb/engine/onap-periodic-jobs/scripts/deploy.sh
deleted file mode 100755 (executable)
index 34a3d7f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o nounset
-set -o errexit
-set -o pipefail
-
-echo "Deployment is not enabled yet!"
diff --git a/jjb/engine/onap-periodic-jobs/scripts/onap-healthcheck.sh b/jjb/engine/onap-periodic-jobs/scripts/onap-healthcheck.sh
deleted file mode 100755 (executable)
index 64f0daf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o nounset
-set -o errexit
-set -o pipefail
-
-echo "Testing is not enabled yet!"
diff --git a/jjb/engine/onap-periodic-jobs/scripts/oom-healthcheck.sh b/jjb/engine/onap-periodic-jobs/scripts/oom-healthcheck.sh
deleted file mode 100755 (executable)
index 64f0daf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o nounset
-set -o errexit
-set -o pipefail
-
-echo "Testing is not enabled yet!"
diff --git a/jjb/engine/onap-periodic-jobs/scripts/package.sh b/jjb/engine/onap-periodic-jobs/scripts/package.sh
deleted file mode 100755 (executable)
index 34a3d7f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o nounset
-set -o errexit
-set -o pipefail
-
-echo "Deployment is not enabled yet!"
diff --git a/jjb/engine/onap-periodic-jobs/scripts/promote.sh b/jjb/engine/onap-periodic-jobs/scripts/promote.sh
deleted file mode 100755 (executable)
index 8f3449a..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o nounset
-set -o errexit
-set -o pipefail
-
-echo "Promotion is not enabled yet!"
index 0302e776a54db534f8d2d24b9257af59022c0b3e..1f0f7b16118446f07c771a0bc876e733e6616284 100755 (executable)
@@ -18,7 +18,6 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-set -o nounset
 set -o errexit
 set -o pipefail
 
 set -o errexit
 set -o pipefail
 
index dad8a32061450605eb2045fbfef0d4bc72abe252..d98ad0aff0777211e5e437612a114fe03fae291c 100755 (executable)
@@ -18,7 +18,6 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-set -o nounset
 set -o errexit
 set -o pipefail
 
 set -o errexit
 set -o pipefail
 
@@ -43,7 +42,11 @@ cd $HOME && /bin/rm -rf $WORKSPACE
 git clone -q $TEST_REPO_URL $WORKSPACE
 
 # NOTE (fdegir): we need to override execution mode variable coming from change.properties file
 git clone -q $TEST_REPO_URL $WORKSPACE
 
 # NOTE (fdegir): we need to override execution mode variable coming from change.properties file
-export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
+if [[ "$CI_LOOP" != "release" ]]; then
+  export EXECUTION_MODE=$(echo "$EXECUTION_MODE" | sed 's/deployment/test/g')
+else
+  export EXECUTION_MODE=online-test
+fi
 
 cd $WORKSPACE/test
 ./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
 
 cd $WORKSPACE/test
 ./test.sh -s "$STACK_TYPE" -b "$BRANCH" -c "$DEPLOY_SCENARIO" -f "$TEST_FW" -t "$TEST_SUITE" \
index 0e510117c1803d877c17791375a0c016a6c70c46..73f889748eb8e892450a88d52c1eb01f911ddd19 100755 (executable)
@@ -160,7 +160,7 @@ export BUILD_IDENTIFIER=$GERRIT_CHANGE_NUMBER
 export OFFLINE_INSTALLER_FILE="/tmp/${STACK_TYPE}-${GERRIT_BRANCH}-${DISTRO}.bsx"
 export BUILD_ARTIFACTS="/tmp/${STACK_TYPE}-${GERRIT_BRANCH}-${DISTRO}.bsx"
 export NORDIX_ARM_REPO="nordix-${STACK_TYPE}"
 export OFFLINE_INSTALLER_FILE="/tmp/${STACK_TYPE}-${GERRIT_BRANCH}-${DISTRO}.bsx"
 export BUILD_ARTIFACTS="/tmp/${STACK_TYPE}-${GERRIT_BRANCH}-${DISTRO}.bsx"
 export NORDIX_ARM_REPO="nordix-${STACK_TYPE}"
-export NORDIX_ARTIFACT_URL="$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/installer/oss/$ARTIFACT_ARM_FOLDER/$BUILD_IDENTIFIER"
+export NORDIX_ARTIFACT_URL="$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/oss/$ARTIFACT_ARM_FOLDER/$BUILD_IDENTIFIER"
 
 cat << EOF >> "$CHANGE_METADATA_FILE"
 BUILD_IDENTIFIER=$BUILD_IDENTIFIER
 
 cat << EOF >> "$CHANGE_METADATA_FILE"
 BUILD_IDENTIFIER=$BUILD_IDENTIFIER
diff --git a/jjb/engine/scripts/generate-release-metadata.sh b/jjb/engine/scripts/generate-release-metadata.sh
new file mode 100755 (executable)
index 0000000..c429895
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+set -o nounset
+set -o errexit
+set -o pipefail
+
+# file to record release metadata
+export RELEASE_METADATA_FILE="$WORKSPACE/release.properties"
+/bin/rm -f "$RELEASE_METADATA_FILE" /tmp/release.properties
+
+echo "Info  : Generating release metadata"
+
+# global vars
+export NORDIX_ARM_HTTPS_URL="https://artifactory.nordix.org/artifactory"
+export ARTIFACT_ARM_FOLDER="release/${BRANCH}/stack"
+export BUILD_IDENTIFIER="$(date '+%Y%m%d%H%M')"
+export OFFLINE_INSTALLER_FILE="/tmp/${STACK_TYPE}-${BRANCH}-${DISTRO}.bsx"
+export BUILD_ARTIFACTS="/tmp/${STACK_TYPE}-${BRANCH}-${DISTRO}.bsx /tmp/offline-package.tgz $WORKSPACE/release.properties"
+export NORDIX_ARM_REPO="nordix-${STACK_TYPE}"
+export NORDIX_ARTIFACT_URL="$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/oss/$ARTIFACT_ARM_FOLDER/$BUILD_IDENTIFIER"
+
+cat << EOF >> "$RELEASE_METADATA_FILE"
+BUILD_IDENTIFIER=$BUILD_IDENTIFIER
+BUILD_DATE=$BUILD_IDENTIFIER
+BRANCH=$BRANCH
+RELEASE_JOB=$BUILD_URL
+DISTRO=$DISTRO
+DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+CI_LOOP=$CI_LOOP
+STACK_TYPE=$STACK_TYPE
+STACK_VERSION=$STACK_VERSION
+PROMOTE_STACK=$PROMOTE_STACK
+NORDIX_ENGINE_VERSION=$NORDIX_ENGINE_VERSION
+NORDIX_KUBESPRAY_VERSION=$NORDIX_KUBESPRAY_VERSION
+NORDIX_BIFROST_VERSION=$NORDIX_BIFROST_VERSION
+NORDIX_HEAT_VERSION=$NORDIX_HEAT_VERSION
+OFFLINE_INSTALLER_FILE=$OFFLINE_INSTALLER_FILE
+BUILD_ARTIFACTS=$BUILD_ARTIFACTS
+NORDIX_ARM_REPO=nordix-${STACK_TYPE}
+NORDIX_ARTIFACT_URL=$NORDIX_ARTIFACT_URL
+EOF
+
+echo "Info  : Release metadata"
+echo "-------------------------------------------------------------------------"
+cat "$RELEASE_METADATA_FILE"
+echo "-------------------------------------------------------------------------"
+
+# NOTE (fdegir): release.properties file will be included in the tarball if the packaging
+# is run for release purposes
+/bin/cp -f $RELEASE_METADATA_FILE /tmp/release.properties
+
+# vim: set ts=2 sw=2 expandtab:
index bcebb6cde7c08135f17eb2b5dbdf1d2a13a70f7b..642d5b9940d7e72a950f59d14dccd162d03b3a5f 100755 (executable)
@@ -18,7 +18,6 @@
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
 # SPDX-License-Identifier: Apache-2.0
 # ============LICENSE_END=========================================================
 
-set -o nounset
 set -o errexit
 set -o pipefail
 
 set -o errexit
 set -o pipefail
 
index 7d3789a8bd5ae4aeb79c14641bef2778ce80c8ab..a6ac651cad0e68facbd4c152ad12ffeb5d63579a 100755 (executable)
@@ -22,25 +22,33 @@ set -o nounset
 set -o errexit
 set -o pipefail
 
 set -o errexit
 set -o pipefail
 
-if [[ "$EXECUTION_MODE" == "offline-deployment" ]]; then
-  cd /tmp
-  URL_TO_UPLOAD=$NORDIX_ARM_HTTPS_URL/$NORDIX_ARM_REPO/installer/oss/release/latest
-  for ARTIFACT_TO_UPLOAD in $ARTIFACTS_TO_UPLOAD; do
-    echo "Info  : Generating checksums for $ARTIFACT_TO_UPLOAD"
-    ARTIFACT_MD5SUM=$(md5sum $ARTIFACT_TO_UPLOAD | cut -d' ' -f1)
-    ARTIFACT_SHASUM=$(shasum $ARTIFACT_TO_UPLOAD | cut -d' ' -f1)
-    ARTIFACT_SHA256SUM=$(sha256sum $ARTIFACT_TO_UPLOAD | cut -d' ' -f1)
-
-    echo "Info  : Promoting $ARTIFACT_TO_UPLOAD"
-    curl -s -S \
-        -H "X-JFrog-Art-Api:$NORDIX_ARM_TOKEN" \
-        -H "X-Checksum-MD5:$ARTIFACT_MD5SUM" \
-        -H "X-Checksum-Sha1:$ARTIFACT_SHASUM" \
-        -H "X-Checksum-Sha256:$ARTIFACT_SHA256SUM" \
-        -T $ARTIFACT_TO_UPLOAD \
-        "$URL_TO_UPLOAD/$ARTIFACT_TO_UPLOAD"
-    echo "Info  : Artifact $ARTIFACT_TO_UPLOAD is available on $URL_TO_UPLOAD/$ARTIFACT_TO_UPLOAD"
-  done
-else
-  echo "Info  : Online deployment. No artifact to upload."
+if [[ "$PROMOTE_STACK" != "true" ]]; then
+  echo "Info  : Promotion is disabled. Skipping!"
+  exit 0
 fi
 fi
+
+echo "Info  : Promoting stack!"
+
+cd /tmp
+for BUILD_ARTIFACT in $BUILD_ARTIFACTS; do
+  echo "Info  : Generating checksums for $BUILD_ARTIFACT"
+  ARTIFACT_MD5SUM=$(md5sum $BUILD_ARTIFACT | cut -d' ' -f1)
+  ARTIFACT_SHASUM=$(shasum $BUILD_ARTIFACT | cut -d' ' -f1)
+  ARTIFACT_SHA256SUM=$(sha256sum $BUILD_ARTIFACT | cut -d' ' -f1)
+
+  # NOTE (fdegir): get rid of /tmp from BUILD_ARTIFACT
+  REMOTE_ARTIFACT=$(echo $BUILD_ARTIFACT | sed 's/.*\///g')
+
+  # NOTE (fdegir): promotion is copying artifacts to latest folder for the release/branch
+  PROMOTED_ARTIFACT_URL=$(echo $NORDIX_ARTIFACT_URL | sed "s/$BUILD_IDENTIFIER/latest/g")
+
+  echo "Info  : Uploading $BUILD_ARTIFACT to Nordix Artifactory"
+  curl -s -S \
+      -H "X-JFrog-Art-Api:$NORDIX_ARM_TOKEN" \
+      -H "X-Checksum-MD5:$ARTIFACT_MD5SUM" \
+      -H "X-Checksum-Sha1:$ARTIFACT_SHASUM" \
+      -H "X-Checksum-Sha256:$ARTIFACT_SHA256SUM" \
+      -T $BUILD_ARTIFACT \
+      "$PROMOTED_ARTIFACT_URL/$REMOTE_ARTIFACT"
+  echo "Info  : Artifact $BUILD_ARTIFACT is promoted to $PROMOTED_ARTIFACT_URL/$REMOTE_ARTIFACT"
+done