From 589d5c550990a1d33b9c6f0900d13842f32c5798 Mon Sep 17 00:00:00 2001 From: Mounir Date: Mon, 29 Jul 2024 08:18:59 -0400 Subject: [PATCH] feat: add pull request stage --- azure-pipeline/deploy_frontend.yml | 2 +- azure-pipelines.yml | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/azure-pipeline/deploy_frontend.yml b/azure-pipeline/deploy_frontend.yml index 1d07fb0..8ffb134 100644 --- a/azure-pipeline/deploy_frontend.yml +++ b/azure-pipeline/deploy_frontend.yml @@ -12,7 +12,7 @@ jobs: displayName: "Deploy Frontend [${{ parameters.environment }}]" environment: ${{ parameters.environment }} pool: - vmImage: "windows-latest" + vmImage: "ubuntu-latest" ${{ if ne(parameters.depends_on, '')}}: dependsOn: ${{ parameters.depends_on }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 56e8f3f..79d00db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,10 +1,32 @@ trigger: - - releases/* + branches: + include: + - releases/* name: v0.01$(Rev:.rr) variables: - group: web-react-skeleton-azure + - name: isPullRequest + value: $[eq(variables['Build.Reason'], 'PullRequest')] stages: - - template: azure-pipeline/environments_loop.yml + - ${{ if eq(variables['isPullRequest'], 'false') }}: + - template: azure-pipeline/environments_loop.yml + + - stage: Pull_request_build_stage + displayName: "Pull Request Build Stage" + jobs: + - job: EchoVARS + steps: + - script: | + echo ${{ eq(variables['isPullRequest'], 'true') }} + echo ${{ variables['Build.Reason'] }} + echo ${{ variables['isPullRequest'] }} + - job: Pull_request_build_job + displayName: "Pull Request Build Job" + steps: + - ${{ if eq(variables['isPullRequest'], 'true') }}: + - template: azure-pipeline/build_frontend.yml + parameters: + environment: "dev"