Skip to content

Commit e32463d

Browse files
author
Vasileios Karakasis
authored
Merge pull request #1315 from teojgo/ci/deployment_jenkins
[ci] Create deployment Jenkinsfile
2 parents 65829a6 + 03a6cde commit e32463d

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

JenkinsfileDeploy

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
def tag = env.TAG_NAME
2+
def version = tag.substring(1) // Remove the first character of the tag which is 'v'
3+
def machines = '[dom daint TSAtds]' // To be included in the PR title
4+
def reviewersPR = 'teojgo,vkarak' // The Github usernames requested for review
5+
def ebTemplate = '3.0-dev5' // The eb recipe of ReFrame to use as template
6+
7+
stage('Deploy Tests') {
8+
node('daint') {
9+
dir('private_tests') {
10+
sh(returnStatus: true,
11+
script: """#!/bin/bash -l
12+
git clone [email protected]:eth-cscs/reframe-tests.git
13+
cd reframe-tests
14+
git tag -a -m "ReFrame private tests ${version} release" -f ${tag}
15+
git archive --format=tar.gz --prefix=reframe-tests-${version}/ ${tag} -o reframe-tests-${version}.tar.gz
16+
git push origin -f ${tag}
17+
cp reframe-tests-${version}.tar.gz /apps/common/easybuild/sources/r/reframe
18+
""")
19+
deleteDir()
20+
}
21+
}
22+
}
23+
24+
stage('Production PR') {
25+
node('daint') {
26+
dir('production_repo') {
27+
sh(returnStatus: true,
28+
script: """#!/bin/bash -l
29+
module load daint-gpu
30+
module load hub
31+
git clone [email protected]:eth-cscs/production.git
32+
cd production/easybuild/easyconfigs/r/reframe
33+
git checkout -b reframe/${version}
34+
sed -r "s/(version\\s*=\\s*)'${ebTemplate}'/\\1'${version}'/g" reframe-${ebTemplate}.eb > reframe-${version}.eb
35+
git add reframe-${version}.eb
36+
git commit -m "Add recipe for ReFrame version ${version}"
37+
git push origin HEAD
38+
hub pull-request -r ${reviewersPR} -m "${machines} Add recipe for ReFrame version ${version}"
39+
""")
40+
deleteDir()
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)