From 5a5ba20e5566cd911a7a311b07ede7ed5719cd0b Mon Sep 17 00:00:00 2001 From: Unai Huete Beloki <64772417+unaihuete93@users.noreply.github.com> Date: Thu, 27 Oct 2022 14:26:02 +0000 Subject: [PATCH] renamed refactored pipelines ADO --- ...n-cd-web-aci.yml => eshoponweb-cd-aci.yml} | 6 ++- ...bapp.yml => eshoponweb-cd-webapp-code.yml} | 8 ++-- ...=> eshoponweb-cd-webapp-dockercompose.yml} | 3 ++ ...se.yml => eshoponweb-ci-dockercompose.yml} | 7 +++- ...ain-ci-mend.yml => eshoponweb-ci-mend.yml} | 4 +- .ado/eshoponweb-ci-pr.yml | 38 +++++++++++++++++++ .ado/{main-ci.yml => eshoponweb-ci.yml} | 2 + 7 files changed, 60 insertions(+), 8 deletions(-) rename .ado/{main-cd-web-aci.yml => eshoponweb-cd-aci.yml} (90%) rename .ado/{main-cd-web-webapp.yml => eshoponweb-cd-webapp-code.yml} (90%) rename .ado/{main-cd-webapp-compose.yml => eshoponweb-cd-webapp-dockercompose.yml} (97%) rename .ado/{main-ci-containers-compose.yml => eshoponweb-ci-dockercompose.yml} (96%) rename .ado/{main-ci-mend.yml => eshoponweb-ci-mend.yml} (94%) create mode 100644 .ado/eshoponweb-ci-pr.yml rename .ado/{main-ci.yml => eshoponweb-ci.yml} (94%) diff --git a/.ado/main-cd-web-aci.yml b/.ado/eshoponweb-cd-aci.yml similarity index 90% rename from .ado/main-cd-web-aci.yml rename to .ado/eshoponweb-cd-aci.yml index 4b215931..f7f2c7ff 100644 --- a/.ado/main-cd-web-aci.yml +++ b/.ado/eshoponweb-cd-aci.yml @@ -1,8 +1,10 @@ +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") + # trigger: none resources: pipelines: - - pipeline: main-ci-docker-compose - source: main-ci-docker-compose # given pipeline name + - pipeline: eshoponweb-ci-dockercompose + source: eshoponweb-ci-dockercompose # given pipeline name trigger: true repositories: - repository: self diff --git a/.ado/main-cd-web-webapp.yml b/.ado/eshoponweb-cd-webapp-code.yml similarity index 90% rename from .ado/main-cd-web-webapp.yml rename to .ado/eshoponweb-cd-webapp-code.yml index e6bc4cf3..5cc9e0dd 100644 --- a/.ado/main-cd-web-webapp.yml +++ b/.ado/eshoponweb-cd-webapp-code.yml @@ -1,8 +1,10 @@ -# Trigger CD wehn CI executed succesfully +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") + +# Trigger CD when CI executed succesfully resources: pipelines: - - pipeline: eshopweb-ci-main - source: eshopweb-ci-main # given pipeline name + - pipeline: eshoponweb-ci + source: eshoponweb-ci # given pipeline name trigger: true diff --git a/.ado/main-cd-webapp-compose.yml b/.ado/eshoponweb-cd-webapp-dockercompose.yml similarity index 97% rename from .ado/main-cd-webapp-compose.yml rename to .ado/eshoponweb-cd-webapp-dockercompose.yml index 8506248d..09a326b1 100644 --- a/.ado/main-cd-webapp-compose.yml +++ b/.ado/eshoponweb-cd-webapp-dockercompose.yml @@ -1,9 +1,12 @@ #NOT WORKING YET + +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") #locally docker compose works, deploying to Azure WebApp is succesful but something still fails # trigger: none resources: - repo: self + trigger: none variables: tag: '$(Build.BuildId)' diff --git a/.ado/main-ci-containers-compose.yml b/.ado/eshoponweb-ci-dockercompose.yml similarity index 96% rename from .ado/main-ci-containers-compose.yml rename to .ado/eshoponweb-ci-dockercompose.yml index c86e1a5d..aa890da2 100644 --- a/.ado/main-ci-containers-compose.yml +++ b/.ado/eshoponweb-ci-dockercompose.yml @@ -1,12 +1,15 @@ +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") + # Docker # Build a Docker image # https://docs.microsoft.com/azure/devops/pipelines/languages/docker -trigger: -- main +# trigger: +# - main resources: - repo: self + trigger: none variables: tag: '$(Build.BuildId)' diff --git a/.ado/main-ci-mend.yml b/.ado/eshoponweb-ci-mend.yml similarity index 94% rename from .ado/main-ci-mend.yml rename to .ado/eshoponweb-ci-mend.yml index 52828986..29ec0481 100644 --- a/.ado/main-ci-mend.yml +++ b/.ado/eshoponweb-ci-mend.yml @@ -1,9 +1,11 @@ +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") # trigger: # - main resources: - repo: self - + trigger: none + stages: - stage: Build displayName: Build .Net Core Solution diff --git a/.ado/eshoponweb-ci-pr.yml b/.ado/eshoponweb-ci-pr.yml new file mode 100644 index 00000000..6aa31d17 --- /dev/null +++ b/.ado/eshoponweb-ci-pr.yml @@ -0,0 +1,38 @@ + +resources: +- repo: self + trigger: none + +stages: +- stage: Build + displayName: Build .Net Core Solution + jobs: + - job: Build + pool: + vmImage: ubuntu-latest + steps: + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: 'restore' + projects: '**/*.sln' + feedsToUse: 'select' + + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: '**/*.sln' + + - task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: 'test' + projects: 'tests/UnitTests/*.csproj' + + - task: DotNetCoreCLI@2 + displayName: Publish + inputs: + command: 'publish' + publishWebProjects: true + arguments: '-o $(Build.ArtifactStagingDirectory)' \ No newline at end of file diff --git a/.ado/main-ci.yml b/.ado/eshoponweb-ci.yml similarity index 94% rename from .ado/main-ci.yml rename to .ado/eshoponweb-ci.yml index 726d2700..3002c321 100644 --- a/.ado/main-ci.yml +++ b/.ado/eshoponweb-ci.yml @@ -1,8 +1,10 @@ +#NAME THE PIPELINE SAME AS FILE (WITHOUT ".yml") # trigger: # - main resources: - repo: self + trigger: none stages: - stage: Build