-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
57 lines (53 loc) · 2.03 KB
/
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
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
@Library('cloudmc-jenkins-shared@master') _
pipeline {
agent { label 'cmc' }
options { disableConcurrentBuilds() }
tools {
maven 'maven-3.3.9'
}
environment {
GIT_URL = 'git@github.com:cloudops/cloudmc-todoist-plugin.git'
JAR_LOCATION = 'target/cloudmc-todoist-plugin.jar'
REPO_NAME = 'cloudmc-todoist-plugin'
}
stages {
stage('Build, test & archive') {
steps {
executeMavenBuild()
}
}
stage('Checking duplicate language label values') {
steps{
script {
getScriptDuplicateLabelValues()
def errorEn = sh script:"python3 ./pipeline/find_duplicate_label_values.py src/main/resources/translations/en", returnStatus:true
def errorFr = sh script:"python3 ./pipeline/find_duplicate_label_values.py src/main/resources/translations/fr", returnStatus:true
def errorEs = sh script:"python3 ./pipeline/find_duplicate_label_values.py src/main/resources/translations/es", returnStatus:true
currentBuild.result = 'SUCCESS'
if (errorEn == 1 || errorFr == 1 || errorEs == 1) {
rtp parserName: 'HTML', stableText: '<h1>Duplicate label values found!!!</h1>'
}
}
}
}
stage('Checking duplicate language label keys') {
steps{
script {
getScriptDuplicateLabelValues()
def errorEn = sh script:"python3 ./pipeline/find_duplicate_label_keys.py src/main/resources/translations/en", returnStatus:true
def errorFr = sh script:"python3 ./pipeline/find_duplicate_label_keys.py src/main/resources/translations/fr", returnStatus:true
def errorEs = sh script:"python3 ./pipeline/find_duplicate_label_keys.py src/main/resources/translations/es", returnStatus:true
if (errorEn == 1 || errorFr == 1 || errorEs == 1) {
rtp parserName: 'HTML', stableText: '<h1>Duplicate label keys found!!!</h1>'
}
}
}
}
}
post{
always {
junit 'target/surefire-reports/*.xml'
notifySlack currentBuild.result
}
}
}