1 Star 0 Fork 272

evoup.gitee/crawlab

forked from tikazyq/crawlab 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Jenkinsfile 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
tikazyq 提交于 2019-11-01 13:10 . updated Jenkinsfile
pipeline {
agent {
node {
label 'crawlab'
}
}
stages {
stage('Setup') {
steps {
echo "Running Setup..."
script {
if (env.GIT_BRANCH == 'develop') {
env.TAG = 'develop'
env.DOCKERFILE = 'Dockerfile.local'
} else if (env.GIT_BRANCH == 'master') {
env.TAG = 'master'
env.DOCKERFILE = 'Dockerfile.local'
}
}
}
}
stage('Build') {
steps {
echo "Building..."
sh """
docker build -t tikazyq/crawlab:${ENV:TAG} -f ${ENV:DOCKERFILE} .
"""
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
sh """
# 重启docker compose
cd ./jenkins/${ENV:GIT_BRANCH}
docker-compose down | true
docker-compose up -d | true
"""
}
}
stage('Cleanup') {
steps {
echo 'Cleanup...'
sh """
docker rmi -f `docker images | grep '<none>' | grep -v IMAGE | awk '{ print \$3 }' | xargs`
"""
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/evoup/crawlab.git
git@gitee.com:evoup/crawlab.git
evoup
crawlab
crawlab
master

搜索帮助