Added CI resources

This commit is contained in:
2022-09-14 23:21:27 +08:00
parent 9b48f2ee50
commit 619a99a6dd
4 changed files with 86 additions and 0 deletions

24
concourse/build.yaml Normal file
View File

@@ -0,0 +1,24 @@
platform: linux
image_resource:
type: registry-image
source:
repository: concourse/oci-build-task
inputs:
- name: project-src
path: .
outputs:
- name: image
caches:
- path: cache
params:
CONTEXT: .
# Reference: https://concourse-ci.org/building-an-image-and-using-it-in-a-task.html#build-the-image
UNPACK_ROOTFS: true
run:
path: build

View File

@@ -0,0 +1,21 @@
platform: linux
image_resource:
type: registry-image
source:
repository: alpine
inputs:
- name: project-src
path: .
outputs:
- name: deploy-confs
run:
path: sh
args:
- -exc
- |
VERSION=$( cat commit.sha )
sed "s/IMAGE_TAG/$VERSION/g" k8s/deployments.yaml >> deploy-confs/prod.yaml