瀏覽代碼

making control group

Feroze Mohideen 2 年之前
父節點
當前提交
ca011befe1
共有 3 個文件被更改,包括 45 次插入0 次删除
  1. 42 0
      .github/workflows/porter_stack_pls-work-1.yml
  2. 2 0
      cli/cmd/stack/build.go
  3. 1 0
      js-test-app

+ 42 - 0
.github/workflows/porter_stack_pls-work-1.yml

@@ -0,0 +1,42 @@
+"on":
+  push:
+    branches:
+    - stacks-fix-cli-analytics-control
+name: Deploy to pls-work-1
+jobs:
+  porter-deploy:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v3
+    - name: Setup Go
+      uses: actions/setup-go@v4
+      with:
+        go-version-file: go.mod
+        cache: false
+    - name: Set Github tag
+      id: vars
+      run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
+    - name: Install Porter
+      timeout-minutes: 30
+      run: /bin/bash -c "$(curl -fsSL https://install.porter.run)"
+    - name: Login
+      timeout-minutes: 30
+      run: porter auth login --token $PORTER_TOKEN
+      env:
+        PORTER_CLUSTER: 2698
+        PORTER_HOST: https://dashboard.getporter.dev
+        PORTER_PROJECT: 7224
+        PORTER_STACK_NAME: pls-work-1
+        PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
+        PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}
+    - name: Deploy stack
+      timeout-minutes: 30
+      run: go run ./cli/main.go apply
+      env:
+        PORTER_CLUSTER: 2698
+        PORTER_HOST: https://dashboard.getporter.dev
+        PORTER_PROJECT: 7224
+        PORTER_STACK_NAME: pls-work-1
+        PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
+        PORTER_TOKEN: ${{ secrets.PORTER_STACK_1_2 }}

+ 2 - 0
cli/cmd/stack/build.go

@@ -95,6 +95,8 @@ func (b *Build) getV1BuildImage(appName string, env map[string]string, namespace
 
 	config.Build.Context = b.GetContext()
 	config.Build.Env = CopyEnv(env)
+	config.Build.Builder = "heroku/buildpacks:20"
+	config.Build.Buildpacks = []string{"heroku/nodejs"}
 
 	rawConfig := make(map[string]any)
 

+ 1 - 0
js-test-app

@@ -0,0 +1 @@
+Subproject commit 1029091a03f39691859d48ebf6fc9c98e687f38c