diff --git a/.env b/.env index 9940dd91..36f5d781 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -SPONSOR=bed-is-all-my-pleasure \ No newline at end of file +SPONSOR=tested +test=true diff --git a/.github/workflows/porter_task_long_ball.yml b/.github/workflows/porter_boathouse_app_production.yml similarity index 56% rename from .github/workflows/porter_task_long_ball.yml rename to .github/workflows/porter_boathouse_app_production.yml index 6707c641..6755560f 100644 --- a/.github/workflows/porter_task_long_ball.yml +++ b/.github/workflows/porter_boathouse_app_production.yml @@ -8,18 +8,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v3 - name: Set Github tag id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Update Porter App timeout-minutes: 20 uses: porter-dev/porter-update-action@v0.1.0 with: - app: task-long-ball - cluster: "41" - host: https://dashboard.staging.getporter.dev + app: boathouse-app-production + cluster: "38" + host: https://dashboard.internal-tools.porter.run namespace: default - project: "21" + project: "69" tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_21 }} + token: ${{ secrets.PORTER_TOKEN_69 }} diff --git a/.github/workflows/porter_cut_radio_recognize_production.yml b/.github/workflows/porter_cut_radio_recognize_production.yml deleted file mode 100644 index 31a130e8..00000000 --- a/.github/workflows/porter_cut_radio_recognize_production.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: cut-radio-recognize - cluster: "108" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "88" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_PRODUCTION_88 }} diff --git a/.github/workflows/porter_heroku_tetr.yml b/.github/workflows/porter_heroku_tetr.yml deleted file mode 100644 index 531b9585..00000000 --- a/.github/workflows/porter_heroku_tetr.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: heroku-tetr - cluster: "41" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "21" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_21 }} diff --git a/.github/workflows/porter_coal_station_origin.yml b/.github/workflows/porter_portal_app_production.yml similarity index 57% rename from .github/workflows/porter_coal_station_origin.yml rename to .github/workflows/porter_portal_app_production.yml index e3acf7c3..430d859e 100644 --- a/.github/workflows/porter_coal_station_origin.yml +++ b/.github/workflows/porter_portal_app_production.yml @@ -8,18 +8,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v3 - name: Set Github tag id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Update Porter App timeout-minutes: 20 uses: porter-dev/porter-update-action@v0.1.0 with: - app: coal-station-origin - cluster: "2445" - host: https://dashboard.getporter.dev + app: portal-app-production + cluster: "34" + host: https://dashboard.internal-tools.porter.run namespace: default - project: "6658" + project: "65" tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_6658 }} + token: ${{ secrets.PORTER_TOKEN_65 }} diff --git a/.github/workflows/porter_preview_env.yml b/.github/workflows/porter_preview_env.yml deleted file mode 100644 index bfc8852b..00000000 --- a/.github/workflows/porter_preview_env.yml +++ /dev/null @@ -1,45 +0,0 @@ -"on": - workflow_dispatch: - inputs: - pr_branch_from: - description: Pull request head branch - required: true - type: string - pr_branch_into: - description: Pull request base branch - required: true - type: string - pr_number: - description: Pull request number - required: true - type: string - pr_title: - description: Pull request title - required: true - type: string -name: Porter Preview Environment -jobs: - porter-preview: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Create Porter preview env - timeout-minutes: 30 - uses: porter-dev/porter-preview-action@v0.2.1 - with: - action_id: ${{ github.run_id }} - cluster: "1" - host: https://5c24-131-239-192-194.ngrok.io - installation_id: "30668812" - namespace: pr-${{ github.event.inputs.pr_number }}-js-test-app - pr_branch_from: ${{ github.event.inputs.pr_branch_from }} - pr_branch_into: ${{ github.event.inputs.pr_branch_into }} - pr_id: ${{ github.event.inputs.pr_number }} - pr_name: ${{ github.event.inputs.pr_title }} - project: "1" - repo_name: js-test-app - repo_owner: portersupport - token: ${{ secrets.PORTER_PREVIEW_1_1 }} - concurrency: - group: ${{ github.workflow }}-${{ github.event.inputs.pr_number }} diff --git a/.github/workflows/porter_preview_nginx.yml b/.github/workflows/porter_preview_nginx.yml new file mode 100644 index 00000000..065736db --- /dev/null +++ b/.github/workflows/porter_preview_nginx.yml @@ -0,0 +1,33 @@ +"on": + pull_request: + branches: + - porter + types: + - opened + - synchronize + paths: + - '*' + - '!./github/workflows/porter-**' +name: Deploy to Preview Environment +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build and deploy preview environment + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml --preview + env: + PORTER_CLUSTER: "3098" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "8975" + PORTER_STACK_NAME: nginx + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_8975_3098 }} diff --git a/.github/workflows/porter_stack_first.yml b/.github/workflows/porter_stack_first.yml new file mode 100644 index 00000000..02003349 --- /dev/null +++ b/.github/workflows/porter_stack_first.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - porter +name: Deploy to Porter +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f porter.yaml + env: + PORTER_CLUSTER: "2698" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "7224" + PORTER_STACK_NAME: first + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_7224_2698 }} diff --git a/.github/workflows/porter_stack_github.yml b/.github/workflows/porter_stack_github.yml new file mode 100644 index 00000000..59704299 --- /dev/null +++ b/.github/workflows/porter_stack_github.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - porter +name: Deploy to github +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml + env: + PORTER_CLUSTER: "3081" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "8975" + PORTER_STACK_NAME: github + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_8975_3081 }} diff --git a/.github/workflows/porter_stack_js-test.yml b/.github/workflows/porter_stack_js-test.yml new file mode 100644 index 00000000..705d60ab --- /dev/null +++ b/.github/workflows/porter_stack_js-test.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - porter +name: Deploy to js-test +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml + env: + PORTER_CLUSTER: "2745" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "7484" + PORTER_STACK_NAME: js-test + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_7484_2745 }} diff --git a/.github/workflows/porter_stack_justin-test-deploy.yml b/.github/workflows/porter_stack_justin-test-deploy.yml new file mode 100644 index 00000000..c97aac21 --- /dev/null +++ b/.github/workflows/porter_stack_justin-test-deploy.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - porter +name: Deploy to Porter +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f porter.yaml + env: + PORTER_CLUSTER: "2698" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "7224" + PORTER_STACK_NAME: justin-test-deploy + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_7224_2698 }} diff --git a/.github/workflows/porter_stack_logic.yml b/.github/workflows/porter_stack_logic.yml new file mode 100644 index 00000000..72a697fd --- /dev/null +++ b/.github/workflows/porter_stack_logic.yml @@ -0,0 +1,27 @@ +"on": + push: + branches: + - porter +name: Deploy to logic +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Setup porter + uses: porter-dev/setup-porter@v0.1.0 + - name: Deploy stack + timeout-minutes: 30 + run: exec porter apply -f ./porter.yaml + env: + PORTER_CLUSTER: "7" + PORTER_HOST: https://sandbox.porter.run + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "9" + PORTER_STACK_NAME: logic + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_9_7 }} diff --git a/.github/workflows/porter_stack_nginx.yml b/.github/workflows/porter_stack_nginx.yml new file mode 100644 index 00000000..dfee0a9c --- /dev/null +++ b/.github/workflows/porter_stack_nginx.yml @@ -0,0 +1,27 @@ +"on": + push: + branches: + - porter +name: Deploy to nginx +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml + env: + PORTER_CLUSTER: "3098" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "8975" + PORTER_STACK_NAME: nginx + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_8975_3098 }} diff --git a/.github/workflows/porter_stack_porter.yml b/.github/workflows/porter_stack_porter.yml new file mode 100644 index 00000000..0215d41e --- /dev/null +++ b/.github/workflows/porter_stack_porter.yml @@ -0,0 +1,27 @@ +"on": + push: + branches: + - porter +name: Deploy to porter +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Setup porter + uses: porter-dev/setup-porter@v0.1.0 + - name: Deploy stack + timeout-minutes: 30 + run: exec porter apply -f ./porter.yaml + env: + PORTER_CLUSTER: "7" + PORTER_HOST: https://sandbox.porter.run + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "9" + PORTER_STACK_NAME: porter + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_9_7 }} diff --git a/.github/workflows/porter_stack_tetris-2.yml b/.github/workflows/porter_stack_tetris-2.yml new file mode 100644 index 00000000..9d735935 --- /dev/null +++ b/.github/workflows/porter_stack_tetris-2.yml @@ -0,0 +1,27 @@ +"on": + push: + branches: + - porter +name: Deploy to tetris-2 +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Setup porter + uses: porter-dev/setup-porter@v0.1.0 + - name: Deploy stack + timeout-minutes: 30 + run: exec porter apply -f ./porter.yaml + env: + PORTER_CLUSTER: "5" + PORTER_HOST: https://sandbox.porter.run + PORTER_PR_NUMBER: ${{ github.event.number }} + PORTER_PROJECT: "7" + PORTER_STACK_NAME: tetris-2 + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_7_5 }} diff --git a/.github/workflows/porter_stack_tetrjs.yml b/.github/workflows/porter_stack_tetrjs.yml new file mode 100644 index 00000000..17611bcc --- /dev/null +++ b/.github/workflows/porter_stack_tetrjs.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - master +name: Deploy to tetrjs +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml + env: + PORTER_CLUSTER: "3034" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "8686" + PORTER_STACK_NAME: tetrjs + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_8686_3034 }} diff --git a/.github/workflows/porter_stack_threekit-test.yml b/.github/workflows/porter_stack_threekit-test.yml new file mode 100644 index 00000000..bb5f8835 --- /dev/null +++ b/.github/workflows/porter_stack_threekit-test.yml @@ -0,0 +1,26 @@ +"on": + push: + branches: + - porter +name: Deploy to threekit-test +jobs: + porter-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set Github tag + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Deploy stack + timeout-minutes: 30 + uses: porter-dev/porter-cli-action@v0.1.0 + with: + command: apply -f ./porter.yaml + env: + PORTER_CLUSTER: "3009" + PORTER_HOST: https://dashboard.getporter.dev + PORTER_PROJECT: "8506" + PORTER_STACK_NAME: threekit-test + PORTER_TAG: ${{ steps.vars.outputs.sha_short }} + PORTER_TOKEN: ${{ secrets.PORTER_STACK_8506_3009 }} diff --git a/.github/workflows/porter_stefan_test_production.yml b/.github/workflows/porter_stefan_test_production.yml deleted file mode 100644 index f5babe2d..00000000 --- a/.github/workflows/porter_stefan_test_production.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: stefan-test - cluster: "120" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "88" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_PRODUCTION_88 }} diff --git a/.github/workflows/porter_tetromino.yml b/.github/workflows/porter_tetromino.yml deleted file mode 100644 index dcd8db49..00000000 --- a/.github/workflows/porter_tetromino.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: tetromino - cluster: "41" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "21" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_21 }} diff --git a/.github/workflows/porter_this_heroku.yml b/.github/workflows/porter_this_heroku.yml deleted file mode 100644 index 9d59d084..00000000 --- a/.github/workflows/porter_this_heroku.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: this-heroku - cluster: "41" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "21" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_21 }} diff --git a/.github/workflows/porter_used_to_work.yml b/.github/workflows/porter_used_to_work.yml deleted file mode 100644 index d50d2d44..00000000 --- a/.github/workflows/porter_used_to_work.yml +++ /dev/null @@ -1,25 +0,0 @@ -"on": - push: - branches: - - master -name: Deploy to Porter -jobs: - porter-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Set Github tag - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Update Porter App - timeout-minutes: 20 - uses: porter-dev/porter-update-action@v0.1.0 - with: - app: used-to-work - cluster: "41" - host: https://dashboard.staging.getporter.dev - namespace: default - project: "21" - tag: ${{ steps.vars.outputs.sha_short }} - token: ${{ secrets.PORTER_TOKEN_21 }} diff --git a/index.js b/index.js index 4fcf9827..8b95d4ba 100644 --- a/index.js +++ b/index.js @@ -8,4 +8,4 @@ app.get('/', (req, res) => { }); var sponsor = process.env.SPONSOR || "unsponsored"; -app.listen(3000, () => console.log('Tetris app listening on port 3000! Brought to you by', sponsor + ", of course.")); \ No newline at end of file +app.listen(process.env.PORT || 3000, () => console.log('Tetris app listening on port 3000! Brought to you all by', sponsor + ", of course.")); diff --git a/porter.yaml b/porter.yaml index 9952f4bc..0f911243 100644 --- a/porter.yaml +++ b/porter.yaml @@ -1,15 +1,7 @@ -version: v1 -resources: -- name: web - source: - name: web - config: - build: - method: pack - builder: heroku/buildpacks:20 - values: - ingress: - enabled: false - container: - command: node index.js - port: 3000 +apps: + web: + type: web + run: "node index.js" + worker: + type: worker + run: "npm start-worker" diff --git a/test.txt b/test.txt new file mode 100644 index 00000000..ab6c24d4 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +"Test workflow"