diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2019-06-19 14:10:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 14:10:29 -0400 |
commit | 7f123b810c6b49498b14e01029d06e8b5e6ac839 (patch) | |
tree | 62367734278625b47c8fe9d7fbb5ead8fb77f435 | |
parent | 98aaadd0d686909a7040d549b851cb4ccb790ef0 (diff) | |
download | jscu_refactor-7f123b810c6b49498b14e01029d06e8b5e6ac839.tar.gz |
Add git+ prefix to URL of target project in `pip` section of environment .yml file (#55)1.3.18
* Add missing git+ prefix to pip URL for source project in env dump
* Escape $
-rw-r--r-- | Jenkinsfile | 2 | ||||
-rw-r--r-- | vars/utils.groovy | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 4cc967a..25758ae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ -//@Library('utils@subdirfix') _ +//@Library('utils@ymlfix') _ // [skip ci] and [ci skip] have no effect here. if (utils.scm_checkout(['skip_disable':true])) return diff --git a/vars/utils.groovy b/vars/utils.groovy index 2fb8fe5..57c9ef6 100644 --- a/vars/utils.groovy +++ b/vars/utils.groovy @@ -527,13 +527,16 @@ def buildAndTest(config) { // Remove 'prefix' line as it isn't needed and complicates the // addition of the 'pip' section. sh(script: "sed -i '/prefix/d' '${dump_name}'") + // Remove any blank lines + sh(script: "sed -i '/^ *\$/d' '${dump_name}'") def pip_section = sh(script: "grep 'pip:' '${dump_name}'", returnStatus: true) + // Add 'pip' section if one is not already present. if (pip_section != 0) { sh "echo ' - pip:' >> '${dump_name}'" } // Add git+https line in pip section to install the commit // used for the target project of this job. - def extra_yml_1 = " - ${remote_repo}@${commit}" + def extra_yml_1 = " - git+${remote_repo}@${commit}" sh "echo '${extra_yml_1}' >> '${dump_name}'" // Stash spec file for use on master node. |