Skip to content

Commit 8456005

Browse files
author
Sheyla Trudo
committed
Separate Build Changes
1 parent 3b96a6b commit 8456005

34 files changed

+1004
-939
lines changed

.pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ parameters:
88

99
jobs:
1010
- job: CNI_${{ parameters.os }}
11-
condition: and( not(canceled()), not(failed()) )
1211
displayName: CNI k8s E2E ${{ parameters.os }}
1312
dependsOn: ${{ parameters.dependsOn }}
1413
pool:
1514
name: $(BUILD_POOL_NAME_DEFAULT)
15+
os: linux
1616
steps:
1717
- task: AzureCLI@2
1818
inputs:

.pipelines/containers/manifest-template.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,22 @@ steps:
3636
displayName: Manifest Push
3737
retryCountOnTaskFailure: 3
3838
39-
- task: 1ES.PublishPipelineArtifact@1
39+
- task: AzureCLI@2
40+
displayName: "Logout"
41+
inputs:
42+
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
43+
scriptLocation: "inlineScript"
44+
scriptType: "bash"
45+
inlineScript: |
46+
docker logout
47+
48+
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
49+
displayName: "Add SBOM Generator tool"
50+
inputs:
51+
BuildDropPath: "$(Build.ArtifactStagingDirectory)"
52+
53+
- task: PublishBuildArtifacts@1
4054
inputs:
4155
artifactName: "output"
42-
targetPath: "$(Build.ArtifactStagingDirectory)"
56+
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
57+
condition: succeeded()

.pipelines/multitenancy/swiftv2-e2e.jobs.yaml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ stages:
1717
- setup
1818
variables:
1919
commitID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.commitID'] ]
20-
ACN_DIR: $(Build.SourcesDirectory)
2120
jobs:
22-
- template: ../templates/create-cluster-swiftv2.jobs.yaml@ACNTools
21+
- template: ../templates/create-cluster-swiftv2.yaml
2322
parameters:
2423
name: ${{ parameters.name }}
2524
displayName: ${{ parameters.displayName }}
@@ -39,7 +38,6 @@ stages:
3938
- publish
4039
- ${{ parameters.clusterName }}
4140
variables:
42-
ACN_DIR: $(Build.SourcesDirectory)
4341
GOPATH: "$(Agent.TempDirectory)/go" # Go workspace path
4442
GOBIN: "$(GOPATH)/bin" # Go binaries path
4543
modulePath: "$(GOPATH)/src/github.com/Azure/azure-container-networking"
@@ -48,22 +46,14 @@ stages:
4846
- job: ${{ parameters.name }}
4947
displayName: Swiftv2 Multitenancy E2E Test Suite - (${{ parameters.name }})
5048
pool:
51-
isCustom: true
52-
type: linux
5349
name: $(BUILD_POOL_NAME_DEFAULT)
50+
os: linux
5451
demands:
5552
- agent.os -equals Linux
5653
- Role -equals $(CUSTOM_E2E_ROLE)
57-
variables:
58-
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
59-
ob_git_checkout: true
6054
steps:
61-
- checkout: ACNReviewChanges
62-
clean: true
63-
64-
- template: swiftv2-e2e.steps.yaml@ACNTools
55+
- template: swiftv2-e2e.steps.yaml
6556
parameters:
6657
name: ${{ parameters.name }}
6758
clusterName: ${{ parameters.clusterName }}-$(commitID)
6859
os: linux
69-

.pipelines/multitenancy/swiftv2-e2e.steps.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,25 @@ parameters:
44
continueOnError: true
55

66
steps:
7-
- bash: |
8-
go version
9-
go env
10-
mkdir -p '$(GOBIN)'
11-
mkdir -p '$(GOPATH)/pkg'
12-
mkdir -p '$(modulePath)'
13-
echo '##vso[task.prependpath]$(GOBIN)'
14-
echo '##vso[task.prependpath]$(GOROOT)/bin'
15-
name: "GoEnv"
16-
displayName: "Set up the Go environment"
17-
187
- task: KubectlInstaller@0
198
inputs:
209
kubectlVersion: latest
2110

2211
- task: AzureCLI@2
12+
displayName: "Start Swiftv2 Pods"
13+
continueOnError: ${{ parameters.continueOnError }}
14+
env:
15+
AZCLI: az
16+
CLUSTER: ${{ parameters.clusterName }}
17+
SUBNET_TOKEN: $(SUBNET_TOKEN)
2318
inputs:
2419
azureSubscription: $(ACN_TEST_SERVICE_CONNECTION)
2520
scriptLocation: "inlineScript"
2621
scriptType: "bash"
27-
workingDirectory: $(ACN_DIR)
2822
addSpnToEnvironment: true
2923
inlineScript: |
3024
set -e
31-
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
25+
make -C ./hack/aks set-kubeconf
3226
ls -lah
3327
pwd
3428
kubectl cluster-info
@@ -58,21 +52,13 @@ steps:
5852
echo "Check pods after 4 minutes"
5953
kubectl get po -owide -A
6054
kubectl describe pni
61-
name: "start_swiftv2_pods"
62-
displayName: "Start Swiftv2 Pods"
63-
continueOnError: ${{ parameters.continueOnError }}
64-
env:
65-
SUBNET_TOKEN: $(SUBNET_TOKEN)
6655
6756
- script: |
6857
set -e
6958
kubectl get po -owide -A
7059
cd test/integration/swiftv2
7160
echo "TestSwiftv2PodToPod and will run it after migration from scripts."
7261
go test -count=1 swiftv2_test.go -timeout 3m -tags swiftv2 -run ^TestSwiftv2PodToPod$ -tags=swiftv2,integration -v
73-
workingDirectory: $(ACN_DIR)
7462
retryCountOnTaskFailure: 3
75-
name: "Swiftv2_Tests_future_version"
7663
displayName: "Swiftv2 Tests through code"
7764
continueOnError: ${{ parameters.continueOnError }}
78-

.pipelines/pipeline.yaml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
pr:
2+
branches:
3+
include:
4+
- master
5+
- release/*
6+
paths:
7+
exclude:
8+
- ".devcontainer"
9+
- ".hooks"
10+
- ".vscode"
11+
- ".github"
12+
- docs
13+
14+
trigger:
15+
branches:
16+
include:
17+
- gh-readonly-queue/master/*
18+
tags:
19+
include:
20+
- "*"
21+
122
stages:
223
- stage: setup
324
displayName: ACN
@@ -6,7 +27,6 @@ stages:
627
displayName: Setup
728
pool:
829
name: "$(BUILD_POOL_NAME_DEFAULT)"
9-
os: linux
1030
steps:
1131
- script: |
1232
# To use the variables below, you must make the respective stage's dependsOn have - setup or it will not retain context of this stage
@@ -45,12 +65,7 @@ stages:
4565
STORAGE_ID: $[ stagedependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
4666
pool:
4767
name: "$(BUILD_POOL_NAME_DEFAULT)"
48-
os: linux
4968
steps:
50-
- task: GoTool@0
51-
inputs:
52-
version: $(GO_VERSION)
53-
5469
- script: |
5570
make ipv6-hp-bpf-lib
5671
make all-binaries-platforms
@@ -73,10 +88,11 @@ stages:
7388
targetFolder: $(Build.ArtifactStagingDirectory)
7489
condition: succeeded()
7590

76-
- task: 1ES.PublishPipelineArtifact@1
91+
- task: PublishBuildArtifacts@1
7792
inputs:
7893
artifactName: "output"
79-
targetPath: "$(Build.ArtifactStagingDirectory)"
94+
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
95+
condition: succeeded()
8096

8197
- stage: containerize
8298
displayName: Build Images
@@ -88,7 +104,6 @@ stages:
88104
displayName: Build Images
89105
pool:
90106
name: "$(BUILD_POOL_NAME_LINUX_AMD64)"
91-
os: linux
92107
strategy:
93108
matrix:
94109
azure_ipam_linux_amd64:
@@ -128,9 +143,6 @@ stages:
128143
name: npm
129144
os: windows
130145
steps:
131-
- task: GoTool@0
132-
inputs:
133-
version: $(GO_VERSION)
134146
- template: containers/container-template.yaml
135147
parameters:
136148
arch: $(arch)
@@ -141,7 +153,6 @@ stages:
141153
displayName: Build Images
142154
pool:
143155
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
144-
os: linux
145156
strategy:
146157
matrix:
147158
azure_ipam_linux_arm64:
@@ -182,7 +193,6 @@ stages:
182193
displayName: Compile Manifests
183194
pool:
184195
name: "$(BUILD_POOL_NAME_DEFAULT)"
185-
os: linux
186196
strategy:
187197
matrix:
188198
azure_ipam:
@@ -201,9 +211,6 @@ stages:
201211
name: npm
202212
platforms: linux/amd64 linux/arm64 windows/amd64
203213
steps:
204-
- task: GoTool@0
205-
inputs:
206-
version: $(GO_VERSION)
207214
- template: containers/manifest-template.yaml
208215
parameters:
209216
name: $(name)
@@ -391,7 +398,6 @@ stages:
391398
displayName: Delete Cluster
392399
pool:
393400
name: "$(BUILD_POOL_NAME_DEFAULT)"
394-
os: linux
395401
strategy:
396402
matrix:
397403
cilium_e2e:
@@ -443,7 +449,7 @@ stages:
443449
clusterName: "cildsovere2e"
444450
region: $(REGION_DUALSTACKOVERLAY_CLUSTER_TEST)
445451
steps:
446-
- template: templates/delete-cluster.yaml
452+
- template: templates/delete-cluster.steps.yaml
447453
parameters:
448454
name: $(name)
449455
clusterName: $(clusterName)-$(commitID)
@@ -455,7 +461,6 @@ stages:
455461
displayName: Delete Cluster
456462
pool:
457463
name: "$(BUILD_POOL_NAME_DEFAULT)"
458-
os: linux
459464
strategy:
460465
matrix:
461466
swiftv2_e2e:
@@ -467,7 +472,7 @@ stages:
467472
clusterName: "swiftv2dummy"
468473
region: $(REGION_SWIFTV2_CLUSTER_TEST)
469474
steps:
470-
- template: templates/delete-cluster.yaml
475+
- template: templates/delete-cluster.steps.yaml
471476
parameters:
472477
name: $(name)
473478
clusterName: $(clusterName)-$(commitID)

0 commit comments

Comments
 (0)