Skip to content

Commit

Permalink
ci: Use Git Ref Under Review for Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheyla Trudo committed Sep 4, 2024
1 parent 5908897 commit 2703f8c
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 36 deletions.
3 changes: 2 additions & 1 deletion .pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
inputs:
Expand Down
23 changes: 15 additions & 8 deletions .pipelines/run-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
parameters:

- name: triggerBuildSourceBranch
type: string
default: ''
Expand Down Expand Up @@ -26,11 +27,12 @@ stages:
isCustom: true
type: linux
name: "$(BUILD_POOL_NAME_DEFAULT)"
#variables:
variables:
#cob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
#ob_git_checkout: true
ob_git_checkout: true
steps:
- checkout: none
- checkout: ACNTools
clean: true

- script: |
# To use the variables below, you must make the respective stage's dependsOn have - setup or it will not retain context of this stage
Expand Down Expand Up @@ -71,7 +73,8 @@ stages:
type: linux
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- script: |
cd azure-container-networking
Expand Down Expand Up @@ -196,7 +199,8 @@ stages:
ob_artifactSuffix: $(Suffix) # this is needed to not collide published artifact containers
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: containers/container-template.yaml
parameters:
Expand Down Expand Up @@ -242,7 +246,8 @@ stages:
name: npm
os: linux
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: containers/container-template.yaml
parameters:
Expand Down Expand Up @@ -294,7 +299,8 @@ stages:
os_versions: ltsc2022
platforms: linux/amd64 linux/arm64 windows/amd64
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: containers/manifest-template.yaml
parameters:
Expand Down Expand Up @@ -506,7 +512,8 @@ stages:
name: swiftv2_dummy_e2e
clusterName: "swiftv2dummy"
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: templates/delete-cluster.yaml
parameters:
Expand Down
5 changes: 3 additions & 2 deletions .pipelines/singletenancy/aks-swift/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: e2e-step-template.yaml
Expand Down Expand Up @@ -93,7 +93,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
5 changes: 3 additions & 2 deletions .pipelines/singletenancy/aks/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: e2e-step-template.yaml
Expand Down Expand Up @@ -98,7 +98,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: azure-cni-overlay-e2e-step-template.yaml
Expand All @@ -79,7 +79,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
Expand Down Expand Up @@ -116,7 +116,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: azure-cni-overlay-e2e-step-template.yaml
Expand Down Expand Up @@ -165,7 +165,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_linux_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand All @@ -187,11 +188,11 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_windows_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
clusterName: ${{ parameters.clusterName }}-$(commitID)
os: windows
cni: cniv2

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: cilium-dualstackoverlay-e2e-step-template.yaml
Expand Down Expand Up @@ -89,7 +89,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: cilium-overlay-e2e-step-template.yaml
Expand Down Expand Up @@ -93,7 +93,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: cilium-overlay-e2e-step-template.yaml
Expand Down Expand Up @@ -91,7 +91,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
5 changes: 3 additions & 2 deletions .pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: cilium-e2e-step-template.yaml
Expand Down Expand Up @@ -94,7 +94,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: dualstackoverlay-e2e-step-template.yaml
Expand All @@ -80,7 +80,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
Expand Down Expand Up @@ -116,7 +116,7 @@ stages:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: dualstackoverlay-e2e-step-template.yaml
Expand Down Expand Up @@ -165,7 +165,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_linux_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand All @@ -187,7 +188,8 @@ stages:
ob_outputDirectory: $(ACN_DIR)/${{ parameters.clusterName }}-$(commitID)_FailedE2ELogs_windows_Attempt_#$(System.StageAttempt)
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- template: ../../templates/log-template.yaml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/create-cluster-swiftv2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/templates/create-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
steps:
- checkout: azure-container-networking
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
Expand Down
10 changes: 8 additions & 2 deletions .pipelines/templates/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ stages:
type: linux
name: "$(BUILD_POOL_NAME_DEFAULT)"
steps:
- checkout: azure-container-networking
# Test changes under review
- checkout: ACNReviewChanges
clean: true

- script: |
cd azure-container-networking
make tools
Expand Down Expand Up @@ -45,7 +48,10 @@ stages:
type: windows
name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS_ALT)"
steps:
- checkout: azure-container-networking
# Test changes under review
- checkout: ACNReviewChanges
clean: true

- script: |
cd azure-container-networking/
cd npm/
Expand Down
4 changes: 4 additions & 0 deletions .pipelines/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pr:
- ".github"
- docs


trigger:
branches:
include:
Expand All @@ -19,16 +20,19 @@ trigger:
include:
- "*"


pool:
vmImage: ubuntu-latest


variables:
ADO_COMPLIANT_BUILD_PROJECT_URI: $(VAR_PROJECT_URI)
ADO_COMPLIANT_BUILD_ORG: $(VAR_BUILD_ORG)
ADO_AUTH_METHOD: $(VAR_AUTH_METHOD)
ADO_AUTHORIZATION: $(VAR_AUTH)
ADO_COMPLIANT_PIPELINE_ID: $(VAR_PIPELINE_ID)


jobs:
- job: trigger
displayName: Test ACN Pull Request Changes
Expand Down

0 comments on commit 2703f8c

Please sign in to comment.