engine: Fine tune release jobs
Change-Id: Ide647fe777fc2a23b5565c0ea09edc4a71ccb6fd
diff --git a/jjb/engine/periodic-jobs/engine-periodic-release-jobs.yaml b/jjb/engine/periodic-jobs/engine-periodic-release-jobs.yaml
new file mode 100644
index 0000000..65eaa57
--- /dev/null
+++ b/jjb/engine/periodic-jobs/engine-periodic-release-jobs.yaml
@@ -0,0 +1,223 @@
+---
+# ============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: 'engine-release'
+
+ project: 'engine-release'
+
+ environment-type:
+ - offline:
+ disabled: false
+ execution-mode: offline-deployment
+
+ distro:
+ - ubuntu1804
+
+ phase:
+ - package
+ - promote
+
+ cloud:
+ - city:
+ openrc-credentials-file: 'est-jenkins-openrcfile-city-karlskrona-onap'
+
+ jobs:
+ - 'kubernetes-periodic-release-{environment-type}-{distro}'
+ - 'kubernetes-periodic-{phase}-{distro}'
+
+- job-template:
+ name: 'kubernetes-periodic-release-{environment-type}-{distro}'
+
+ 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-nofeature'
+ description: 'Scenario 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: "k8s-installer-ubuntu1804.bsx offline-package.tgz"
+ description: 'Artifacts to upload'
+ - string:
+ name: ARTIFACT_TO_DOWNLOAD
+ default: "k8s-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-kubernetes'
+ 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: 180
+ - 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:
+ - 'wait-pkg-mgr-macro'
+ - 'generate-ssh-keypair-macro'
+ - 'generate-job-metadata-macro'
+ - multijob:
+ name: package
+ condition: SUCCESSFUL
+ execution-type: PARALLEL
+ projects:
+ - name: 'kubernetes-periodic-package-{distro}'
+ 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-nofeature
+ condition: SUCCESSFUL
+ execution-type: PARALLEL
+ projects:
+ - name: 'k8-calico-nofeature-offline-{distro}-baremetal-periodic'
+ current-parameters: false
+ git-revision: false
+ node-parameters: false
+ property-file: "$WORKSPACE/build.properties"
+ predefined-parameters: |
+ 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: release test k8-multus-nofeature
+ condition: SUCCESSFUL
+ execution-type: PARALLEL
+ projects:
+ - name: 'k8-multus-nofeature-offline-{distro}-baremetal-periodic'
+ current-parameters: false
+ git-revision: false
+ node-parameters: false
+ property-file: "$WORKSPACE/build.properties"
+ predefined-parameters: |
+ 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: 'kubernetes-periodic-promote-{distro}'
+ 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: 'kubernetes-periodic-{phase}-{distro}'
+
+ 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:
+ - shell: |
+ #!/bin/bash
+ env
+
+# - 'wait-pkg-mgr-macro'
+# - 'generate-ssh-keypair-macro'
+# - 'package-macro'
+# - 'upload-artifact-macro'