Skip to content

Commit

Permalink
Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges committed Aug 4, 2024
1 parent 01fe435 commit db1ea8f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ permissions: read-all
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# FIXME!!!!!!!!!!!!!!!!!!!!!
#pull_request:
# branches: [ main ]
jobs:
test:
name: Run Playwright Tests
Expand Down
48 changes: 31 additions & 17 deletions .github/workflows/publish-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,37 @@ jobs:
# configuration option
- name: Deploy Helm Chart
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }} "\
sudo bash -c '\
cd ${{ secrets.PROJECT_PATH }} && \
git pull && \
git checkout main && \
cd infra/helm/meshforms && \
helm template . -f values.yaml \
--set meshforms.meshdb_url=\"${{ vars.MESHDB_URL }}\" \
--set meshforms_app_namespace=\"${{ vars.APP_NAMESPACE }}\" \
--set aws.access_key=\"${{ secrets.S3_ACCESS_KEY }}\" \
--set aws.secret_key=\"${{ secrets.S3_SECRET_KEY }}\" \
--set meshforms.s3_bucket_name=\"${{ secrets.S3_BUCKET_NAME }}\" \
--set meshforms.s3_base_name=\"${{ secrets.S3_BASE_NAME }}\" \
--set ingress.hosts[0].host=\"${{ vars.INGRESS_HOST }}\" \
| kubectl apply -f - && \
kubectl -n ${{ vars.APP_NAMESPACE }} rollout restart deploy \
'"
# Grab the kubeconfig
# FIXME: Check if helm install will always work, and if it starts a deploy.
scp ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }}:~/.kube/config ./
helm install --kubeconfig ./config --kube-apiserver https://${{ secrets.SSH_TARGET_IP }}:6443 -n ${{ vars.APP_NAMESPACE }} --create-namespace meshforms infra/helm/meshforms/ \
--set meshforms.meshdb_url=\"${{ vars.MESHDB_URL }}\" \
--set meshforms_app_namespace=\"${{ vars.APP_NAMESPACE }}\" \
--set aws.access_key=\"${{ secrets.S3_ACCESS_KEY }}\" \
--set aws.secret_key=\"${{ secrets.S3_SECRET_KEY }}\" \
--set meshforms.s3_bucket_name=\"${{ secrets.S3_BUCKET_NAME }}\" \
--set meshforms.s3_base_name=\"${{ secrets.S3_BASE_NAME }}\" \
--set ingress.hosts[0].host=\"${{ vars.INGRESS_HOST }}\"
#- name: Deploy Helm Chart Old
# run: |
# ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }} "\
# sudo bash -c '\
# cd ${{ secrets.PROJECT_PATH }} && \
# git pull && \
# git checkout main && \
# cd infra/helm/meshforms && \
# helm template . -f values.yaml \
# --set meshforms.meshdb_url=\"${{ vars.MESHDB_URL }}\" \
# --set meshforms_app_namespace=\"${{ vars.APP_NAMESPACE }}\" \
# --set aws.access_key=\"${{ secrets.S3_ACCESS_KEY }}\" \
# --set aws.secret_key=\"${{ secrets.S3_SECRET_KEY }}\" \
# --set meshforms.s3_bucket_name=\"${{ secrets.S3_BUCKET_NAME }}\" \
# --set meshforms.s3_base_name=\"${{ secrets.S3_BASE_NAME }}\" \
# --set ingress.hosts[0].host=\"${{ vars.INGRESS_HOST }}\" \
# | kubectl apply -f - && \
# kubectl -n ${{ vars.APP_NAMESPACE }} rollout restart deploy \
# '"

deploy_to_prod1:
name: Deploy to prod 1
Expand Down

0 comments on commit db1ea8f

Please sign in to comment.