forked from FordLabs/retroquest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile-Dev
81 lines (80 loc) · 2.41 KB
/
Jenkinsfile-Dev
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
pipeline {
agent {
label 'chrome-jdk8'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '1', artifactNumToKeepStr: '1'))
}
stages {
stage('Setup Environment') {
steps {
container('chrome') {
sh './set_proxies.sh manifest-dev.yml'
}
}
}
stage('Frontend Tests') {
steps {
container('chrome') {
sh './gradlew uiUnitTests'
}
}
}
stage('Lint SCSS') {
steps {
container('chrome') {
sh './gradlew uiLintSCSS'
}
}
}
stage('Lint Typescript') {
steps {
container('chrome') {
sh './gradlew uiLintTypeScript'
}
}
}
stage('Build UI Prod Package') {
steps {
container('chrome') {
sh './gradlew buildProdPackage'
}
}
}
stage('Build API') {
steps {
container('chrome') {
sh './gradlew build'
}
}
}
stage('API Tests') {
steps {
container('chrome') {
sh './gradlew apiTest'
}
}
}
stage('Deploy Dev') {
steps {
withCredentials([usernamePassword(credentialsId: 'pcf-pe-prod', usernameVariable: 'CF_CCUSER', passwordVariable: 'CF_CCPASSWORD')]) {
container('common-utils') {
sh 'echo Logging in to Cloud Foundry'
sh 'cf login -u $CF_CCUSER -p $CF_CCPASSWORD -a https://api.sys.pd01.edc1.cf.ford.com -s Platform-Enablement-prod'
sh 'echo Blue-Green push to Cloud Foundry'
sh 'cf blue-green-deploy dev-retroquest -f manifest-dev.yml --delete-old-apps'
}
}
}
}
stage('Sonarqube') {
steps {
container('chrome') {
sh './gradlew sonarqube -Duser.home=$WORKSPACE'
sh './gradlew uiSonarqube -Dsonar.login=$SONAR_UI_TOKEN -Dsonar.host.url=$SONAR_URL'
}
}
}
}
}