-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
30 lines (27 loc) · 729 Bytes
/
Jenkinsfile
File metadata and controls
30 lines (27 loc) · 729 Bytes
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
def website_endpoint = "http://adrik-udacity-static.s3-website-eu-west-1.amazonaws.com/"
pipeline {
agent any
stages {
stage('Lint HTML') {
steps {
sh 'tidy -q -e *.html'
}
}
stage('Upload to AWS') {
steps {
retry(3) {
withAWS(region:'eu-west-1',credentials:'aws-static') {
sh 'echo "Uploading content with AWS creds"'
s3Upload(pathStyleAccessEnabled: true, payloadSigningEnabled: true, file:'index.html', bucket:'adrik-udacity-static')
}
}
}
}
stage('Verify Website') {
steps {
sh 'echo "Verifying website is UP"'
sh "curl -sSf ${website_endpoint} > /dev/null"
}
}
}
}