- 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:
# ============LICENSE_END=========================================================
- project:
- name: 'kubernetes-deploy-test-offline'
+ name: 'kubernetes-deploy-test'
- project: 'kubernetes-deploy-test-offline'
+ project: 'kubernetes-deploy-test'
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
- 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'
+ openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-cicd'
phase:
- deploy:
build-timeout: 60
+ execution-mode: offline-deployment
- functest:
build-timeout: 210
+ execution-mode: online-test
- yardstick:
build-timeout: 30
+ execution-mode: online-test
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:
- name: '{deploy-scenario}-{environment-type}-{distro}-{type}-periodic'
+ name: 'kubernetes-release-{environment-type}-deploy-test-{distro}-baremetal-{stream}'
project-type: multijob
disabled: '{obj:disabled}'
- concurrent: true
+ node: baremetal-deploy
+
+ concurrent: false
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'
- 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'
- description: 'IDF file to use for deployment'
+ description: 'IDF file to use for deployment. DO NOT MODIFY!'
- 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
- max-total: 3
+ max-total: 1
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:
- description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
+ description: $DEPLOY_SCENARIO
- 'download-artifact-macro'
- multijob:
- name: "Offline Deployment on {type}"
+ name: "Offline Deployment on Baremetal using {deploy-scenario}"
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
+ git-revision: true
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
- multijob:
- name: functest
+ name: Functional Testing
condition: ALWAYS
projects:
- - name: 'kubernetes-{environment-type}-functest-{distro}-{type}-periodic'
+ - name: 'kubernetes-release-{environment-type}-functest-{distro}-baremetal-{stream}'
current-parameters: true
+ git-revision: false
node-parameters: true
kill-phase-on: FAILURE
abort-all-job: true
- multijob:
- name: yardstick
+ name: Platform Benchmarking
condition: ALWAYS
projects:
- - name: 'kubernetes-{environment-type}-yardstick-{distro}-{type}-periodic'
+ - name: 'kubernetes-release-{environment-type}-yardstick-{distro}-baremetal-{stream}'
current-parameters: true
+ git-revision: false
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:
+ - string:
+ name: EXECUTION_MODE
+ default: '{execution-mode}'
+ description: 'Execution mode'
- string:
name: TEST_REPO_URL
default: 'https://gerrit.nordix.org/infra/test.git'
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
- max-total: 3
+ max-total: 1
option: project
wrappers:
timeout: '{build-timeout}'
- mask-passwords
- fix-workspace-permissions
+ - credentials-binding:
+ - file:
+ credential-id: '{openrc-credentials-file}'
+ variable: OPENRC_FILE
builders:
- description-setter:
- description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
+ description: $DEPLOY_SCENARIO
- '{phase}-macro'
# ============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:
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:
- name: 'kubernetes-periodic-release-{environment-type}-{distro}'
+ name: 'kubernetes-release-{distro}-{stream}'
project-type: multijob
disabled: '{obj:disabled}'
+ node: 'engine-package-{distro}-fra'
+
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}'
- 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
- 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
- default: 'true'
- description: 'Verbosity setting for the engine - true or false - default is false'
+ default: 'false'
+ description: 'Engine verbosity'
- 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:
- 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:
- 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:
- 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:
- 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:
- 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
- - 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
+ - openstack:
+ single-use: True
triggers:
- pollscm:
- cron: "H 0,8,16 * * *"
+ cron: "#H 0,8,16 * * *"
scm:
- git:
wipe-workspace: true
builders:
+ - 'generate-release-metadata-macro'
+ - inject:
+ properties-file: "$WORKSPACE/release.properties"
- 'generate-ssh-keypair-macro'
- - 'generate-build-metadata-macro'
- 'wait-pkg-mgr-macro'
- multijob:
- name: package
+ name: Packaging
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
- property-file: "$WORKSPACE/build.properties"
+ property-file: "$WORKSPACE/release.properties"
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:
- - name: 'k8-multus-plugins-offline-{distro}-baremetal-periodic'
+ - name: 'kubernetes-release-offline-deploy-test-{distro}-baremetal-{stream}'
current-parameters: false
- git-revision: false
+ git-revision: true
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:
- name: promotion
+ name: Promotion
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
- property-file: "$WORKSPACE/build.properties"
+ property-file: "$WORKSPACE/release.properties"
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
+ parameters:
+ - string:
+ name: EXECUTION_MODE
+ default: 'packaging'
+ description: 'Execution mode to run engine'
+
properties:
- logrotate
- 'upload-artifact-macro'
- job-template:
- name: 'kubernetes-periodic-promote-{distro}'
+ name: 'kubernetes-promote-{distro}-{stream}'
disabled: '{obj:disabled}'
+++ /dev/null
----
-#
-# ============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:
+++ /dev/null
----
-#
-# ============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:
+++ /dev/null
----
-# ============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'
+++ /dev/null
----
-#
-# ============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:
+++ /dev/null
-#!/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!"
+++ /dev/null
-#!/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!"
+++ /dev/null
-#!/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!"
+++ /dev/null
-#!/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!"
+++ /dev/null
-#!/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!"
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-set -o nounset
set -o errexit
set -o pipefail
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-set -o nounset
set -o errexit
set -o pipefail
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" \
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
--- /dev/null
+#!/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:
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-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
+
+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