Revert "Reapply "ci: deploy via rollout restart instead of git-commit image bumps""
This reverts commit 40ad86b49e.
This commit is contained in:
parent
40ad86b49e
commit
8cea244ea5
2 changed files with 18 additions and 15 deletions
|
|
@ -45,17 +45,20 @@ jobs:
|
||||||
docker push "${IMAGE}:${TAG}"
|
docker push "${IMAGE}:${TAG}"
|
||||||
docker push "${IMAGE}:main"
|
docker push "${IMAGE}:main"
|
||||||
|
|
||||||
- name: Install kubectl
|
- name: Update deployment manifest
|
||||||
run: |
|
run: |
|
||||||
curl -sLO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||||
install -m 0755 kubectl /usr/local/bin/kubectl
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
|
sed -i "s|image: ${IMAGE}:.*|image: ${IMAGE}:${TAG}|g" k8s/deployment.yaml
|
||||||
|
|
||||||
- name: Trigger rollout (no git commit)
|
- name: Commit and push updated manifest
|
||||||
env:
|
|
||||||
KUBECONFIG_DATA: ${{ secrets.KUBECONFIG_DATA }}
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "$HOME/.kube"
|
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||||
printf '%s' "$KUBECONFIG_DATA" | base64 -d > "$HOME/.kube/config"
|
TAG="${{ steps.tag.outputs.tag }}"
|
||||||
chmod 600 "$HOME/.kube/config"
|
git config user.name "FluxCD"
|
||||||
kubectl -n aprs rollout restart deployment/aprs
|
git config user.email "fluxcd@w5isp.com"
|
||||||
kubectl -n aprs rollout status deployment/aprs --timeout=5m
|
git remote set-url origin https://x-token:${{ github.token }}@git.mcintire.me/graham/aprs.me.git
|
||||||
|
git add k8s/deployment.yaml
|
||||||
|
git diff --cached --quiet && echo "No changes to commit" && exit 0
|
||||||
|
git commit -m "chore: update aprs.me image to ${IMAGE}:${TAG} [skip ci]"
|
||||||
|
git push origin main
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ spec:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: migrate
|
- name: migrate
|
||||||
image: git.mcintire.me/graham/aprs.me:main
|
image: git.mcintire.me/graham/aprs.me:main-1777404332-0625438
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: IfNotPresent
|
||||||
command: ["/app/bin/migrate"]
|
command: ["/app/bin/migrate"]
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
|
|
@ -82,8 +82,8 @@ spec:
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
containers:
|
containers:
|
||||||
- name: aprs
|
- name: aprs
|
||||||
image: git.mcintire.me/graham/aprs.me:main
|
image: git.mcintire.me/graham/aprs.me:main-1777404332-0625438
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: IfNotPresent
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue