-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_MAC
24 lines (21 loc) · 1.08 KB
/
Jenkinsfile_MAC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
node {
try {
stage ('Checkout Scm') {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github', url: 'https://github.com/kavaka123/alpha-blog.git']]])
}
stage('Unit/Integration test and generating Junit test results') {
sh "export PATH=$PATH:/Users/akaki/.rvm/bin && source \$(rvm 2.5.1 do rvm env --path) && bundle install && rake test"
// sh "rails test"
junit keepLongStdio: true, testResults: '**/test/reports/*.xml'
}
stage('Build a tar file and archive') {
sh "tar --exclude ./.bundle --exclude ./tmp --exclude ./.git --exclude ./log --exclude ./db/*.sqlite3 --exclude *.tar.gz -cvzf ${JOB_NAME}${BUILD_ID}.tar.gz ."
archiveArtifacts artifacts: '*.tar.gz', onlyIfSuccessful: true
}
} finally {
stage ('Cleanup workspace') {
echo "Cleaning up workspace in jenkins home dir"
cleanWs()
}
}
}