Skip to content

Commit

Permalink
Merge #2214
Browse files Browse the repository at this point in the history
2214: [ci] on config update dispatch restart servers r=Deniallugo a=dennybaa

Signed-off-by: Denis Baryshev <[email protected]>

Co-authored-by: Denis Baryshev <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and dennybaa authored Mar 29, 2022
2 parents 6e30716 + 8363e9f commit 13b0a3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/server.update-config-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
ref:
description: Branch/tag to fetch configs from
required: true
restart:
description: Restart dependent services
required: false
type: boolean
default: true

jobs:
setup:
Expand All @@ -25,6 +30,7 @@ jobs:
ref: ${{ github.event.inputs.ref }}
cluster: ${{ needs.setup.outputs.cluster }}
namespace: ${{ needs.setup.outputs.release-namespace }}
restart: ${{ inputs.restart }}
secrets:
github-token: ${{ secrets.GH_TOKEN }}

Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/server.update-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: Kubernets namespace of the config
required: true
type: string
restart:
description: Restart dependent services
required: false
type: boolean
default: false
secrets:
github-token:
description: GitHub token
Expand Down Expand Up @@ -73,5 +78,7 @@ jobs:
kubectl delete configmap -n ${{ inputs.namespace }} server-env-custom || /bin/true
kubectl create configmap -n ${{ inputs.namespace }} server-env-custom --from-env-file=${{ env.ENVFILE }}
## JFI: Decide if we need to restart server/prover and might be others. Should this be a parameter?
# kubectl delete pod -n ${{ inputs.namespace }} -l app.kubernetes.io/instance=server
if [ "${{ inputs.restart }}" = "true" ]; then
kubectl rollout -n ${{ inputs.namespace }} restart deployment/server-api
kubectl rollout -n ${{ inputs.namespace }} restart deployment/server
fi

0 comments on commit 13b0a3c

Please sign in to comment.