-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
54 lines (51 loc) · 2.66 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
def jobName = env.JOB_NAME
def jobBaseSlashPos = jobName.indexOf('/')
String jobBaseName
if(jobBaseSlashPos != -1) {
jobBaseName = jobName.substring(0, jobBaseSlashPos)
} else {
jobBaseName = jobName
}
def branchName = env.BRANCH_NAME
def exec(String cmd) {
sh(script: cmd)
}
properties([
buildDiscarder(logRotator(numToKeepStr: '2')),
disableConcurrentBuilds(),
pipelineTriggers([
upstream(
threshold: hudson.model.Result.SUCCESS,
upstreamProjects: '/metaborgcube/IceDust/master'
)
])
])
node {
stage('Echo') {
// Print important variables and versions for debugging purposes.
echo "Job ${jobName} (base: ${jobBaseName}) on branch ${branchName}"
exec 'bash --version'
exec 'python3 --version'
exec 'pip3 --version'
exec 'java -version'
exec 'mvn --version'
}
stage('Spoofax-deploy Repo'){
checkout scm
exec 'git clean -ddffxx'
exec 'git clone https://github.com/metaborg/spoofax-deploy.git'
}
stage('Generate Eclipses'){
exec 'sh spoofax-deploy/releng/run.sh gen-eclipse -d dist/eclipse -o macosx -h x64 -a -j --archive-jre-separately --install icedust.eclipse.feature.feature.group --repo http://buildfarm.metaborg.org/job/metaborgcube/job/IceDust/job/master/lastSuccessfulBuild/artifact/icedust.eclipse.updatesite/target/site/'
exec 'sh spoofax-deploy/releng/run.sh gen-eclipse -d dist/eclipse -o linux -h x64 -a -j --archive-jre-separately --install icedust.eclipse.feature.feature.group --repo http://buildfarm.metaborg.org/job/metaborgcube/job/IceDust/job/master/lastSuccessfulBuild/artifact/icedust.eclipse.updatesite/target/site/'
exec 'sh spoofax-deploy/releng/run.sh gen-eclipse -d dist/eclipse -o linux -h x86 -a -j --archive-jre-separately --install icedust.eclipse.feature.feature.group --repo http://buildfarm.metaborg.org/job/metaborgcube/job/IceDust/job/master/lastSuccessfulBuild/artifact/icedust.eclipse.updatesite/target/site/'
exec 'sh spoofax-deploy/releng/run.sh gen-eclipse -d dist/eclipse -o windows -h x64 -a -j --archive-jre-separately --install icedust.eclipse.feature.feature.group --repo http://buildfarm.metaborg.org/job/metaborgcube/job/IceDust/job/master/lastSuccessfulBuild/artifact/icedust.eclipse.updatesite/target/site/'
exec 'sh spoofax-deploy/releng/run.sh gen-eclipse -d dist/eclipse -o windows -h x86 -a -j --archive-jre-separately --install icedust.eclipse.feature.feature.group --repo http://buildfarm.metaborg.org/job/metaborgcube/job/IceDust/job/master/lastSuccessfulBuild/artifact/icedust.eclipse.updatesite/target/site/'
}
stage('Archive') {
archiveArtifacts artifacts: 'dist/', onlyIfSuccessful: true
}
stage('Cleanup') {
exec 'git clean -ddffxx'
}
}