mirror of
https://github.com/pragma-/pbot.git
synced 2025-10-19 17:47:29 +02:00
Second attempt at deploying.
This commit is contained in:
parent
3b023f34be
commit
5c4b13cdaf
32
.github/workflows/candide.yaml
vendored
32
.github/workflows/candide.yaml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Deploy candide for Libera
|
name: candide
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -15,8 +15,8 @@ env:
|
|||||||
IMAGE: pbot
|
IMAGE: pbot
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy-gke-prod:
|
build:
|
||||||
name: Build & Deploy to GKE in Production
|
name: Build & Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -35,13 +35,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
|
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
|
||||||
|
|
||||||
#- name: 'Set up Cloud SDK'
|
|
||||||
# uses: 'google-github-actions/setup-gcloud@v1'
|
|
||||||
|
|
||||||
#- name: Setup kubectl
|
|
||||||
# id: install-kubectl
|
|
||||||
# uses: azure/setup-kubectl@v3
|
|
||||||
|
|
||||||
- name: Set up GKE credentials
|
- name: Set up GKE credentials
|
||||||
uses: google-github-actions/get-gke-credentials@v2
|
uses: google-github-actions/get-gke-credentials@v2
|
||||||
with:
|
with:
|
||||||
@ -63,21 +56,8 @@ jobs:
|
|||||||
- name: Push image
|
- name: Push image
|
||||||
run: |-
|
run: |-
|
||||||
docker push "gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA"
|
docker push "gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA"
|
||||||
|
|
||||||
# - name: Set up Kustomize
|
- name: Deploy
|
||||||
# run: |-
|
|
||||||
# curl -sfLo kustomize https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
|
|
||||||
# chmod u+x ./kustomize
|
|
||||||
#
|
|
||||||
# - name: Deploy image
|
|
||||||
# run: |-
|
|
||||||
# # replacing the image name in the k8s template
|
|
||||||
# ./kustomize edit set image LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY/IMAGE:TAG=gcr.io/$PROJECT_ID/$REPOSITORY/$IMAGE:$GITHUB_SHA
|
|
||||||
# ./kustomize build . | kubectl apply -f -
|
|
||||||
# kubectl rollout status deployment/$DEPLOYMENT_NAME
|
|
||||||
# kubectl get services -o wide
|
|
||||||
|
|
||||||
- name: Deploy image
|
|
||||||
run: |-
|
run: |-
|
||||||
sed -i -e 's/IMAGE_PLACEHOLDER/'$PROJECT_ID/$REPOSITORY/$IMAGE:${{ github.sha }}'/' k8s/deployment.yaml
|
sed -e "s/PROJECT_ID/$PROJECT_ID/g" -e "s/REPOSITORY/$REPOSITORY/g" -e "s/IMAGE/$IMAGE/g" -e "s/GITHUB_SHA/$GITHUB_SHA/g" k8s/deployment.yaml
|
||||||
kubectl apply -f k8s/deployment.yaml
|
kubectl apply -f k8s/deployment.yaml
|
@ -19,7 +19,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: candide
|
- name: candide
|
||||||
image: IMAGE_PLACEHOLDER
|
image: gcr.io/PROJECT_ID/REPOSITORY/IMAGE:GITHUB_SHA
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /mnt/persistent
|
- mountPath: /mnt/persistent
|
||||||
name: persistent
|
name: persistent
|
||||||
@ -30,6 +30,9 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
cpu: "0.5"
|
cpu: "0.5"
|
||||||
memory: 500Mi
|
memory: 500Mi
|
||||||
|
args:
|
||||||
|
- "data_dir=/mnt/persistent"
|
||||||
|
- "irc.botnick=candide_"
|
||||||
volumes:
|
volumes:
|
||||||
- name: persistent
|
- name: persistent
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user