Skip to content

Commit

Permalink
Merge pull request #6143 from Ocelot-Social-Community/deployment-upgr…
Browse files Browse the repository at this point in the history
…ade-to-specific-version

refactor(other): deployment upgrade to specific version, trigger build on stage
  • Loading branch information
ulfgebhardt authored Mar 15, 2023
2 parents bc38436 + f50862d commit 4dfeedd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,14 @@ jobs:
repository: ${{ github.repository }}
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'

- name: Repository Dispatch stage.ocelot.social
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ github.token }}
event-type: trigger-build-success
repository: 'Ocelot-Social-Community/stage.ocelot.social'
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'

# ##############################################################################
# # JOB: KUBERNETES DEPLOY ACTUAL/LATEST VERSION ######################################
# ##############################################################################
Expand Down
10 changes: 8 additions & 2 deletions deployment/scripts/cluster.upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ SCRIPT_DIR=$(dirname $SCRIPT_PATH)
# configuration
CONFIGURATION=${CONFIGURATION:-"example"}
KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml}
VALUES=${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubernetes/values.yaml
VALUES=${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubernetes/values.
DOCKERHUB_OCELOT_TAG=${DOCKERHUB_OCELOT_TAG:-"latest"}

# upgrade with helm
helm --kubeconfig=${KUBECONFIG} upgrade ocelot --values ${VALUES} ${SCRIPT_DIR}/../src/kubernetes/ --debug --timeout 10m
helm --kubeconfig=${KUBECONFIG} upgrade ocelot \
--values ${VALUES} \
--set appVersion="${DOCKERHUB_OCELOT_TAG}"
${SCRIPT_DIR}/../src/kubernetes/ \
--debug \
--timeout 10m

0 comments on commit 4dfeedd

Please sign in to comment.