-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjenkinsfile
More file actions
47 lines (45 loc) · 1.14 KB
/
jenkinsfile
File metadata and controls
47 lines (45 loc) · 1.14 KB
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
#!groovy
import groovy.json.*
def changeset
def branch
try {
pipeline {
agent any
stages {
stage('Checkout') {
steps {
sh 'sudo rm -rf *'
def scmVars = checkout scm
changeset = scmVars.GIT_COMMIT
sh "echo '${scmVars.GIT_BRANCH}' | sed 's/^origin\\///' > branch"
branch=readFile('branch').trim()
}
}
stage('Upload to Artifact Repository') {
steps {
echo "upload artifacts s3"
dir("web/bin") {
sh "aws s3 cp web.zip s3://ngdevbox/applications/web/${changeset}/web.zip"
}
}
}
stage('Running tests in Sandbox'){
steps{
def release = [:]
release['web'] = changeset
release['kong'] = changeset
release['cassandra'] = changeset
release['dashboard'] = changeset
cs18.blueprint("delivery-api-devtest-aws", release).doInsideSandbox{
echo "running tests"
sh "sleep 300"
}
}
}
}
}
} catch (err)
{
currentBuild.result = "FAILURE"
throw err
}