Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] add option to use custom spack-c2sm branch for spack tests #268

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion jenkins/spack-PR
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
def repo_identifier = "Project"
def spack_fork = "C2SM"
def spack_branch = "main"
String[] triggerPhrase = env.ghprbCommentBody.split(" ")

def parseTriggerPhrase(it) {
fork = it.split("=")[1].split("/")[0]
branch = it.split("=")[1].split("/")[1]
return [fork, branch]
}
triggerPhrase.each {
if(it.contains("spack${repo_identifier}")) {
(spack_fork, spack_branch) = parseTriggerPhrase(it)
}
}
pipeline {
agent none
stages {
Expand All @@ -20,7 +35,7 @@ pipeline {
stage('Clone Repos') {
steps {
sh """
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/C2SM/spack-c2sm.git
git clone --depth 1 --recurse-submodules --shallow-submodules -b '${spack_branch}' https://github.com/${spack_fork}/spack-c2sm.git
git clone . local_copy
"""
}
Expand Down
5 changes: 0 additions & 5 deletions jenkins/spack-PR-icon
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
def repo_identifier = "Project"
def icon_fork = "C2SM"
def icon_branch = "icon-dsl"
def icon_default = true
jonasjucker marked this conversation as resolved.
Show resolved Hide resolved

def spack_fork = "C2SM"
def spack_branch = "main"
def spack_default = true

def gt4py_fork = "GridTools"
def gt4py_branch = "icon4py_20230621"
Expand All @@ -20,19 +18,16 @@ def parseTriggerPhrase(it) {
triggerPhrase.each {
if(it.contains("icon${repo_identifier}")) {
(icon_fork, icon_branch) = parseTriggerPhrase(it)
icon_default = false
}
}
triggerPhrase.each {
if(it.contains("spack${repo_identifier}")) {
(spack_fork, spack_branch) = parseTriggerPhrase(it)
spack_default = false
}
}
triggerPhrase.each {
if(it.contains("gt4py${repo_identifier}")) {
(gt4py_fork, gt4py_branch) = parseTriggerPhrase(it)
gt4py_default = false
}
}

Expand Down
17 changes: 16 additions & 1 deletion jenkins/spack-PR-stable
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
def repo_identifier = "Project"
def spack_fork = "C2SM"
def spack_branch = "main"
String[] triggerPhrase = env.ghprbCommentBody.split(" ")

def parseTriggerPhrase(it) {
fork = it.split("=")[1].split("/")[0]
branch = it.split("=")[1].split("/")[1]
return [fork, branch]
}
triggerPhrase.each {
if(it.contains("spack${repo_identifier}")) {
(spack_fork, spack_branch) = parseTriggerPhrase(it)
}
}
pipeline {
agent none
stages {
Expand All @@ -20,7 +35,7 @@ pipeline {
stage('Clone Repos') {
steps {
sh """
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/C2SM/spack-c2sm.git
git clone --depth 1 --recurse-submodules --shallow-submodules -b '${spack_branch}' https://github.com/${spack_fork}/spack-c2sm.git
git clone . local_copy
"""
}
Expand Down