1 Star 0 Fork 19

海边的流浪汉/jiujiu-saas

forked from s11e-DAO/jiujiu-saas 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Jenkinsfile 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
boleixiongdi 提交于 2023-08-13 13:29 . feat(): init project
import groovy.json.JsonSlurper
node {
echo "PWD: ${pwd()}"
//git仓库地址
def GIT_REPOSITORY = "https://gitee.com/bsin-paas/bsin-ui-scaffold-react-app2.git"
//构建分支
def GIT_BRANCHES = "master"
//git认证ID
def GIT_CREDENTIALS_ID ='giteeID'
//镜像仓库地址
def REGISTRY_URL = 'https://registry.cn-hangzhou.aliyuncs.com'
//镜像仓库认证id
def REGISTRY_CREDENTIALS_ID = 'aliyunImg'
stage('Clone') {
checkout([$class: 'GitSCM', branches: [[name: "${GIT_BRANCHES}"]], extensions: [], userRemoteConfigs: [[credentialsId: "${GIT_CREDENTIALS_ID}", url: "${GIT_REPOSITORY}"]]])
}
stage('Build') {
}
stage('PushImage') {
docker.withRegistry("${REGISTRY_URL}" , "${REGISTRY_CREDENTIALS_ID}"){
def customImage = docker.build("bsin-paas/bsin-ui-scaffold-react-app2:${env.BUILD_ID}")
/* Push the container to the custom Registry */
customImage.push()
customImage.push('latest')
}
}
//jenkins服务器需要安排kubectl
/*stage("Deploy") {
sh "sed -i s/ngdb-dayu-web:latest/ngdb-dayu-web:${env.BUILD_ID}/g Deployment.yml"
sh '/usr/local/bin/kubectl apply -f Deployment.yml'
}*/
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/seahunter/jiujiu-saas.git
git@gitee.com:seahunter/jiujiu-saas.git
seahunter
jiujiu-saas
jiujiu-saas
master

搜索帮助