Jenkins build

This commit is contained in:
2023-02-03 00:21:17 +08:00
parent 209930f295
commit d31884fcbc

15
Jenkinsfile vendored
View File

@@ -4,6 +4,15 @@ kind: Pod
spec:
restartPolicy: Never
containers:
- image: docker.sunxinao.cn/gardel/nodejs-ci:latest
name: nodejs
command:
- sleep
args:
- 99d
volumeMounts:
- name: npm-cache
mountPath: /root/.npm
- image: golang:1.19-alpine
name: golang
command:
@@ -26,6 +35,9 @@ spec:
- name: kaniko-cache
persistentVolumeClaim:
claimName: build-cache-docker
- name: npm-cache
persistentVolumeClaim:
claimName: build-cache-npm
- name: docker-config
secret:
secretName: docker-config
@@ -45,6 +57,9 @@ spec:
git branch: env.BRANCH_NAME, credentialsId: 'gardel', url: 'git@sunxinao.cn:gardel/yggdrasil-go.git'
}
stage('编译') {
container('nodejs') {
sh 'make assets'
}
container('golang') {
sh 'apk --no-cache add build-base'
sh 'make package'