From a23a0a40ee9ba97269f23e8edd9e897ca2d4f97a Mon Sep 17 00:00:00 2001
From: agardner <agardner@linuxfoundation.org>
Date: Wed, 2 May 2018 10:54:25 -0400
Subject: JJB 2.0.X does not allow scenario to be passed here

With this change releng/jjb/* now passes on:
Jenkins Job Builder version: 2.0.1 and 1.6.2

Error:
TypeError: write() argument must be str, not list
Explanation:
in jjb 1.6.2 it would allow the list in and then the job would convert
the list into a literal string of "['var1', 'var2']"

- 'compass-{scenario}-{pod}-daily-{stream}'
Can have scenario passed, {scenario} is part of the job name
so it knows which scenario to add.

- 'compass-deploy-{pod}-daily-{stream}'
cannot have scenario passed, there is not one job generated per scenario
so its tryting to add "['senario1', 'scenario2', 'etc']" into the {scenario}
value, which is not allowed.

This worked on jjb 1.6.2 becasue we overwrite the scenario
information later:
- trigger-builds:
    - project: 'compass-deploy-{pod}-daily-{stream}'
      predefined-parameters: |
        DEPLOY_SCENARIO={scenario}

jjb/armband/armband-ci-jobs.yml is very simillar to this job
and passes a default, which works, so that is what I have done here:
   - string:
       name: DEPLOY_SCENARIO
       default: 'os-odl-nofeature-ha'

addendum:
removed scenario: '{scenario}' from
'compass-{scenario}-{pod}-daily-{stream}'
even though it is valid, Trevor rightly pointed out that there is
nothing to consume this value.

Change-Id: I134b2bd5888dcdfa5b768a7db2bdc98ad32ec28e
Signed-off-by: agardner <agardner@linuxfoundation.org>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
---
 jjb/compass4nfv/compass-ci-jobs.yml | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'jjb')

diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml
index 88fb02605..8eeaabfaa 100644
--- a/jjb/compass4nfv/compass-ci-jobs.yml
+++ b/jjb/compass4nfv/compass-ci-jobs.yml
@@ -162,8 +162,6 @@
           block-level: 'NODE'
 
     wrappers:
-      - build-name:
-          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
       - fix-workspace-permissions
 
     parameters:
@@ -174,7 +172,6 @@
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
-          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
@@ -362,7 +359,6 @@
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
-          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
@@ -409,10 +405,10 @@
           installer: '{installer}'
           gs-pathname: '{gs-pathname}'
           ppa-pathname: '{ppa-pathname}'
-          scenario: '{scenario}'
       - '{slave-label}-defaults'
       - '{installer}-defaults'
 
+
     scm:
       - git-scm
 
@@ -457,7 +453,7 @@
           description: "Directory where the logs will be located upon the completion of the collection."
       - string:
           name: DEPLOY_SCENARIO
-          default: '{scenario}'
+          default: 'os-nosdn-nofeature-ha'
           description: "Scenario to deploy with."
       - string:
           name: COMPASS_OS_VERSION
-- 
cgit