mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 11:27:32 +00:00
update gamma deploy workflow
This commit is contained in:
+30
-12
@@ -35,15 +35,15 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: Dockerfile.standalone-infisical
|
file: Dockerfile.standalone-infisical
|
||||||
tags: infisical/infisical:test
|
tags: infisical/infisical:test
|
||||||
- name: ⏻ Spawn backend container and dependencies
|
# - name: ⏻ Spawn backend container and dependencies
|
||||||
run: |
|
# run: |
|
||||||
docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
|
# docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
|
||||||
- name: 🧪 Test backend image
|
# - name: 🧪 Test backend image
|
||||||
run: |
|
# run: |
|
||||||
./.github/resources/healthcheck.sh infisical-backend-test
|
# ./.github/resources/healthcheck.sh infisical-backend-test
|
||||||
- name: ⏻ Shut down backend container and dependencies
|
# - name: ⏻ Shut down backend container and dependencies
|
||||||
run: |
|
# run: |
|
||||||
docker compose -f .github/resources/docker-compose.be-test.yml down
|
# docker compose -f .github/resources/docker-compose.be-test.yml down
|
||||||
- name: 🏗️ Build backend and push
|
- name: 🏗️ Build backend and push
|
||||||
uses: depot/build-push-action@v1
|
uses: depot/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -59,11 +59,29 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
||||||
|
postgres-migration:
|
||||||
|
name: Run latest migration files
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [infisical-image]
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js environment
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
- name: Change directory to backend and install dependencies
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
npm install
|
||||||
|
- name: Run postgres DB migration files
|
||||||
|
env:
|
||||||
|
DB_CONNECTION_URI: ${{ secrets.DB_CONNECTION_URI }}
|
||||||
|
run: npm run migration:latest
|
||||||
gamma-deployment:
|
gamma-deployment:
|
||||||
name: Deploy to gamma
|
name: Deploy to gamma
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [infisical-image]
|
needs: [postgres-migration]
|
||||||
steps:
|
steps:
|
||||||
- name: ☁️ Checkout source
|
- name: ☁️ Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -90,7 +108,7 @@ jobs:
|
|||||||
- name: Download helm values to file and upgrade gamma deploy
|
- name: Download helm values to file and upgrade gamma deploy
|
||||||
run: |
|
run: |
|
||||||
wget https://raw.githubusercontent.com/Infisical/infisical/main/.github/values.yaml
|
wget https://raw.githubusercontent.com/Infisical/infisical/main/.github/values.yaml
|
||||||
helm upgrade infisical infisical-helm-charts/infisical --values values.yaml --wait --install
|
helm upgrade infisical infisical-helm-charts/infisical-standalone --values values.yaml --wait --install
|
||||||
if [[ $(helm status infisical) == *"FAILED"* ]]; then
|
if [[ $(helm status infisical) == *"FAILED"* ]]; then
|
||||||
echo "Helm upgrade failed"
|
echo "Helm upgrade failed"
|
||||||
exit 1
|
exit 1
|
||||||
Reference in New Issue
Block a user