diff options
author | Matt Rendina <mrendina@stsci.edu> | 2019-02-18 16:07:49 -0500 |
---|---|---|
committer | Matt Rendina <mrendina@stsci.edu> | 2019-02-18 16:07:49 -0500 |
commit | e19efd8eae8f63591d47b86568a9a8259304a17e (patch) | |
tree | 1313008b96f10fd950076e4544a79316b6b9ea60 | |
parent | 764e30b817e8a4fb3d030bffa239e4aad49349fb (diff) | |
download | delivery_control-e19efd8eae8f63591d47b86568a9a8259304a17e.tar.gz |
Check for JenkinsfileRT after clone takes place.
-rw-r--r-- | deliver.groovy | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/deliver.groovy b/deliver.groovy index 8b96c68..5592154 100644 --- a/deliver.groovy +++ b/deliver.groovy @@ -93,15 +93,10 @@ def gen_specfiles(label, run_tests) { def env_name = sh(script: "ls hstdp*", returnStdout: true).trim()[0..-5] println("env_name: ${env_name}") for (pkg in pkg_list.tokenize()) { - pkg_name = pkg.tokenize('=')[0] - jenkinsfile = "${WORKDIR}/${pkg_name}/JenkinsfileRT" - if (!(fileExists(jenkinsfile))) { - continue - } else { - println("Found JenkinsfileRT not found for ${pkg_name}, installing and running tests.") - } //end if(!(fileExists(jenkinsfile))) println("Extracting metadata for ${pkg}...") + pkg_name = pkg.tokenize('=')[0] println("pkg_name: ${pkg_name}") + pkg_version = pkg.tokenize('=')[1] ccmd = "${conda_exe} list -n ${env_name} | grep ${pkg_name} | grep dev" pkg_info = sh(script: ccmd, @@ -115,9 +110,17 @@ def gen_specfiles(label, run_tests) { meta = readYaml(filedata) git_url = meta['source'].git_url - // Use this clone to run the full test suite. + // Use this clone to run the full test suite if defined. sh "git clone ${git_url} ./${pkg_name}" + jenkinsfile = "${WORKDIR}/${pkg_name}/JenkinsfileRT" + if (!(fileExists(jenkinsfile))) { + println("${jenkinsfile} not found, skipping package.") + continue + } else { + println("Found JenkinsfileRT for ${pkg_name}, installing and running tests.") + } //end if(!(fileExists(jenkinsfile))) + // For development only. Disable before use. //if (pkg_name == "hstcal") { // jenkinsfile = "./JenkinsfileRT" @@ -125,10 +128,6 @@ def gen_specfiles(label, run_tests) { ////jenkinsfile = "${WORKDIR}/${pkg_name}/JenkinsfileRT" //} - - // Only run tests if JenkinsfileRT exists for project. - //if (fileExists(jenkinsfile)) { - // Post-process each -dev project's JenkinsfileRT to allow // importing of only the configuration values without running // the processing machinery called within which would complicate @@ -229,7 +228,6 @@ def gen_specfiles(label, run_tests) { } - //sh "conda remove ${conda_pkgs} --force -y" sh "conda remove ${remove_pkgs} --force -y" // Read in test reports for display. |