forked from UST-GPS-SEIS615/java-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
24 lines (23 loc) · 943 Bytes
/
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
properties([pipelineTriggers([githubPush()])])
node('linux') {
stage('Unit Tests'){
git 'https://github.com/wygsephi/java-project.git'
sh 'ant -f test.xml -v'
junit 'reports/result.xml'
}
stage('Build'){
sh 'ant -f build.xml -v'
}
stage('Deploy'){
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: '28b3c933-f5a1-4396-afd2-5d892f86afe0', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
// some block
sh 'aws s3 cp build.xml s3://seis665-03-asm10/rectangle-2.jar'
}
}
stage('Report'){
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: '28b3c933-f5a1-4396-afd2-5d892f86afe0', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
// some block
sh 'aws cloudformation describe-stack-resources --region us-east-1 --stack-name jenkins665'
}
}
}