From ef32f95d7f4f1f4a5aa8d6a617dba62ab879f4c7 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 10:53:20 +0100 Subject: [PATCH 01/28] #110: adding the pipeline --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5c9abb3..b91aad0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,11 @@ steps: submodules: true - script: | - git remote add azure https://github.com/SaintAngeLs/courier_app.git + echo " - [ ] Adding Azure DevOps remote repository..." + git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + echo " - [ ] Fetching from Azure DevOps..." + git fetch azure + echo " - [ ] Pushing to Azure DevOps main branch..." git push azure HEAD:main --force env: AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) From a0df6cb954112f6e26ad0252b34dd47c12a0b90d Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 10:56:59 +0100 Subject: [PATCH 02/28] #110: pipeline update --- azure-pipelines.yml => .github/workflows/azure-pipelines.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename azure-pipelines.yml => .github/workflows/azure-pipelines.yml (100%) diff --git a/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml similarity index 100% rename from azure-pipelines.yml rename to .github/workflows/azure-pipelines.yml From c862e5371da5ec8efa8d62db0ca8651ab938f6e1 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 10:58:52 +0100 Subject: [PATCH 03/28] #110: workflow update --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index b91aad0..7276818 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,5 +1,5 @@ trigger: -- main +- pipeline pool: vmImage: 'ubuntu-latest' From 6d0db68e301dedee74de4c1751a809cbcc2840dd Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:04:53 +0100 Subject: [PATCH 04/28] #110: workflow update --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 7276818..b91aad0 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,5 +1,5 @@ trigger: -- pipeline +- main pool: vmImage: 'ubuntu-latest' From 6103c2dc696b5a67fb309a70e4a3219c477dde4c Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:09:08 +0100 Subject: [PATCH 05/28] #110: workflow update --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index b91aad0..7276818 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,5 +1,5 @@ trigger: -- main +- pipeline pool: vmImage: 'ubuntu-latest' From d772a245c87324b7aefc9103e7148f92e9bb8643 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:11:34 +0100 Subject: [PATCH 06/28] #110: workflow update --- .github/workflows/azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 7276818..a7483e0 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,6 +1,10 @@ trigger: - pipeline +on: + push: + branches: + - '*' pool: vmImage: 'ubuntu-latest' From 0a13a34daf19a2167a82697e81c15efdcdad5c64 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:15:08 +0100 Subject: [PATCH 07/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 33 ++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index a7483e0..fdb12cc 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -8,17 +8,24 @@ on: pool: vmImage: 'ubuntu-latest' -steps: -- checkout: self - submodules: true +jobs: +- job: SyncToAzureDevOps + displayName: 'Sync to Azure DevOps Repository' + steps: + - checkout: self + submodules: true -- script: | - echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git - echo " - [ ] Fetching from Azure DevOps..." - git fetch azure - echo " - [ ] Pushing to Azure DevOps main branch..." - git push azure HEAD:main --force - env: - AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) - displayName: 'Push to Azure DevOps Repository' + - script: | + echo " - [ ] Configuring git..." + + echo " - [ ] Adding Azure DevOps remote repository..." + git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + + echo " - [ ] Fetching from Azure DevOps..." + git fetch azure + + echo " - [ ] Pushing to Azure DevOps main branch..." + git push azure HEAD:main --force + env: + AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) + displayName: 'Execute Git Commands' From 909121952c456336d178338f4016e1841dc75a48 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:17:38 +0100 Subject: [PATCH 08/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index fdb12cc..eb01af4 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,10 +1,6 @@ trigger: - pipeline -on: - push: - branches: - - '*' pool: vmImage: 'ubuntu-latest' From 811ef0c6f667fe51a071bb979e20f91e1b1c2b88 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:19:35 +0100 Subject: [PATCH 09/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index eb01af4..f4ba8f9 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -5,23 +5,23 @@ pool: vmImage: 'ubuntu-latest' jobs: -- job: SyncToAzureDevOps - displayName: 'Sync to Azure DevOps Repository' - steps: - - checkout: self - submodules: true + - job: SyncToAzureDevOps + displayName: 'Sync to Azure DevOps Repository' + steps: + - checkout: self + submodules: true - - script: | - echo " - [ ] Configuring git..." - - echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + - script: | + echo " - [ ] Configuring git..." + + echo " - [ ] Adding Azure DevOps remote repository..." + git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git - echo " - [ ] Fetching from Azure DevOps..." - git fetch azure + echo " - [ ] Fetching from Azure DevOps..." + git fetch azure - echo " - [ ] Pushing to Azure DevOps main branch..." - git push azure HEAD:main --force - env: - AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) - displayName: 'Execute Git Commands' + echo " - [ ] Pushing to Azure DevOps main branch..." + git push azure HEAD:main --force + env: + AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) + displayName: 'Execute Git Commands' From 31f4ff512ea644093dcc116fc7eb4ba5b915c2f3 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:20:55 +0100 Subject: [PATCH 10/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 29 ++++++++++++--------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index f4ba8f9..6616499 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -8,20 +8,17 @@ jobs: - job: SyncToAzureDevOps displayName: 'Sync to Azure DevOps Repository' steps: - - checkout: self - submodules: true + - checkout: self + submodules: true - - script: | - echo " - [ ] Configuring git..." - - echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git - - echo " - [ ] Fetching from Azure DevOps..." - git fetch azure - - echo " - [ ] Pushing to Azure DevOps main branch..." - git push azure HEAD:main --force - env: - AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) - displayName: 'Execute Git Commands' + - script: | + echo " - [ ] Configuring git..." + echo " - [ ] Adding Azure DevOps remote repository..." + git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + echo " - [ ] Fetching from Azure DevOps..." + git fetch azure + echo " - [ ] Pushing to Azure DevOps main branch..." + git push azure HEAD:main --force + env: + AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) + displayName: 'Execute Git Commands' From 584fba919919a5bafef61cc68ad8fe6a6f4161c4 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:22:35 +0100 Subject: [PATCH 11/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 6616499..b9ad630 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -5,12 +5,11 @@ pool: vmImage: 'ubuntu-latest' jobs: - - job: SyncToAzureDevOps + Sync: displayName: 'Sync to Azure DevOps Repository' steps: - checkout: self submodules: true - - script: | echo " - [ ] Configuring git..." echo " - [ ] Adding Azure DevOps remote repository..." From 3eb88c50f96c7cb10d3af721eebef8ba119bcccb Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:23:51 +0100 Subject: [PATCH 12/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index b9ad630..b68d54a 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -8,9 +8,10 @@ jobs: Sync: displayName: 'Sync to Azure DevOps Repository' steps: - - checkout: self - submodules: true - - script: | + - uses: actions/checkout@v2 # Corrected line + with: + submodules: true + - run: | echo " - [ ] Configuring git..." echo " - [ ] Adding Azure DevOps remote repository..." git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git From 6b4e5e369bb04259751e745434dd56a79cfe4198 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:24:33 +0100 Subject: [PATCH 13/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index b68d54a..cea3c90 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -4,6 +4,11 @@ trigger: pool: vmImage: 'ubuntu-latest' +on: + push: + branches: + - '*' + jobs: Sync: displayName: 'Sync to Azure DevOps Repository' From 8126b5471dff5516a322da1080b8cb0d1b4af848 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:25:40 +0100 Subject: [PATCH 14/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index cea3c90..307064e 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,14 +1,14 @@ -trigger: -- pipeline +# trigger: +# - pipeline -pool: - vmImage: 'ubuntu-latest' +# pool: +# vmImage: 'ubuntu-latest' on: push: branches: - '*' - + jobs: Sync: displayName: 'Sync to Azure DevOps Repository' From 2f6d86319deda0f7033258fa707b1bf9f36f9f6e Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:27:03 +0100 Subject: [PATCH 15/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 307064e..32469f6 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -11,12 +11,13 @@ on: jobs: Sync: - displayName: 'Sync to Azure DevOps Repository' + name: 'Sync to Azure DevOps Repository' # Changed from 'displayName' to 'name' steps: - - uses: actions/checkout@v2 # Corrected line + - uses: actions/checkout@v2 with: submodules: true - - run: | + - name: 'Execute Git Commands' # Changed from 'displayName' to 'name' + run: | echo " - [ ] Configuring git..." echo " - [ ] Adding Azure DevOps remote repository..." git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git @@ -26,4 +27,3 @@ jobs: git push azure HEAD:main --force env: AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) - displayName: 'Execute Git Commands' From 21c5b58dd3655b6175616a98d96f7b761c9250af Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:29:22 +0100 Subject: [PATCH 16/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 32469f6..c0e3773 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -1,22 +1,20 @@ -# trigger: -# - pipeline - -# pool: -# vmImage: 'ubuntu-latest' +name: Sync to Azure DevOps Repository on: push: branches: - - '*' + - '*' jobs: Sync: - name: 'Sync to Azure DevOps Repository' # Changed from 'displayName' to 'name' + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 with: submodules: true - - name: 'Execute Git Commands' # Changed from 'displayName' to 'name' + + - name: Execute Git Commands run: | echo " - [ ] Configuring git..." echo " - [ ] Adding Azure DevOps remote repository..." @@ -26,4 +24,4 @@ jobs: echo " - [ ] Pushing to Azure DevOps main branch..." git push azure HEAD:main --force env: - AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: $(AzureDevOpsPAT) + AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: ${{ secrets.AzureDevOpsPAT }} From 81e73311a3daa994b276e3471ede24a420ee65eb Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:34:09 +0100 Subject: [PATCH 17/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index c0e3773..2b03a7a 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -17,11 +17,11 @@ jobs: - name: Execute Git Commands run: | echo " - [ ] Configuring git..." + git config --global user.email "voznesenskijandrej5@gmail.com" + git config --global user.name "Andrii Voznesenskyi" echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + git remote add azure https://01174367@pw.edu.pl:${{ secrets.AzureDevOpsPAT }}@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." git push azure HEAD:main --force - env: - AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN: ${{ secrets.AzureDevOpsPAT }} From 6afb95d892af0d36729e5598b9557a5a97dd56d2 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:40:39 +0100 Subject: [PATCH 18/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 2b03a7a..25aeb47 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -8,6 +8,8 @@ on: jobs: Sync: runs-on: ubuntu-latest + env: + AZURE_DEVOPS_PAT: ${{ secrets.AzureDevOpsPAT }} steps: - name: Checkout code uses: actions/checkout@v2 @@ -20,7 +22,7 @@ jobs: git config --global user.email "voznesenskijandrej5@gmail.com" git config --global user.name "Andrii Voznesenskyi" echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://01174367@pw.edu.pl:${{ secrets.AzureDevOpsPAT }}@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + git remote add azure https://01174367@pw.edu.pl:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." From cb7a7f1c5150c13a8087b9ce34fd5feae1206c82 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:42:10 +0100 Subject: [PATCH 19/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 25aeb47..6322131 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -22,7 +22,7 @@ jobs: git config --global user.email "voznesenskijandrej5@gmail.com" git config --global user.name "Andrii Voznesenskyi" echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://01174367@pw.edu.pl:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + git remote add azure https://$(AZURE_DEVOPS_PAT)@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." From 0be4bc3930692954b8de792eda683c2d5eb16e78 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:44:03 +0100 Subject: [PATCH 20/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 6322131..74eb525 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -9,7 +9,7 @@ jobs: Sync: runs-on: ubuntu-latest env: - AZURE_DEVOPS_PAT: ${{ secrets.AzureDevOpsPAT }} + AZURE_DEVOPS_PAT: ${{ secrets.AZUREDEVOPSPAT }} steps: - name: Checkout code uses: actions/checkout@v2 From d0e13273a3c6b8ecddb2349911524fb8be574b25 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:45:25 +0100 Subject: [PATCH 21/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 74eb525..85b9fdd 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -22,7 +22,7 @@ jobs: git config --global user.email "voznesenskijandrej5@gmail.com" git config --global user.name "Andrii Voznesenskyi" echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://$(AZURE_DEVOPS_PAT)@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + git remote add azure https://01174367@pw.edu.pl:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." From 15ca927fe623e6086642ab750ec6185cd3cf9674 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:47:24 +0100 Subject: [PATCH 22/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 85b9fdd..3abb33e 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -22,7 +22,7 @@ jobs: git config --global user.email "voznesenskijandrej5@gmail.com" git config --global user.name "Andrii Voznesenskyi" echo " - [ ] Adding Azure DevOps remote repository..." - git remote add azure https://01174367@pw.edu.pl:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git + git remote add azure https://01174367:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." From 20364789b35f244b4e06ff8f5b4f9663440c62a7 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:50:35 +0100 Subject: [PATCH 23/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 3abb33e..477b9d6 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true + fetch-depth: 0 - name: Execute Git Commands run: | @@ -24,6 +25,6 @@ jobs: echo " - [ ] Adding Azure DevOps remote repository..." git remote add azure https://01174367:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." - git fetch azure + git fetch azure echo " - [ ] Pushing to Azure DevOps main branch..." git push azure HEAD:main --force From 595207407e4cfdba9e62b5b3530a9b484d2cd8cf Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:54:02 +0100 Subject: [PATCH 24/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 477b9d6..9b0eb37 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -15,8 +15,7 @@ jobs: uses: actions/checkout@v2 with: submodules: true - fetch-depth: 0 - + - name: Execute Git Commands run: | echo " - [ ] Configuring git..." @@ -25,6 +24,6 @@ jobs: echo " - [ ] Adding Azure DevOps remote repository..." git remote add azure https://01174367:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git echo " - [ ] Fetching from Azure DevOps..." - git fetch azure + git fetch azure --depth=2147483647 echo " - [ ] Pushing to Azure DevOps main branch..." git push azure HEAD:main --force From 0bce88b4028e23965f5ede1d92b14c317bb7e8a1 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:55:47 +0100 Subject: [PATCH 25/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 9b0eb37..03458c7 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -15,15 +15,23 @@ jobs: uses: actions/checkout@v2 with: submodules: true + fetch-depth: 0 # Fetch all branches - - name: Execute Git Commands + - name: Configuring git run: | - echo " - [ ] Configuring git..." git config --global user.email "voznesenskijandrej5@gmail.com" git config --global user.name "Andrii Voznesenskyi" - echo " - [ ] Adding Azure DevOps remote repository..." + + - name: Adding Azure DevOps remote repository + run: | git remote add azure https://01174367:$AZURE_DEVOPS_PAT@dev.azure.com/dotNetAPA/CurrierHub/_git/courier_app.git - echo " - [ ] Fetching from Azure DevOps..." + + - name: Fetching from Azure DevOps + run: | git fetch azure --depth=2147483647 - echo " - [ ] Pushing to Azure DevOps main branch..." - git push azure HEAD:main --force + + - name: Pushing all branches to Azure DevOps + run: | + for branch in $(git branch -r | grep -v 'azure/' | sed 's/origin\///'); do + git push azure $branch:$branch --force + done From 36ecce9d975e884ca384cb63045863b977df9f49 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:58:31 +0100 Subject: [PATCH 26/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index 03458c7..af07fd2 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -30,8 +30,9 @@ jobs: run: | git fetch azure --depth=2147483647 - - name: Pushing all branches to Azure DevOps + - name: Checkout and push all branches to Azure DevOps run: | - for branch in $(git branch -r | grep -v 'azure/' | sed 's/origin\///'); do + for branch in $(git branch -a | grep 'remotes/origin/' | sed 's/remotes\/origin\///'); do + git checkout $branch git push azure $branch:$branch --force done From c7b7a691379c42b50bf3f2b97eff22e093d9e2a0 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 11:59:55 +0100 Subject: [PATCH 27/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index af07fd2..b221ccc 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -33,6 +33,7 @@ jobs: - name: Checkout and push all branches to Azure DevOps run: | for branch in $(git branch -a | grep 'remotes/origin/' | sed 's/remotes\/origin\///'); do - git checkout $branch + git checkout -b $branch origin/$branch git push azure $branch:$branch --force done + From a5b888ff2ed0d4edf3f363eddfb1eb1ab2bd1c7f Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi <01174367@pw.edu.pl> Date: Sat, 20 Jan 2024 12:01:40 +0100 Subject: [PATCH 28/28] #110: udpate --- .github/workflows/azure-pipelines.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/azure-pipelines.yml b/.github/workflows/azure-pipelines.yml index b221ccc..0f9263a 100644 --- a/.github/workflows/azure-pipelines.yml +++ b/.github/workflows/azure-pipelines.yml @@ -33,7 +33,13 @@ jobs: - name: Checkout and push all branches to Azure DevOps run: | for branch in $(git branch -a | grep 'remotes/origin/' | sed 's/remotes\/origin\///'); do - git checkout -b $branch origin/$branch + if git rev-parse --verify $branch > /dev/null 2>&1; then + # If branch exists locally, just checkout + git checkout $branch + else + # If branch does not exist locally, create it tracking the remote + git checkout -b $branch origin/$branch + fi git push azure $branch:$branch --force done