-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
54 lines (51 loc) · 2.2 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
pipeline {
agent {
label "beta"
}
environment{
LOGIN_SERVER = "beta"
WEBHOOK_URL = credentials('Beta_Discord')
}
stages {
stage("fetch"){
steps{
echo "========Executing Fetch========"
sh"""
pwd
"""
git branch: "main", url: "https://[email protected]/CMPLR-Technologies/CMPLR-Technologies.Testing/_git/CMPLR-Technologies.Testing"
}
post{
success{
echo "=======fetch executed successfully========"
sh"""
cp ~/env/testing.env/cypress.env.json ./Web/cypress.env.json
cp ~/env/testing.env/PersonalData.json ./Web/cypress/fixtures/PersonalData.json
"""
}
failure{
echo "========fetch execution failed========"
discordSend description: "Jenkins Pipeline Build", thumbnail: "https://jenkins.io/images/logos/ninja/256.png" ,footer: "Fetch execution failed", result: currentBuild.currentResult, title: JOB_NAME, webhookURL: WEBHOOK_URL
}
}
}
stage('docker build') {
steps {
echo "========docker build ========"
sh """
docker build -t $LOGIN_SERVER/testing:latest .
"""
}
post {
success {
echo "========docker build success ========"
discordSend description: "Jenkins Pipeline Build", thumbnail: "https://jenkins.io/images/logos/ninja/256.png",footer: "Docker built successfully", result: currentBuild.currentResult, title: JOB_NAME, webhookURL: WEBHOOK_URL
}
failure {
echo "========docker build failed========"
discordSend description: "Jenkins Pipeline Build", thumbnail: "https://jenkins.io/images/logos/ninja/256.png" ,footer: "Docker building Failed", result: currentBuild.currentResult, title: JOB_NAME, webhookURL: WEBHOOK_URL
}
}
}
}
}