Skip to content

chore: install coder-logstream-kube for PR deployments #8676

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

Merged
merged 2 commits into from
Jul 23, 2023
Merged
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
15 changes: 11 additions & 4 deletions .github/workflows/pr-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,21 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: "Set up kubeconfig"
- name: Set up kubeconfig
run: |
set -euxo pipefail
mkdir -p ~/.kube
echo "${{ secrets.DELIVERYBOT_KUBECONFIG }}" > ~/.kube/config
export KUBECONFIG=~/.kube/config

- name: "Create PR namespace"
- name: Create PR namespace
run: |
set -euxo pipefail
# try to delete the namespace, but don't fail if it doesn't exist
kubectl delete namespace "pr${{ env.PR_NUMBER }}" || true
kubectl create namespace "pr${{ env.PR_NUMBER }}"

- name: "Install Helm chart"
- name: Install Helm chart
run: |
helm upgrade --install pr${{ env.PR_NUMBER }} ./helm \
--namespace "pr${{ env.PR_NUMBER }}" \
Expand All @@ -163,7 +163,7 @@ jobs:
--set coder.env[0].value="" \
--force

- name: "Get deployment URL"
- name: Get deployment URL
id: deployment_url
run: |
set -euo pipefail
Expand All @@ -173,6 +173,13 @@ jobs:
echo "::add-mask::$CODER_ACCESS_URL"
echo "CODER_ACCESS_URL=$CODER_ACCESS_URL" >> $GITHUB_OUTPUT

- name: Install coder-logstream-kube
run: |
helm repo add coder-logstream-kube https://helm.coder.com/logstream-kube
helm install coder-logstream-kube coder-logstream-kube/coder-logstream-kube \
--namespace "pr${{ env.PR_NUMBER }}"
--set url="${{ steps.deployment_url.outputs.CODER_ACCESS_URL }}"s

- name: Send Slack notification
run: |
curl -s -o /dev/null -X POST -H 'Content-type: application/json' \
Expand Down