update gitlab ci

This commit is contained in:
Graham McIntire 2026-01-11 13:33:54 -06:00
parent 1a619b47b2
commit d382f6a46e
No known key found for this signature in database
2 changed files with 13 additions and 13 deletions

View file

@ -13,8 +13,8 @@ workflow:
build:
stage: build
interruptible: true
tags:
- gitlabrunner
# tags:
# - gitlabrunner
image: docker:27
services:
- docker:27-dind
@ -25,12 +25,12 @@ build:
- docker pull $CI_REGISTRY_IMAGE:latest || true
# Build with cache-from for faster builds and inline cache for future builds
- docker build
--cache-from $CI_REGISTRY_IMAGE:latest
--build-arg BUILDKIT_INLINE_CACHE=1
-f k8s/Dockerfile
-t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-t $CI_REGISTRY_IMAGE:latest
.
--cache-from $CI_REGISTRY_IMAGE:latest
--build-arg BUILDKIT_INLINE_CACHE=1
-f k8s/Dockerfile
-t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
-t $CI_REGISTRY_IMAGE:latest
.
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
rules:
@ -39,14 +39,14 @@ build:
deploy:
stage: deploy
needs: ["build"]
tags:
- gitlabrunner
# tags:
# - gitlabrunner
image:
name: bitnami/kubectl:latest
entrypoint: ['']
entrypoint: [""]
script:
- kubectl config get-contexts
- kubectl config use-context graham/towerops:towerops
- kubectl config use-context towerops/towerops:towerops
# Deploy new version (migrations run on app start)
- kubectl set image deployment/towerops towerops=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA -n towerops
- kubectl rollout status deployment/towerops -n towerops --timeout=5m

View file

@ -24,7 +24,7 @@ spec:
type: RuntimeDefault
containers:
- name: towerops
image: registry.gitlab.com/graham/towerops:latest
image: registry.gitlab.com/towerops/towerops:latest
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false