From c356868e0b0b80a3ba84fb0abd74cd3fe79586d3 Mon Sep 17 00:00:00 2001 From: danielxnj Date: Fri, 17 Nov 2023 17:20:39 -0500 Subject: [PATCH] Test dummy deploy --- .github/workflows/container-images-ci.yml | 2 +- .github/workflows/pr-deploy.yml | 32 +++++++++++------------ bin/deploy-hobby | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/container-images-ci.yml b/.github/workflows/container-images-ci.yml index e37d2e730efb3..e757d9936e498 100644 --- a/.github/workflows/container-images-ci.yml +++ b/.github/workflows/container-images-ci.yml @@ -41,7 +41,7 @@ jobs: deploy_preview: name: Deploy preview environment - uses: ./.github/workflows/pr-deploy.yml + uses: ./.github/workflows/pr-deploy.yml@chore-make-hobby-docker-install needs: [posthog_build] secrets: inherit if: ${{ contains(github.event.pull_request.labels.*.name, 'deploy') }} diff --git a/.github/workflows/pr-deploy.yml b/.github/workflows/pr-deploy.yml index 5bcdc2ca1e49f..445a457144c0c 100644 --- a/.github/workflows/pr-deploy.yml +++ b/.github/workflows/pr-deploy.yml @@ -74,23 +74,23 @@ jobs: envsubst < posthog/.github/pr-deploy/tailscale.yaml.tmpl > posthog/.github/pr-deploy/tailscale.yaml envsubst < posthog/.github/pr-deploy/values.yaml.tmpl > posthog/.github/pr-deploy/values.yaml - helm upgrade --install \ - -f posthog/.github/pr-deploy/values.yaml \ - --set image.tag=pr-$PR_NUM \ - --timeout 30m \ - --create-namespace \ - --namespace $NAMESPACE \ - $RELEASE_NAME charts-clickhouse/charts/posthog \ - --wait \ - --wait-for-jobs - - POD_NAME=$(kubectl -n $NAMESPACE get pod | grep web | cut -d' ' -f1) - kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py shell -c "import sys;from posthog.models import Team; sys.exit(not Team.objects.exists())" \ - || kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py generate_demo_data \ - && kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py shell -c "from posthog.models import Team; t = Team.objects.first(); t.is_demo = False; t.save()" - - kubectl -n $NAMESPACE apply -f posthog/.github/pr-deploy/tailscale.yaml echo "url=$NAMESPACE.hedgehog-kitefin.ts.net" >> $GITHUB_OUTPUT + # helm upgrade --install \ + # -f posthog/.github/pr-deploy/values.yaml \ + # --set image.tag=pr-$PR_NUM \ + # --timeout 30m \ + # --create-namespace \ + # --namespace $NAMESPACE \ + # $RELEASE_NAME charts-clickhouse/charts/posthog \ + # --wait \ + # --wait-for-jobs + + # POD_NAME=$(kubectl -n $NAMESPACE get pod | grep web | cut -d' ' -f1) + # kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py shell -c "import sys;from posthog.models import Team; sys.exit(not Team.objects.exists())" \ + # || kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py generate_demo_data \ + # && kubectl -n $NAMESPACE exec $POD_NAME -- python manage.py shell -c "from posthog.models import Team; t = Team.objects.first(); t.is_demo = False; t.save()" + + # kubectl -n $NAMESPACE apply -f posthog/.github/pr-deploy/tailscale.yaml - name: update deployment status uses: bobheadxi/deployments@v1 diff --git a/bin/deploy-hobby b/bin/deploy-hobby index 1c20beaf37489..467d36bb75583 100755 --- a/bin/deploy-hobby +++ b/bin/deploy-hobby @@ -110,7 +110,7 @@ envsubst > Caddyfile < docker-compose.yml rm docker-compose.yml.tmpl echo "Starting the stack!"