We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92a5228 commit 607c2fdCopy full SHA for 607c2fd
1 file changed
app/Jenkinsfile
@@ -7,17 +7,23 @@ pipeline {
7
}
8
9
triggers {
10
- pollSCM('H/5 * * * *')
+ githubPush()
11
12
13
stages {
14
stage('Checkout') {
15
+ when {
16
+ branch 'main'
17
+ }
18
steps {
19
checkout scm
20
21
22
23
stage('Build image on host Docker') {
24
25
26
27
28
sh """
29
cd app
@@ -27,6 +33,9 @@ pipeline {
33
34
35
stage('Stop and remove old container') {
36
37
38
30
39
31
40
32
41
docker stop ${CONTAINER_NAME} || true
@@ -36,6 +45,9 @@ pipeline {
45
46
47
stage('Start new container') {
48
49
50
51
52
53
docker run -d \
0 commit comments