1 Star 0 Fork 0

itcaijia/happyride

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Jenkinsfile 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
alexcheng1982 提交于 2020-07-30 19:03 . Update Jenkinsfile
addressServiceImageTag = ''
pipeline {
agent {
kubernetes {
yaml """
apiVersion: v1
kind: Pod
spec:
serviceAccountName: deploy-user
securityContext:
fsGroup: 1000
containers:
- name: maven
image: maven:3.6.3-jdk-8
command:
- sleep
args:
- infinity
resources:
requests:
cpu: "0.5"
memory: 512Mi
limits:
cpu: "1"
memory: 1Gi
volumeMounts:
- name: dockersock
mountPath: "/var/run/docker.sock"
- name: helmfile
image: quay.io/roboll/helmfile:helm3-v0.125.0
command:
- sleep
args:
- infinity
resources:
limits:
cpu: "0.5"
memory: 256Mi
volumes:
- name: dockersock
hostPath:
path: /var/run/docker.sock
"""
}
}
stages {
stage('Build') {
environment {
BUILD_DOCKER = true
CONTAINER_REGISTRY='docker-registry:5000'
}
steps {
git 'https://github.com/alexcheng1982/happyride'
container('maven') {
sh 'mvn -B -ntp -Dmaven.test.failure.ignore install'
junit '**/target/surefire-reports/TEST-*.xml'
script {
addressServiceImageTag = readFile("happyride-address-service/target/image_tag.txt")
}
}
}
}
stage('Deploy') {
environment {
ADDRESS_SERVICE_VERSION = "${addressServiceImageTag}"
CONTAINER_REGISTRY = "localhost:30000"
}
steps {
git 'https://github.com/alexcheng1982/happyride'
container('helmfile') {
sh 'cd k8s/happyride/apps/address-service && helmfile apply'
}
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tzxy_admin/happyride.git
git@gitee.com:tzxy_admin/happyride.git
tzxy_admin
happyride
happyride
master

搜索帮助