| --- |
| # |
| # ============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 verifying patches |
| # that are sent to the repositories below |
| # - cloud-infra/engine |
| # |
| # These jobs verify changes that |
| # - implement new features or fix bugs for the deployment framework, engine, itself |
| # - implement new features or fix bugs to the playbooks and roles used for utilizing |
| # open source components such as bifrost, kubespray, and kolla-ansible |
| # - bump versions of open source components or the scenarios |
| # |
| # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604. |
| # The slaves have |
| # - Ubuntu1604 as the base distro |
| # - nested virtualization |
| # - internet access |
| # - passwordless sudo |
| # - 16 CPUs/32GB RAM/200 GB Disk |
| # - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl |
| # gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre |
| # |
| # The slaves should not have a cloud infra scenario deployed on them. |
| #-------------------------------------------------------------------------------------- |
| |
| - project: |
| name: 'nolabs-booking' |
| |
| project: 'infra/engine' |
| |
| stream: |
| - 'master': |
| branch: '{stream}' |
| slave-label: 'nolabs-booking-slave' |
| build-timeout: 60 |
| # slave-label: 'vpod-deploy-ubuntu1804' |
| |
| booking-phase: |
| - 'handle' |
| - 'delete' |
| |
| target-site: |
| - 'test': |
| api-tokens-endpoint: 'http://188.212.108.245/api/tokens' |
| api-users-endpoint: 'http://188.212.108.245/api/users' |
| api-bookings-endpoint: 'http://188.212.108.245/api/bookings' |
| - 'production': |
| api-tokens-endpoint: 'https://labs.nordix.org/api/tokens' |
| api-users-endpoint: 'https://labs.nordix.org/api/users' |
| api-bookings-endpoint: 'https://labs.nordix.org/api/bookings' |
| |
| jobs: |
| - 'nolabs-{booking-phase}-booking-{target-site}site-{stream}' |
| |
| - job-template: |
| name: 'nolabs-{booking-phase}-booking-{target-site}site-{stream}' |
| |
| node: '{slave-label}' |
| |
| concurrent: true |
| |
| parameters: |
| - project-parameters: |
| project: '{project}' |
| branch: '{branch}' |
| - nordix-gerrit-parameters |
| - string: |
| name: TARGET_SITE |
| default: '{target-site}' |
| description: 'Target site to handle the bookings for.' |
| # - 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: BOOKING_PHASE |
| default: '{booking-phase}' |
| description: 'Phase of the booking.' |
| - string: |
| name: BOOKING_ID |
| default: 0 |
| description: 'ID of the booking to handle. Default is 0 which is a non-existent booking to prevent running the job by mistake.' |
| - string: |
| name: DEPLOY_SCENARIO |
| default: 'k8-mycoolplugin-mycoolfeature' |
| description: 'Scenario to deploy for the booking. Default is a non-existent scenario to prevent running the job by mistake.' |
| - string: |
| name: NOLABS_API_TOKENS_ENDPOINT |
| default: '{api-tokens-endpoint}' |
| description: 'API endpoint for tokens.' |
| - string: |
| name: NOLABS_API_USERS_ENDPOINT |
| default: '{api-users-endpoint}' |
| description: 'API endpoint for users.' |
| - string: |
| name: NOLABS_API_BOOKINGS_ENDPOINT |
| default: '{api-bookings-endpoint}' |
| description: 'API endpoint for bookings.' |
| - string: |
| name: NOLABS_USER_SSHPUBKEY |
| default: '/tmp/nolabs/id_rsa.pub' |
| description: 'SSH public key for the user who created the booking.' |
| - string: |
| name: NOLABS_VENV |
| default: '/tmp/nolabs/.venv' |
| description: 'Python virtualenv location to use.' |
| - string: |
| name: GERRIT_REFSPEC |
| default: 'refs/changes/74/3574/3' |
| description: 'Refspec to checkout' |
| - string: |
| name: HEAT_ENVIRONMENT_FILE |
| default: "file://$WORKSPACE/engine/provisioner/heat/playbooks/roles/bootstrap-hwconfig/files/heat-environment.yaml" |
| description: 'Using a special heat environment file until the change gets merged.' |
| |
| properties: |
| - logrotate |
| # - build-blocker: |
| # use-build-blocker: true |
| # blocking-jobs: |
| # - 'cloud-infra-verify-engine-.*' |
| # - 'cloud-infra-verify-scenario-.*' |
| # - 'cloud-infra-periodic-engine-.*' |
| # - 'k8-.*' |
| # - 'nolabs-.*' |
| # block-level: 'NODE' |
| # - throttle: |
| # max-per-node: 1 |
| # max-total: 10 |
| # option: project |
| |
| wrappers: |
| - credentials-binding: |
| - file: |
| credential-id: nordix-nolabs-openrcfile-city-karlskrona-defaultproject |
| variable: OPENRC_FILE |
| - username-password-separated: |
| credential-id: nordix-nolabs-jenkins-api-credentials |
| username: NOLABS_API_USERNAME |
| password: NOLABS_API_PASSWORD |
| - mask-passwords |
| - build-timeout: |
| timeout: '{build-timeout}' |
| - fix-workspace-permissions |
| - openstack: |
| single-use: True |
| |
| scm: |
| - git-scm: |
| ssh-credentials-id: nordixinfra-nordix-gerrit-ssh |
| branch: '{branch}' |
| refspec: '' |
| wipe_workspace: true |
| clean_before: false |
| |
| builders: |
| - description-setter: |
| description: $BOOKING_ID | $DEPLOY_SCENARIO |
| - '{booking-phase}booking-macro' |
| |
| # vim: set ts=2 sw=2 expandtab: |