aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Rendina <mrendina@stsci.edu>2017-08-16 14:46:30 -0400
committerMatt Rendina <mrendina@stsci.edu>2017-08-16 14:46:30 -0400
commitbea2ded97ab5def6a9d485a8b44193339231dfcc (patch)
tree79691b11550b3fb46feb30d44b0c07dc91a5b92b
parent75651d3748df93ddc7feb70dfae92850e49fcc0f (diff)
downloadbuild_control-bea2ded97ab5def6a9d485a8b44193339231dfcc.tar.gz
Pull publication root from manifest instead of params
-rw-r--r--jenkins/dispatch.groovy5
-rw-r--r--jenkins/generator_DSL.groovy4
-rw-r--r--jenkins/job-suite-generator.groovy8
-rw-r--r--manifests/public.yaml6
-rw-r--r--manifests/test.yaml6
5 files changed, 20 insertions, 9 deletions
diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy
index 6dec068..0f5ac79 100644
--- a/jenkins/dispatch.groovy
+++ b/jenkins/dispatch.groovy
@@ -108,6 +108,7 @@ node(LABEL) {
"Recipe repository: ${this.manifest.repository}\n" +
"Numpy version spec: ${this.manifest.numpy_version}\n" +
"Channel URL: ${this.manifest.channel_URL}\n" +
+ "Publication root: ${this.manifest.publication_root}\n" +
"Package list:\n${manifest_pkg_txt}")
}
@@ -159,8 +160,6 @@ node(LABEL) {
sh "false"
}
- //def conda_installer =
- // this.conda_installers["${this.OSname}-py${PY_VERSION}"]
def conda_installer =
this.conda_installers["${this.OSname}-py${this.py_maj_version}"]
dl_cmd = dl_cmd + " ${CONDA_BASE_URL}/${conda_installer}"
@@ -246,7 +245,7 @@ node(LABEL) {
}
stage ("Publish") {
- def publication_path = "${PUBLICATION_ROOT}/${this.CONDA_PLATFORM}"
+ def publication_path = "${this.manifest.publication_root}/${this.CONDA_PLATFORM}"
// Copy and index packages if any were produced in the build.
def artifacts_present =
sh(script: "ls ${this.conda_build_output_dir}/*.tar.bz2 >/dev/null 2>&1",
diff --git a/jenkins/generator_DSL.groovy b/jenkins/generator_DSL.groovy
index f05c46c..f74275c 100644
--- a/jenkins/generator_DSL.groovy
+++ b/jenkins/generator_DSL.groovy
@@ -46,8 +46,7 @@ pipelineJob("${suite_name}/_${script.tokenize(".")[0]}") {
"CONDA_VERSION: ${conda_version}\n" +
"CONDA_BUILD_VERSION: ${conda_build_version}\n" +
"CONDA_BASE_URL: ${conda_base_URL}\n" +
- "UTILS_REPO: ${utils_repo}\n" +
- "PUBLICATION_ROOT: ${publication_root}\n")
+ "UTILS_REPO: ${utils_repo}\n")
environmentVariables {
env("JOB_DEF_GENERATION_TIME", job_def_generation_time)
env("SCRIPT", this.script)
@@ -60,7 +59,6 @@ pipelineJob("${suite_name}/_${script.tokenize(".")[0]}") {
env("CONDA_BUILD_VERSION", conda_build_version)
env("CONDA_BASE_URL", conda_base_URL)
env("UTILS_REPO", utils_repo)
- env("PUBLICATION_ROOT", publication_root)
}
definition {
cps {
diff --git a/jenkins/job-suite-generator.groovy b/jenkins/job-suite-generator.groovy
index 5d32e51..89b65ad 100644
--- a/jenkins/job-suite-generator.groovy
+++ b/jenkins/job-suite-generator.groovy
@@ -8,7 +8,7 @@
this.ldir = "libs"
// URL for the YAML support library used for accessing manifest files
-yURL = "https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar"
+yaml_lib_url = "https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar"
// DSL script path within the repository obtained for this job.
this.dsl_script = "jenkins/generator_DSL.groovy"
@@ -38,6 +38,7 @@ node("master") {
// Get branch spec component after last '/' character.
// Branch names themselves shall not have slashes in them
// when specified in the job-suite-generator job configuration.
+ // This may also describe a tag, rather than a branch.
build_control_branch = scm.branches[0].toString().tokenize("/")[-1]
sh "echo ${build_control_branch} > VAR-build_control_branch"
@@ -59,6 +60,7 @@ node("master") {
"conda_build_version: ${this.conda_build_version}\n" +
"conda_base_URL: ${this.conda_base_URL}\n" +
"utils_repo: ${this.utils_repo}\n" +
+ "publication_root: ${this.publication_root}\n" +
"old_jobs_action: ${this.old_jobs_action}\n" +
" Other values:\n" +
"dsl_script: ${this.dsl_script}")
@@ -68,7 +70,7 @@ node("master") {
sh "mkdir -p ${this.ldir}"
// Obtain libraries to facilitate job generation tasks.
dir ("libs") {
- sh "curl -O ${yURL}"
+ sh "curl -O ${yaml_lib_url}"
}
// Copy files from the implicit checkout of the build_control directory
// (handled by the job that reads this pipeline script) into the actual
@@ -77,7 +79,7 @@ node("master") {
sh "cp -r ${env.WORKSPACE}@script/* ."
}
- stage("Spawn job definitions") {
+ stage("Spawn job definition") {
jobDsl targets: [this.dsl_script].join("\n"),
lookupStrategy: "SEED_JOB",
additionalClasspath: ["${this.ldir}/*.jar"].join("\n"),
diff --git a/manifests/public.yaml b/manifests/public.yaml
index ced05ba..8b7ad3c 100644
--- a/manifests/public.yaml
+++ b/manifests/public.yaml
@@ -1,5 +1,11 @@
+# Recipe repository
repository: 'https://github.com/astroconda/astroconda-contrib'
+
+# Publication channel to consult when determining what packages already exist.
channel_URL: 'http://ssb.stsci.edu/astroconda'
+
+# publication_root path needs to be visible from the slave nodes.
+publication_root: '/eng/ssb/websites/ssbpublic/astroconda-j-pub-staging'
numpy_version: 1.13
packages:
- stsci.tools
diff --git a/manifests/test.yaml b/manifests/test.yaml
index 4d6806e..259a85f 100644
--- a/manifests/test.yaml
+++ b/manifests/test.yaml
@@ -1,5 +1,11 @@
+# Recipe repository
repository: 'https://github.com/astroconda/astroconda-dev'
+
+# Publication channel to consult when determining what packages already exist.
channel_URL: 'http://ssb.stsci.edu/astroconda-dev'
+
+# publication_root path needs to be visible from the slave nodes.
+publication_root: '/eng/ssb/websites/ssbpublic/astroconda-j-dev-staging'
numpy_version: 1.13
packages:
- costools