Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DH-301] use github actions to deploy support chart #6008

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,66 +337,6 @@ jobs:
hubploy deploy --timeout 30m workshop hub ${CIRCLE_BRANCH}
no_output_timeout: 30m

deploy-support:
docker:
- image: buildpack-deps:bionic-scm
working_directory: ~/repo
steps:
- checkout

- run:
name: install google-cloud-sdk
command: |
export GCLOUD_URL=https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-457.0.0-linux-x86_64.tar.gz
curl -sSL $GCLOUD_URL | tar -xzf - -C ${HOME}
# Be careful with quote ordering here. ${PATH} must not be expanded
# Don't use ~ here - bash can interpret PATHs containing ~, but most other things can't.
# Always use full PATHs in PATH!
echo 'export PATH="${HOME}/google-cloud-sdk/bin:${PATH}"' >> ${BASH_ENV}

- run:
name: Install sops
command: |
echo $SOPS_ACCOUNT_KEY > ${HOME}/repo/sops.key
echo 'export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/repo/sops.key' >> ${BASH_ENV}
mkdir -p ${HOME}/repo/bin
curl -sSL https://github.com/mozilla/sops/releases/download/v3.7.0/sops-v3.7.0.linux -o ${HOME}/repo/bin/sops
chmod 755 ${HOME}/repo/bin/sops
echo 'export PATH="${HOME}/repo/bin:${PATH}"' >> ${BASH_ENV}

- run:
name: Setup helm3
command: |
curl -L https://get.helm.sh/helm-v3.13.3-linux-amd64.tar.gz | \
tar -xzf -
mv linux-amd64/helm /usr/local/bin
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

- run:
name: Activate credentials for datahub cluster (spring-2024)
command: |
gcloud components install gke-gcloud-auth-plugin
sops -d -i deployments/datahub/secrets/gke-key.json
gcloud auth \
activate-service-account \
--key-file deployments/datahub/secrets/gke-key.json

gcloud container clusters \
--region=us-central1 --project=ucb-datahub-2018 \
get-credentials spring-2024

- run:
name: Deploy support helm chart
command: |
sops -d -i support/secrets.yaml
helm dep up support
helm upgrade \
--install --wait \
--namespace=support \
support support/ \
-f support/secrets.yaml \
--set installCRDs=true --debug

workflows:
version: 2
test-build-images:
Expand Down Expand Up @@ -799,12 +739,3 @@ workflows:
branches:
only:
- prod

deploy-support:
jobs:
- deploy-support:
filters:
branches:
# We don't have staging / prod for our support cluster
# So we deploy only when deploying staging
only: staging
Loading