generated from Templates/html-nginx-deployment
Compare commits
2 Commits
feature/in
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 443eef5225 | |||
| 9963dbfcc6 |
8
cicd/Jenkinsfile
vendored
8
cicd/Jenkinsfile
vendored
@@ -10,6 +10,8 @@ kind: Pod
|
|||||||
metadata:
|
metadata:
|
||||||
name: wedding-fe-"""+BRANCH_NAME+"""-build
|
name: wedding-fe-"""+BRANCH_NAME+"""-build
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
serviceAccountName: jenkins-admin
|
serviceAccountName: jenkins-admin
|
||||||
containers:
|
containers:
|
||||||
- name: kaniko
|
- name: kaniko
|
||||||
@@ -20,7 +22,7 @@ spec:
|
|||||||
- name: kaniko-secret
|
- name: kaniko-secret
|
||||||
mountPath: /kaniko/.docker
|
mountPath: /kaniko/.docker
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: 192.168.195.195:30000/nginx:latest
|
image: 192.168.195.195:30000/deploy-arm64:latest
|
||||||
command: ["tail"]
|
command: ["tail"]
|
||||||
args: ["-f", "/dev/null"]
|
args: ["-f", "/dev/null"]
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
@@ -55,10 +57,8 @@ spec:
|
|||||||
stage('Kubernetes Deploy') {
|
stage('Kubernetes Deploy') {
|
||||||
steps {
|
steps {
|
||||||
container("deploy") {
|
container("deploy") {
|
||||||
sh 'curl -LO "https://storage.googleapis.com/kubernetes-release/release/v1.24.3/bin/linux/arm64/kubectl"'
|
|
||||||
sh 'chmod u+x ./kubectl'
|
|
||||||
sh 'sed -ie "s/{{replaceMe}}/`date +%s`/g" `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
|
sh 'sed -ie "s/{{replaceMe}}/`date +%s`/g" `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
|
||||||
sh './kubectl apply -f `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
|
sh '/utils/kubectl apply -f `pwd`/cicd/'+env.BRANCH_NAME+'/deployment.yaml'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ spec:
|
|||||||
app: wedding-fe-main
|
app: wedding-fe-main
|
||||||
delpoymentDate: "{{replaceMe}}"
|
delpoymentDate: "{{replaceMe}}"
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
containers:
|
containers:
|
||||||
- name: wedding-fe-main
|
- name: wedding-fe-main
|
||||||
image: 192.168.195.195:30000/wedding-fe:main
|
image: 192.168.195.195:30000/wedding-fe:main
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ spec:
|
|||||||
app: wedding-fe-prod
|
app: wedding-fe-prod
|
||||||
delpoymentDate: "{{replaceMe}}"
|
delpoymentDate: "{{replaceMe}}"
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
containers:
|
containers:
|
||||||
- name: wedding-fe-prod
|
- name: wedding-fe-prod
|
||||||
image: 192.168.195.195:30000/wedding-fe:prod
|
image: 192.168.195.195:30000/wedding-fe:prod
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ spec:
|
|||||||
app: wedding-fe-stage
|
app: wedding-fe-stage
|
||||||
delpoymentDate: "{{replaceMe}}"
|
delpoymentDate: "{{replaceMe}}"
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
containers:
|
containers:
|
||||||
- name: wedding-fe-stage
|
- name: wedding-fe-stage
|
||||||
image: 192.168.195.195:30000/wedding-fe:stage
|
image: 192.168.195.195:30000/wedding-fe:stage
|
||||||
|
|||||||
Reference in New Issue
Block a user