add woodpecker ci

This commit is contained in:
alexandra catalina 2024-02-08 15:46:17 -08:00
parent f90191b1cd
commit fcec714e49
3 changed files with 41 additions and 2 deletions

18
.woodpecker/.build.yaml Normal file
View file

@ -0,0 +1,18 @@
when:
- branch: trunk
path:
include: [
'Dockerfile',
'sass/*',
'output/the-library-genesis-api.html',
'index.html',
'gifs'
]
steps:
- name: build
image: gcr.io/kaniko-project/executor:v1.7.0-debug
secrets: [CI_REGISTRY_USER, CI_REGISTRY_PASSWORD]
commands:
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context "${CI_WORKSPACE}" --cache=true --dockerfile "${CI_WORKSPACE}/Dockerfile" --destination "${CI_REGISTRY_USER}/${CI_REPO_NAME}:latest" --destination "${CI_REGISTRY_USER}/${CI_REPO_NAME}:${CI_COMMIT_SHA}"

21
.woodpecker/.deploy.yaml Normal file
View file

@ -0,0 +1,21 @@
when:
- branch: trunk
path:
include: [
'Dockerfile',
'sass/*',
'output/the-library-genesis-api.html',
'index.html',
'gifs'
]
variables:
- &kubectl_setup mkdir -p /root/.kube && echo "$KUBEAUTH" | base64 -d > /root/.kube/config && chmod 0600 /root/.kube/config
steps:
- name: deploy
image: dtzar/helm-kubectl:${HELM_VER}
commands:
- helm dependency update chart
- helm upgrade --install --set image.tag="${CI_COMMIT_SHA}" --namespace garbage garbage-world chart --atomic
secrets: [KUBEAUTH]

View file

@ -5,8 +5,8 @@
replicaCount: 1
image:
repository: registry.gitlab.com/strumpet/garbage.world
pullPolicy: Always
repository: grumble/garbage
pullPolicy: IfNotPresent
tag: latest
imagePullSecrets: []