From e1dea1c4bfb94076543e9cebb1acf51ba25ee5df Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Fri, 17 Jul 2020 12:04:26 -0700 Subject: [PATCH 01/18] Flatris GitHub CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..975c52d4 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From da322b4e8323e930249d0556e2d328c8bf1df531 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:42:59 -0700 Subject: [PATCH 02/18] Custom YAML CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 93 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 17 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 975c52d4..cf996e5e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,21 +1,80 @@ -# Node.js -# Build a general Node.js project with npm. +# Node.js Express Web App to Linux on Azure +# Build a Node.js Express app and deploy it to Azure as a Linux web app. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - + trigger: - master - -pool: - vmImage: 'ubuntu-latest' - -steps: -- task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - -- script: | - npm install - npm run build - displayName: 'npm install and build' + +variables: + + # Azure Resource Manager connection created during pipeline creation + azureSubscription: 'yoursubname' + + # Web app name + webAppName: 'yourwebappname' + + # Resource group + resourceGroupName: 'yourresourcegroup' + + # Environment name + environmentName: 'yourenvironmentname' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Archive + displayName: Archive stage + jobs: + - job: Archive + displayName: Archive + pool: + vmImage: $(vmImageName) + steps: + - task: AzureAppServiceSettings@1 + inputs: + azureSubscription: $(azureSubscription) + appName: $(webAppName) + resourceGroupName: $(resourceGroupName) + appSettings: | + [ + { + "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", + "value": "true" + } + ] + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + replaceExistingArchive: true + + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + artifact: drop + +- stage: Deploy + displayName: Deploy stage + dependsOn: Archive + condition: succeeded() + jobs: + - deployment: Deploy + displayName: Deploy + environment: $(environmentName) + pool: + vmImage: $(vmImageName) + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Azure Web App Deploy: Test-NodeJS-Deploy' + inputs: + azureSubscription: $(azureSubscription) + appType: webAppLinux + appName: $(webAppName) + runtimeStack: 'NODE|10.14' + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip \ No newline at end of file From 1cd048d6ce2eb6614a7b924cec1679ad0a7d2e23 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:46:11 -0700 Subject: [PATCH 03/18] Delete azure-pipelines.yml --- azure-pipelines.yml | 80 --------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index cf996e5e..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,80 +0,0 @@ -# Node.js Express Web App to Linux on Azure -# Build a Node.js Express app and deploy it to Azure as a Linux web app. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: -- master - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'yoursubname' - - # Web app name - webAppName: 'yourwebappname' - - # Resource group - resourceGroupName: 'yourresourcegroup' - - # Environment name - environmentName: 'yourenvironmentname' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Archive - displayName: Archive stage - jobs: - - job: Archive - displayName: Archive - pool: - vmImage: $(vmImageName) - steps: - - task: AzureAppServiceSettings@1 - inputs: - azureSubscription: $(azureSubscription) - appName: $(webAppName) - resourceGroupName: $(resourceGroupName) - appSettings: | - [ - { - "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", - "value": "true" - } - ] - - task: ArchiveFiles@2 - displayName: 'Archive files' - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)' - includeRootFolder: false - archiveType: zip - archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - replaceExistingArchive: true - - - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Archive - condition: succeeded() - jobs: - - deployment: Deploy - displayName: Deploy - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: Test-NodeJS-Deploy' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - runtimeStack: 'NODE|10.14' - package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip \ No newline at end of file From 6ea57f47bde0885df84b75e9f14fc438d2ce63a2 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:49:16 -0700 Subject: [PATCH 04/18] Test CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..d3d1cbbf --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,78 @@ +# Node.js Express Web App to Linux on Azure +# Build a Node.js Express app and deploy it to Azure as a Linux web app. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +variables: + + # Azure Resource Manager connection created during pipeline creation + azureSubscription: '3ca4740b-aa04-4a39-a3b5-d3d8d57e5613' + + # Web app name + webAppName: 'flatris-brian' + + # Environment name + environmentName: 'flatris-brian' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + + steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + npm install + npm run build --if-present + npm run test --if-present + displayName: 'npm install, build and test' + + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + replaceExistingArchive: true + + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + artifact: drop + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + condition: succeeded() + jobs: + - deployment: Deploy + displayName: Deploy + environment: $(environmentName) + pool: + vmImage: $(vmImageName) + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Azure Web App Deploy: flatris-brian' + inputs: + azureSubscription: $(azureSubscription) + appType: webAppLinux + appName: $(webAppName) + runtimeStack: 'NODE|10.10' + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip + startUpCommand: 'npm run start' \ No newline at end of file From 8a5453751b41cdb741edc6c74e0e091c6e296b33 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:58:31 -0700 Subject: [PATCH 05/18] Delete azure-pipelines.yml --- azure-pipelines.yml | 78 --------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index d3d1cbbf..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,78 +0,0 @@ -# Node.js Express Web App to Linux on Azure -# Build a Node.js Express app and deploy it to Azure as a Linux web app. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: -- master - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: '3ca4740b-aa04-4a39-a3b5-d3d8d57e5613' - - # Web app name - webAppName: 'flatris-brian' - - # Environment name - environmentName: 'flatris-brian' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: Build - displayName: Build - pool: - vmImage: $(vmImageName) - - steps: - - task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - - - script: | - npm install - npm run build --if-present - npm run test --if-present - displayName: 'npm install, build and test' - - - task: ArchiveFiles@2 - displayName: 'Archive files' - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)' - includeRootFolder: false - archiveType: zip - archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - replaceExistingArchive: true - - - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - condition: succeeded() - jobs: - - deployment: Deploy - displayName: Deploy - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: flatris-brian' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - runtimeStack: 'NODE|10.10' - package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip - startUpCommand: 'npm run start' \ No newline at end of file From f59255b4da2aff9b604ad666d96ae4fe16c6dbaa Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:02:29 -0700 Subject: [PATCH 06/18] test one - CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..b205fb5b --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,78 @@ +# Node.js Express Web App to Linux on Azure +# Build a Node.js Express app and deploy it to Azure as a Linux web app. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +variables: + + # Azure Resource Manager connection created during pipeline creation + azureSubscription: 'ded402e2-0a6d-4fff-a861-157cc97861a8' + + # Web app name + webAppName: 'testgame-bc' + + # Environment name + environmentName: 'testgame-bc' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + + steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + npm install + npm run build --if-present + npm run test --if-present + displayName: 'npm install, build and test' + + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + replaceExistingArchive: true + + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + artifact: drop + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + condition: succeeded() + jobs: + - deployment: Deploy + displayName: Deploy + environment: $(environmentName) + pool: + vmImage: $(vmImageName) + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Azure Web App Deploy: testgame-bc' + inputs: + azureSubscription: $(azureSubscription) + appType: webAppLinux + appName: $(webAppName) + runtimeStack: 'NODE|10.10' + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip + startUpCommand: 'npm run start' \ No newline at end of file From f6a597f0ddf4eed47e6a586ca33542a1ecb3561d Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:15:06 -0700 Subject: [PATCH 07/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 64 +++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b205fb5b..978338f0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,45 +2,48 @@ # Build a Node.js Express app and deploy it to Azure as a Linux web app. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - + trigger: - master - + variables: - + # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'ded402e2-0a6d-4fff-a861-157cc97861a8' + azureSubscription: 'yoursubname' # Web app name - webAppName: 'testgame-bc' + webAppName: 'yourwebappname' + # Resource group + resourceGroupName: 'yourresourcegroup' + # Environment name - environmentName: 'testgame-bc' - + environmentName: 'yourenvironmentname' + # Agent VM image name vmImageName: 'ubuntu-latest' - + stages: -- stage: Build - displayName: Build stage +- stage: Archive + displayName: Archive stage jobs: - - job: Build - displayName: Build + - job: Archive + displayName: Archive pool: vmImage: $(vmImageName) - - steps: - - task: NodeTool@0 + steps: + - task: AzureAppServiceSettings@1 inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - - - script: | - npm install - npm run build --if-present - npm run test --if-present - displayName: 'npm install, build and test' - + azureSubscription: $(azureSubscription) + appName: $(webAppName) + resourceGroupName: $(resourceGroupName) + appSettings: | + [ + { + "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", + "value": "true" + } + ] - task: ArchiveFiles@2 displayName: 'Archive files' inputs: @@ -49,13 +52,13 @@ stages: archiveType: zip archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip replaceExistingArchive: true - + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip artifact: drop - + - stage: Deploy displayName: Deploy stage - dependsOn: Build + dependsOn: Archive condition: succeeded() jobs: - deployment: Deploy @@ -68,11 +71,10 @@ stages: deploy: steps: - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: testgame-bc' + displayName: 'Azure Web App Deploy: Test-NodeJS-Deploy' inputs: azureSubscription: $(azureSubscription) appType: webAppLinux appName: $(webAppName) - runtimeStack: 'NODE|10.10' - package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip - startUpCommand: 'npm run start' \ No newline at end of file + runtimeStack: 'NODE|10.14' + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip \ No newline at end of file From 8ba27fc616167ae777fb12639b2ab0acc61c3718 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:19:43 -0700 Subject: [PATCH 08/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 978338f0..483ac3f0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,13 +9,13 @@ trigger: variables: # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'yoursubname' + azureSubscription: 'Like A Boss Sandbox' # Web app name - webAppName: 'yourwebappname' + webAppName: 'testgame-bc' # Resource group - resourceGroupName: 'yourresourcegroup' + resourceGroupName: 'test-bcRG' # Environment name environmentName: 'yourenvironmentname' From 00d93b2a404532a06450f99ce387b5beaddcbfec Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:21:37 -0700 Subject: [PATCH 09/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 483ac3f0..4484c2bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,16 +9,16 @@ trigger: variables: # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'Like A Boss Sandbox' + azureSubscription: "Like A Boss Sandbox" # Web app name - webAppName: 'testgame-bc' + webAppName: testgame-bc # Resource group - resourceGroupName: 'test-bcRG' + resourceGroupName: test-bcRG # Environment name - environmentName: 'yourenvironmentname' + environmentName: yourenvironmentname # Agent VM image name vmImageName: 'ubuntu-latest' From ae03ed7cb7eda0ebd1159824965429c138c8ec79 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:24:29 -0700 Subject: [PATCH 10/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4484c2bd..ad4d8c93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ trigger: variables: # Azure Resource Manager connection created during pipeline creation - azureSubscription: "Like A Boss Sandbox" + azureSubscription: LikeABossSandbox # Web app name webAppName: testgame-bc From f711f7231c748d6b76fe8c54cef0b64cad428cae Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:26:46 -0700 Subject: [PATCH 11/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ad4d8c93..d0852e47 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,16 +9,16 @@ trigger: variables: # Azure Resource Manager connection created during pipeline creation - azureSubscription: LikeABossSandbox + azureSubscription: 'LikeABossSandbox' # Web app name - webAppName: testgame-bc + webAppName: 'testgame-bc' # Resource group - resourceGroupName: test-bcRG + resourceGroupName: 'test-bcRG' # Environment name - environmentName: yourenvironmentname + environmentName: 'testgaem-bc' # Agent VM image name vmImageName: 'ubuntu-latest' From e05bc7a0ddb9035916f4e29065d2c2fe799fa64a Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 11:29:04 -0700 Subject: [PATCH 12/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d0852e47..6ba259b2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ variables: resourceGroupName: 'test-bcRG' # Environment name - environmentName: 'testgaem-bc' + environmentName: 'testgame-bc' # Agent VM image name vmImageName: 'ubuntu-latest' From 9b39bc2e3a0cf19d1fd7e2a428e307c1f4cc8c07 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Tue, 21 Jul 2020 15:53:29 -0700 Subject: [PATCH 13/18] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6ba259b2..06d2cb14 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ trigger: variables: # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'LikeABossSandbox' + azureSubscription: 'test-bc-svc' # Web app name webAppName: 'testgame-bc' From 2b5e2adc384114d0f71a9dc9737823a3b701e682 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:21:40 -0700 Subject: [PATCH 14/18] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 00000000..ac461758 --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,78 @@ +# Node.js Express Web App to Linux on Azure +# Build a Node.js Express app and deploy it to Azure as a Linux web app. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +variables: + + # Azure Resource Manager connection created during pipeline creation + azureSubscription: '9987d1b8-364b-424c-b834-52dd23ce5d2d' + + # Web app name + webAppName: 'testgame-bc' + + # Environment name + environmentName: 'testgame-bc' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + + steps: + - task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + + - script: | + npm install + npm run build --if-present + npm run test --if-present + displayName: 'npm install, build and test' + + - task: ArchiveFiles@2 + displayName: 'Archive files' + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + archiveType: zip + archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + replaceExistingArchive: true + + - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip + artifact: drop + +- stage: Deploy + displayName: Deploy stage + dependsOn: Build + condition: succeeded() + jobs: + - deployment: Deploy + displayName: Deploy + environment: $(environmentName) + pool: + vmImage: $(vmImageName) + strategy: + runOnce: + deploy: + steps: + - task: AzureWebApp@1 + displayName: 'Azure Web App Deploy: testgame-bc' + inputs: + azureSubscription: $(azureSubscription) + appType: webAppLinux + appName: $(webAppName) + runtimeStack: 'NODE|10.10' + package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip + startUpCommand: 'npm run start' \ No newline at end of file From 71aebfc84a1ddb1c600e258fe4772aae6c478aa3 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Wed, 5 Aug 2020 11:52:35 -0700 Subject: [PATCH 15/18] Delete azure-pipelines-1.yml --- azure-pipelines-1.yml | 78 ------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml deleted file mode 100644 index ac461758..00000000 --- a/azure-pipelines-1.yml +++ /dev/null @@ -1,78 +0,0 @@ -# Node.js Express Web App to Linux on Azure -# Build a Node.js Express app and deploy it to Azure as a Linux web app. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: -- master - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: '9987d1b8-364b-424c-b834-52dd23ce5d2d' - - # Web app name - webAppName: 'testgame-bc' - - # Environment name - environmentName: 'testgame-bc' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Build - displayName: Build stage - jobs: - - job: Build - displayName: Build - pool: - vmImage: $(vmImageName) - - steps: - - task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - - - script: | - npm install - npm run build --if-present - npm run test --if-present - displayName: 'npm install, build and test' - - - task: ArchiveFiles@2 - displayName: 'Archive files' - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)' - includeRootFolder: false - archiveType: zip - archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - replaceExistingArchive: true - - - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Build - condition: succeeded() - jobs: - - deployment: Deploy - displayName: Deploy - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: testgame-bc' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - runtimeStack: 'NODE|10.10' - package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip - startUpCommand: 'npm run start' \ No newline at end of file From 4f2899a0c51e57aa1adba87a2db8d9973c506dbf Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Wed, 5 Aug 2020 12:39:21 -0700 Subject: [PATCH 16/18] Delete azure-pipelines.yml --- azure-pipelines.yml | 80 --------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 06d2cb14..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,80 +0,0 @@ -# Node.js Express Web App to Linux on Azure -# Build a Node.js Express app and deploy it to Azure as a Linux web app. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: -- master - -variables: - - # Azure Resource Manager connection created during pipeline creation - azureSubscription: 'test-bc-svc' - - # Web app name - webAppName: 'testgame-bc' - - # Resource group - resourceGroupName: 'test-bcRG' - - # Environment name - environmentName: 'testgame-bc' - - # Agent VM image name - vmImageName: 'ubuntu-latest' - -stages: -- stage: Archive - displayName: Archive stage - jobs: - - job: Archive - displayName: Archive - pool: - vmImage: $(vmImageName) - steps: - - task: AzureAppServiceSettings@1 - inputs: - azureSubscription: $(azureSubscription) - appName: $(webAppName) - resourceGroupName: $(resourceGroupName) - appSettings: | - [ - { - "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", - "value": "true" - } - ] - - task: ArchiveFiles@2 - displayName: 'Archive files' - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)' - includeRootFolder: false - archiveType: zip - archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - replaceExistingArchive: true - - - upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip - artifact: drop - -- stage: Deploy - displayName: Deploy stage - dependsOn: Archive - condition: succeeded() - jobs: - - deployment: Deploy - displayName: Deploy - environment: $(environmentName) - pool: - vmImage: $(vmImageName) - strategy: - runOnce: - deploy: - steps: - - task: AzureWebApp@1 - displayName: 'Azure Web App Deploy: Test-NodeJS-Deploy' - inputs: - azureSubscription: $(azureSubscription) - appType: webAppLinux - appName: $(webAppName) - runtimeStack: 'NODE|10.14' - package: $(Pipeline.Workspace)/drop/$(Build.BuildId).zip \ No newline at end of file From d58ec8f3528c249adc083d9c454e2425d97684e6 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Sun, 16 Aug 2020 12:50:21 -0700 Subject: [PATCH 17/18] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..9d39a767 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,21 @@ +# Node.js with React +# Build a Node.js project that uses React. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' From 7c0e0faa97ae28ef6f76cbe510e316fcbdbab322 Mon Sep 17 00:00:00 2001 From: likeabosslearning <56529973+likeabosslearning@users.noreply.github.com> Date: Sun, 16 Aug 2020 13:21:43 -0700 Subject: [PATCH 18/18] Delete azure-pipelines.yml --- azure-pipelines.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 9d39a767..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Node.js with React -# Build a Node.js project that uses React. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - -trigger: -- master - -pool: - vmImage: 'ubuntu-latest' - -steps: -- task: NodeTool@0 - inputs: - versionSpec: '10.x' - displayName: 'Install Node.js' - -- script: | - npm install - npm run build - displayName: 'npm install and build'