配置 Jenkins pipeline
This commit is contained in:
parent
bf4ccde35d
commit
574f467bc8
|
@ -0,0 +1,44 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
tools {
|
||||
nodejs 'node'
|
||||
}
|
||||
|
||||
environment {
|
||||
DISABLE_AUTH = 'true'
|
||||
DB_ENGINE = 'sqlite'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('CONFIG') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
sh 'cd Vuejs/Admin'
|
||||
sh 'yarn install'
|
||||
sh 'npx browserslist@latest --update-db'
|
||||
}
|
||||
}
|
||||
|
||||
stage('BUILD VUE') {
|
||||
steps {
|
||||
echo 'Vue Building..'
|
||||
sh 'yarn build'
|
||||
}
|
||||
}
|
||||
stage('BUILD DOCKER') {
|
||||
steps {
|
||||
echo 'Testing..'
|
||||
sh 'docker image prune -f'
|
||||
sh 'docker build -f Dockerfile -t usvisartrack_ui:0.0.9 --label usvisartrack_ui .'
|
||||
}
|
||||
}
|
||||
stage('DEPLOY DOCKER') {
|
||||
steps {
|
||||
echo 'Deploying....'
|
||||
sh 'docker tag usvisartrack_ui:0.0.9 repo-docker.ossez.com/docker-hub/usvisartrack_ui:0.0.9'
|
||||
sh 'docker push repo-docker.ossez.com/docker-hub/usvisartrack_ui:0.0.9'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue