Q-CTRL Open Controls 11.0.0 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release workflow | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Update version in code | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
source <(curl -sL http://ci.q-ctrl.com) | |
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} | |
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/housekeeping.sh | |
- name: Publish publicly | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
source <(curl -sL http://ci.q-ctrl.com) | |
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-release-publicly.sh | |
- name: Publish internally | |
run: | | |
./ci docker run qctrl/ci-images:python-3.11-ci /scripts/publish-release-internally.sh | |
sphinx_documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Retrieve build-time environment variables (Production) | |
run: | | |
source <(curl -sL http://ci.q-ctrl.com) | |
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} | |
./ci vault get -k SEGMENT_WRITE_KEY -t $(cat .token) -p secret/data/python/prod -o ./docs/SEGMENT_WRITE_KEY | |
./ci vault get -k DOCSEARCH_APP_ID -t $(cat .token) -p secret/data/python/prod -o ./docs/DOCSEARCH_APP_ID | |
./ci vault get -k DOCSEARCH_API_KEY -t $(cat .token) -p secret/data/python/prod -o ./docs/DOCSEARCH_API_KEY | |
./ci vault get -k DOCSEARCH_INDEX_NAME -t $(cat .token) -p secret/data/python/prod -o ./docs/DOCSEARCH_INDEX_NAME | |
- name: Build Sphinx Image and Push to DockerHub | |
run: | | |
./ci vault get -t $(cat .token) -p secret/data/dockerhub -k hub_user -o .hub_user | |
./ci vault get -t $(cat .token) -p secret/data/dockerhub -k hub_pass -o .hub_pass | |
./ci docker buildPush \ | |
-f ./docs/Dockerfile \ | |
-u $(cat .hub_user) \ | |
-p $(cat .hub_pass) \ | |
--suffix -docs | |
- name: Update Sphinx deployment in Kubernetes (Production) | |
run: | | |
./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' | |
. /scripts/connect-to-prod-cluster.sh | |
kubectl -n qctrl-platform rollout restart deployment/open-controls-docs && kubectl -n qctrl-platform rollout status deployment/open-controls-docs; | |
' |