fix: docker image with DB migrations also needs to be published
This commit is contained in:
parent
51d4443d61
commit
887cb3bdb0
|
@ -9,7 +9,7 @@ steps:
|
|||
- kubeconfig
|
||||
commands:
|
||||
- "mkdir ~/.kube && echo \"$KUBECONFIG\" > ~/.kube/twhelp"
|
||||
- "cd ./k8s/overlays/prod && kustomize edit set image dcbot=gitea.dwysokinski.me/twhelp-packages/dcbot:${DRONE_TAG##v} dcbot-migrations=gitea.dwysokinski.me/twhelp-packages/dcbot-migrations:${DRONE_TAG##v} && cd ../../.."
|
||||
- "cd ./k8s/overlays/prod && kustomize edit set image dcbot=gitea.dwysokinski.me/twhelp-packages/dcbot:${CI_COMMIT_TAG##v} dcbot-migrations=gitea.dwysokinski.me/twhelp-packages/dcbot-migrations:${CI_COMMIT_TAG##v} && cd ../../.."
|
||||
- "kubectl --kubeconfig ~/.kube/twhelp -n twhelp delete jobs.batch twhelp-dcbot-migrations-job || true"
|
||||
- kustomize build ./k8s/overlays/prod | kubectl --kubeconfig ~/.kube/twhelp apply -n twhelp -f -
|
||||
notify:
|
||||
|
|
|
@ -5,6 +5,7 @@ when:
|
|||
steps:
|
||||
publish:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
group: publish
|
||||
settings:
|
||||
platforms: linux/amd64
|
||||
repo: gitea.dwysokinski.me/twhelp-packages/dcbot
|
||||
|
@ -17,6 +18,21 @@ steps:
|
|||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
publish-migrations:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
group: publish
|
||||
settings:
|
||||
platforms: linux/amd64
|
||||
repo: gitea.dwysokinski.me/twhelp-packages/dcbot-migrations
|
||||
registry: gitea.dwysokinski.me
|
||||
dockerfile: ./build/docker/dcbot-migrations/Dockerfile
|
||||
auto_tag: true
|
||||
build_args:
|
||||
- CI_COMMIT_TAG=${CI_COMMIT_TAG}
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
notify:
|
||||
image: deblan/woodpecker-email
|
||||
settings:
|
||||
|
|
|
@ -47,3 +47,10 @@ steps:
|
|||
commands:
|
||||
- go mod tidy
|
||||
- git diff --exit-code go.mod
|
||||
|
||||
validate-migrations:
|
||||
image: *go_image
|
||||
group: test
|
||||
pull: true
|
||||
commands:
|
||||
- make validate-migrations
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
image: gitea.dwysokinski.me/twhelp-packages/dcbot-migrations:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: gitea.dwysokinski.me/twhelp-packages/dcbot-migrations:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
|
@ -1,13 +0,0 @@
|
|||
image: gitea.dwysokinski.me/twhelp-packages/dcbot:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
-
|
||||
image: gitea.dwysokinski.me/twhelp-packages/dcbot:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
Loading…
Reference in New Issue