From 7ce3a293014fbe10f255475bb402d1f190e49a5d Mon Sep 17 00:00:00 2001 From: Vylpes Date: Mon, 29 Aug 2022 20:02:01 +0100 Subject: [PATCH 1/5] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/main_vylbot-prod-app-01.yml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/main_vylbot-prod-app-01.yml diff --git a/.github/workflows/main_vylbot-prod-app-01.yml b/.github/workflows/main_vylbot-prod-app-01.yml new file mode 100644 index 0000000..048c2ec --- /dev/null +++ b/.github/workflows/main_vylbot-prod-app-01.yml @@ -0,0 +1,56 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - vylbot-prod-app-01 + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '16.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v2 + with: + name: node-app + path: . + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: node-app + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'vylbot-prod-app-01' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_88BAFC05F82E44A19EE9C9B980029A27 }} + package: . From 702539d44b3ff19b80851702ed863d1a04cb76d7 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 29 Aug 2022 20:13:10 +0100 Subject: [PATCH 2/5] Update workflow to use yarn --- .github/workflows/main_vylbot-prod-app-01.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main_vylbot-prod-app-01.yml b/.github/workflows/main_vylbot-prod-app-01.yml index 048c2ec..2931e6c 100644 --- a/.github/workflows/main_vylbot-prod-app-01.yml +++ b/.github/workflows/main_vylbot-prod-app-01.yml @@ -21,11 +21,11 @@ jobs: with: node-version: '16.x' - - name: npm install, build, and test + - name: yarn install, build, and test run: | - npm install - npm run build --if-present - npm run test --if-present + yarn install --frozen-lockfile + yarn build + yarn test - name: Upload artifact for deployment job uses: actions/upload-artifact@v2 From 53a2771fc26144ef2d080dc5279c0e51227a9336 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 29 Aug 2022 20:14:54 +0100 Subject: [PATCH 3/5] Temporarily remove test --- .github/workflows/main_vylbot-prod-app-01.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main_vylbot-prod-app-01.yml b/.github/workflows/main_vylbot-prod-app-01.yml index 2931e6c..cf72c60 100644 --- a/.github/workflows/main_vylbot-prod-app-01.yml +++ b/.github/workflows/main_vylbot-prod-app-01.yml @@ -25,7 +25,6 @@ jobs: run: | yarn install --frozen-lockfile yarn build - yarn test - name: Upload artifact for deployment job uses: actions/upload-artifact@v2 From 1f818ae3401a6fa43aab6de4890e06fcaf842283 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 29 Aug 2022 20:46:32 +0100 Subject: [PATCH 4/5] remove workflow --- .github/workflows/main_vylbot-prod-app-01.yml | 55 ------------------- Dockerfile | 15 ----- ormconfig.json.template | 24 -------- 3 files changed, 94 deletions(-) delete mode 100644 .github/workflows/main_vylbot-prod-app-01.yml delete mode 100644 Dockerfile delete mode 100644 ormconfig.json.template diff --git a/.github/workflows/main_vylbot-prod-app-01.yml b/.github/workflows/main_vylbot-prod-app-01.yml deleted file mode 100644 index cf72c60..0000000 --- a/.github/workflows/main_vylbot-prod-app-01.yml +++ /dev/null @@ -1,55 +0,0 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# More GitHub Actions for Azure: https://github.com/Azure/actions - -name: Build and deploy Node.js app to Azure Web App - vylbot-prod-app-01 - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up Node.js version - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - - name: yarn install, build, and test - run: | - yarn install --frozen-lockfile - yarn build - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v2 - with: - name: node-app - path: . - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: 'Production' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v2 - with: - name: node-app - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'vylbot-prod-app-01' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_88BAFC05F82E44A19EE9C9B980029A27 }} - package: . diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 51e8b21..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Create app and work directory -FROM node:16 -WORKDIR /vylbot - -# Install dependencies -COPY package.json . -COPY yarn.lock . -RUN yarn install - -# Bundle app source -COPY . . -RUN yarn build - -# Run the app source -CMD [ "yarn", "start" ] \ No newline at end of file diff --git a/ormconfig.json.template b/ormconfig.json.template deleted file mode 100644 index 0ada020..0000000 --- a/ormconfig.json.template +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "dev", - "password": "dev", - "database": "vylbot", - "synchronize": false, - "logging": false, - "entities": [ - "dist/entity/**/*.js" - ], - "migrations": [ - "dist/migration/**/*.js" - ], - "subscribers": [ - "dist/subscriber/**/*.js" - ], - "cli": { - "entitiesDir": "dist/entity", - "migrationsDir": "dist/migration", - "subscribersDir": "dist/subscriber" - } -} \ No newline at end of file From ec9aba8e26ea3fa1e1b5a8e8929400b5f65e8a7e Mon Sep 17 00:00:00 2001 From: Vylpes Date: Fri, 2 Dec 2022 17:39:12 +0000 Subject: [PATCH 5/5] Bump minimatch to 3.1.2 (#227) Co-authored-by: Ethan Lane Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/227 Reviewed-by: VylpesTester --- package.json | 1 + yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/package.json b/package.json index b45562f..5634a78 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "emoji-regex": "^9.2.0", "jest": "^27.4.5", "jest-mock-extended": "^2.0.4", + "minimatch": "3.1.2", "mysql": "^2.18.1", "random-bunny": "^2.0.0", "ts-jest": "^27.1.2", diff --git a/yarn.lock b/yarn.lock index 52ebe72..66443f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2277,6 +2277,13 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +minimatch@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"