draft: ci: Build container image
This image will be used to deploy the application on the Kubernetes cluster.
This commit is contained in:
16
ci/Jenkinsfile
vendored
16
ci/Jenkinsfile
vendored
@@ -51,5 +51,21 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Container') {
|
||||
steps {
|
||||
container('podman') {
|
||||
sh '. ci/build-container.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish Container') {
|
||||
steps {
|
||||
container('podman') {
|
||||
sh '. ci/publish-container.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
ci/build-container.sh
Normal file
5
ci/build-container.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
cp -r ui/dist container/ui
|
||||
cp -r svc/dist container/wheels
|
||||
podman build -t hudctrl:${BUILD_NUMBER} container
|
||||
@@ -27,3 +27,10 @@ spec:
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
- name: podman
|
||||
image: quay.io/containers/podman:v3.4
|
||||
command:
|
||||
- sleep
|
||||
- infinity
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
||||
3
ci/publish-container.sh
Normal file
3
ci/publish-container.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
podman push hudctrl:${BUILD_ID} registry.pyrocufflink.blue/hudctrl:${BUILD_ID}
|
||||
Reference in New Issue
Block a user