forked from dcos/dcos-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.reruns
81 lines (71 loc) · 1.94 KB
/
Jenkinsfile.reruns
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
81
#!/usr/bin/env groovy
@Library("sec_ci_libs@v2-latest") _
def master_branches = ["master", ] as String[]
pipeline {
agent {
dockerfile {
args "--shm-size=1g"
}
}
environment {
JENKINS_VERSION = "yes"
NODE_PATH = "node_modules"
INSTALLER_URL= "https://downloads.dcos.io/dcos/testing/master/dcos_generate_config.sh"
}
options {
timeout(time: 8, unit: "HOURS")
disableConcurrentBuilds()
}
stages {
stage("Authorization") {
steps {
user_is_authorized(master_branches, "8b793652-f26a-422f-a9ba-0d1e47eb9d89", "#frontend-dev")
}
}
stage("Build") {
steps {
sh "npm --unsafe-perm ci"
sh "npm run build-assets"
}
}
stage("Tests") {
steps {
sh "REPORT=false RERUN=100 npm run rerun:integration-tests"
}
post {
always {
archiveArtifacts artifacts: "cypress/**/*", allowEmptyArchive: true
junit testResults: "cypress/results.xml", allowEmptyResults: true
}
}
}
}
post {
failure {
withCredentials([
string(credentialsId: "8b793652-f26a-422f-a9ba-0d1e47eb9d89", variable: "SLACK_TOKEN")
]) {
slackSend (
channel: "#frontend-ci-status",
color: "danger",
message: "FAILED\nBranch: ${env.CHANGE_BRANCH}\nJob: <${env.RUN_DISPLAY_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>",
teamDomain: "mesosphere",
token: "${env.SLACK_TOKEN}",
)
}
}
unstable {
withCredentials([
string(credentialsId: "8b793652-f26a-422f-a9ba-0d1e47eb9d89", variable: "SLACK_TOKEN")
]) {
slackSend (
channel: "#frontend-ci-status",
color: "warning",
message: "UNSTABLE\nBranch: ${env.CHANGE_BRANCH}\nJob: <${env.RUN_DISPLAY_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>",
teamDomain: "mesosphere",
token: "${env.SLACK_TOKEN}",
)
}
}
}
}