From: Fatih Degirmenci Date: Wed, 15 Apr 2020 10:33:46 +0000 (+0000) Subject: engine: Create release jobs for ONAP profiles X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F4436%2F3;hp=08d947b247f93908f97a0fa82c35209b285e0906;p=infra%2Fcicd.git engine: Create release jobs for ONAP profiles Change-Id: Ie33663686637b2aba72a6bd00230440cf2b4d187 --- diff --git a/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml b/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml index 7fe9912b..d7aaeafd 100644 --- a/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml +++ b/jjb/engine/onap-periodic-jobs/onap-builder-macros.yaml @@ -18,6 +18,12 @@ # 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: 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 index de635c35..3ed45184 100644 --- a/jjb/engine/onap-periodic-jobs/onap-online-deploy-test-jobs.yaml +++ b/jjb/engine/onap-periodic-jobs/onap-online-deploy-test-jobs.yaml @@ -82,8 +82,6 @@ - healthcheck: build-timeout: 30 test-type: onap-healthcheck - - promote: - build-timeout: 240 jobs: - '{deploy-scenario}-{onap-profile}-{environment-type}-{distro}-{cloud}-{type}-{ci-loop}-{onap-branch}' @@ -349,31 +347,6 @@ node-parameters: true kill-phase-on: NEVER abort-all-job: false - - multijob: - name: Promote ONAP (not activated) - condition: ALWAYS - projects: - - name: 'onap-{onap-profile}-{environment-type}-promote-{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 - POD_NAME=$POD_NAME - 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}' diff --git a/jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml b/jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml new file mode 100644 index 00000000..def858b5 --- /dev/null +++ b/jjb/engine/onap-periodic-jobs/onap-online-release-jobs.yaml @@ -0,0 +1,248 @@ +--- +# ============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-karlskrona-onap' + + 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-build-ubuntu1804' + description: 'Slave label to schedule this job on.' + + properties: + - logrotate + + 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/scripts/package.sh b/jjb/engine/onap-periodic-jobs/scripts/package.sh new file mode 100755 index 00000000..34a3d7f2 --- /dev/null +++ b/jjb/engine/onap-periodic-jobs/scripts/package.sh @@ -0,0 +1,25 @@ +#!/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!"