cloud-infra: Setup periodic virtual jobs for OpenStack
[infra/cicd.git] / jjb / nolabs / nolabs-booking-jobs.yaml
index 7a6e31306be55911c5cb470547334d6c9998e88a..313c53b6b251b30168d3c075d9eccc99c6b5bf69 100644 (file)
@@ -50,8 +50,9 @@
     stream:
       - 'master':
           branch: '{stream}'
-          slave-label: 'vpod-deploy-ubuntu1804'
+          slave-label: 'nolabs-booking-slave'
           build-timeout: 60
+#          slave-label: 'vpod-deploy-ubuntu1804'
 
     booking-phase:
       - 'handle'
 
     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'
 
@@ -71,7 +74,7 @@
 - job-template:
     name: 'nolabs-{booking-phase}-booking-{target-site}site-{stream}'
 
-    disabled: '{obj:disabled}'
+    node: '{slave-label}'
 
     concurrent: true
 
           project: '{project}'
           branch: '{branch}'
       - nordix-gerrit-parameters
-      - label:
+      - 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.'
+#      - 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}'
           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}'
 
     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: 3
-          option: project
+#      - 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: openrc-city-nolabs-default-nordix.sh
+              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
           clean_before: false
 
     builders:
+      - description-setter:
+          description: $BOOKING_ID | $DEPLOY_SCENARIO
       - '{booking-phase}booking-macro'
 
 # vim: set ts=2 sw=2 expandtab: