12 Star 78 Fork 50

飞致云X-Lab/RackShift

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Jenkinsfile 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
zhangdahai112 提交于 2022-02-13 03:24 . Update Jenkinsfile
pipeline {
agent {
node {
label 'metersphere'
}
}
options { quietPeriod(600) }
environment {
IMAGE_NAME = 'rackshift'
IMAGE_PREFIX = 'registry.cn-qingdao.aliyuncs.com/x-lab'
DOCKER = credentials('x-lab')
}
stages {
stage('Build') {
steps {
sh '''
rm -rf ${WORKSPACE}/rackshift-server/src/main/resources/static
mkdir -p ${WORKSPACE}/rackshift-server/src/main/resources/static
cd ${WORKSPACE}/rackshift-web
cnpm install
cnpm run build
cp -r ${WORKSPACE}/rackshift-web/dist/* ${WORKSPACE}/rackshift-server/src/main/resources/static
cd ${WORKSPACE}/rackshift-dhcp-proxy
mvn clean install
'''
}
}
stage('Docker build & push') {
steps {
sh '''
docker login registry.cn-qingdao.aliyuncs.com -u ${DOCKER_USR} -p ${DOCKER_PSW}
cd ${WORKSPACE}/rackshift-server
mvn clean install -DskipTests
docker build -t ${IMAGE_PREFIX}/${IMAGE_NAME}:v${BRANCH_NAME}-dev .
docker push ${IMAGE_PREFIX}/${IMAGE_NAME}:v${BRANCH_NAME}-dev
cd ${WORKSPACE}/rackshift-dhcp-proxy
docker build -t ${IMAGE_PREFIX}/rackshift-dhcp-proxy:v${BRANCH_NAME} .
docker push ${IMAGE_PREFIX}/rackshift-dhcp-proxy:v${BRANCH_NAME}
'''
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/fit2cloud-xlab/RackShift.git
git@gitee.com:fit2cloud-xlab/RackShift.git
fit2cloud-xlab
RackShift
RackShift
master

搜索帮助