Explorar o código

更新 'Jenkinsfile'

sifu-gogs %!s(int64=2) %!d(string=hai) anos
pai
achega
373c02fed1
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Jenkinsfile

+ 4 - 0
Jenkinsfile

@@ -7,8 +7,11 @@ pipeline {
     stages {
         stage('Build') {
             steps {
+                sh 'docker-compose stop'
+                sh 'docker-compose rm -sf'
                 sh 'npm install --registry https://registry.npm.taobao.org'
                 sh 'npm run build:prod'
+                sh 'docker build -t HitSheep:0.1 .'
             }
         }
         stage('Test') {
@@ -19,6 +22,7 @@ pipeline {
         stage('Deploy') {
             steps {
                 echo 'Deploying....'
+                sh 'docker-compose up -d'
             }
         }
     }