-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile_old
More file actions
44 lines (42 loc) · 1.05 KB
/
Jenkinsfile_old
File metadata and controls
44 lines (42 loc) · 1.05 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
pipeline {
environment{
a = """${sh(
returnStdout: true,
script: 'echo ${GIT_URL##*/}'
)}"""
CC2 = """${sh(
returnStdout: true,
script: 'echo ${a,,}'
)}"""
}
agent any
stages {
stage('Build') {
steps {
sh "e=${env.GIT_URL}"
sh 'echo $CC'
sh 'echo $CC2'
sh 'd=${c##*/}'
sh 'echo $d'
sh 'b=`echo `'
sh 'echo $b'
sh 'yarn'
}
}
stage('Test') {
steps {
sh 'ls'
}
}
stage('Deploy') {
steps {
sh 'b=${GIT_URL##*/}'
echo 'b'
echo '$b'
sh 'docker stop $b || true && docker rm $b || true'
sh 'docker build --tag $b .'
sh 'docker run -d -p 3333:3000 --name $b -e "PASSWORD=adminadmin" $b'
}
}
}
}