Create image.unstable.excelsior job, refactor some
- Move image_unstable from enterprise to core, parameterize on boardName
- Add excelsior to the list of boards in images.jenkins. Pass boardName
to the pipelineJob as a parameter.
Change-Id: I2963725c1b1c9e9f4a70e19999776217d193f119
diff --git a/cicd/jobs/images.jenkins b/cicd/jobs/images.jenkins
index db65fc1..65cb5d6 100644
--- a/cicd/jobs/images.jenkins
+++ b/cicd/jobs/images.jenkins
@@ -2,12 +2,16 @@
def boards = [
"enterprise"
+ "excelsior"
]
boards.each {
def boardName = it
pipelineJob("image.unstable.${boardName}") {
+ parameters {
+ stringParam('boardName', boardName, 'Board to build an image for')
+ }
definition {
cpsScm {
scm {
@@ -20,7 +24,7 @@
}
}
- scriptPath("cicd/pipelines/${boardName}/image_unstable.jenkins")
+ scriptPath("cicd/pipelines/core/image_unstable.jenkins")
}
}
}
diff --git a/cicd/pipelines/enterprise/image_unstable.jenkins b/cicd/pipelines/core/image_unstable.jenkins
similarity index 91%
rename from cicd/pipelines/enterprise/image_unstable.jenkins
rename to cicd/pipelines/core/image_unstable.jenkins
index 3d37596..031d239 100644
--- a/cicd/pipelines/enterprise/image_unstable.jenkins
+++ b/cicd/pipelines/core/image_unstable.jenkins
@@ -2,8 +2,9 @@
library 'functions'
+def boardName = params.boardName
def workspacePath = "/home/jenkins/workspace"
-def buildLabel = "image.unstable.enterprise-${UUID.randomUUID().toString()}"
+def buildLabel = "image.unstable.${boardName}-${UUID.randomUUID().toString()}"
def sourcePath = "${workspacePath}/src"
// FIXME(jtgans): Get rid of privileged! This is a security risk!
@@ -16,7 +17,6 @@
ttyEnabled: true,
privileged: true)
def aptlyVolume = persistentVolumeClaim(claimName: 'aptly-state', mountPath: '/var/lib/aptly')
-def boardName = "enterprise"
podTemplate(label: buildLabel, containers: [jnlpContainer, debianContainer], volumes: [aptlyVolume], envVars: []) {
node(buildLabel) {
@@ -39,7 +39,7 @@
}
stage('Deploy') {
- def imagePath = "/var/lib/aptly/images/enterprise/unstable"
+ def imagePath = "/var/lib/aptly/images/${boardName}/unstable"
def files = findFiles(glob: "out/**/dist/*")
if (files.size() == 0) {