Skip to content

Commit 333f25c

Browse files
author
Sheyla Trudo
committed
Template
1 parent cf89840 commit 333f25c

File tree

6 files changed

+38
-82
lines changed

6 files changed

+38
-82
lines changed

.pipelines/containers/manifest-template.yaml

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

.pipelines/pipeline.yaml

Lines changed: 15 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
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-
221
stages:
232
- stage: setup
3+
variables:
4+
ACN_DIR: $(Build.SourcesDirectory)
245
displayName: ACN
256
jobs:
267
- job: env
@@ -48,7 +29,6 @@ stages:
4829
echo $(Build.SourceBranch)
4930
name: "EnvironmentalVariables"
5031
displayName: "Set environmental variables"
51-
condition: always()
5232
5333
- template: templates/run-unit-tests.yaml
5434

@@ -58,6 +38,8 @@ stages:
5838
dependsOn:
5939
- setup
6040
- test
41+
variables:
42+
ACN_DIR: $(Build.SourcesDirectory)
6143
jobs:
6244
- job: build
6345
displayName: Build Binaries
@@ -66,45 +48,27 @@ stages:
6648
pool:
6749
name: "$(BUILD_POOL_NAME_DEFAULT)"
6850
steps:
51+
- checkout: self
6952
- script: |
7053
make ipv6-hp-bpf-lib
7154
make all-binaries-platforms
7255
name: "BuildAllPlatformBinaries"
7356
displayName: "Build all platform binaries"
7457
75-
- script: |
76-
mkdir -p ./output/bins
77-
cd ./output
78-
find . -name '*.tgz' -print -exec mv -t ./bins/ {} +
79-
find . -name '*.zip' -print -exec mv -t ./bins/ {} +
80-
shopt -s extglob
81-
rm -rf !("bins")
82-
name: "PrepareArtifacts"
83-
displayName: "Prepare Artifacts"
84-
85-
- task: CopyFiles@2
86-
inputs:
87-
sourceFolder: "output"
88-
targetFolder: $(Build.ArtifactStagingDirectory)
89-
condition: succeeded()
90-
91-
- task: PublishBuildArtifacts@1
92-
inputs:
93-
artifactName: "output"
94-
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
95-
condition: succeeded()
96-
9758
- stage: containerize
9859
displayName: Build Images
9960
dependsOn:
10061
- setup
10162
- test
63+
variables:
64+
ACN_DIR: $(Build.SourcesDirectory)
10265
jobs:
10366
- job: containerize_amd64
10467
displayName: Build Images
10568
pool:
10669
name: "$(BUILD_POOL_NAME_LINUX_AMD64)"
10770
strategy:
71+
maxParallel: 4
10872
matrix:
10973
azure_ipam_linux_amd64:
11074
arch: amd64
@@ -172,6 +136,7 @@ stages:
172136
os: windows
173137
os_version: ltsc2022
174138
steps:
139+
- checkout: self
175140
- template: containers/container-template.yaml
176141
parameters:
177142
arch: $(arch)
@@ -183,6 +148,7 @@ stages:
183148
pool:
184149
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
185150
strategy:
151+
maxParallel: 4
186152
matrix:
187153
azure_ipam_linux_arm64:
188154
arch: arm64
@@ -205,6 +171,7 @@ stages:
205171
name: npm
206172
os: linux
207173
steps:
174+
- checkout: self
208175
- template: containers/container-template.yaml
209176
parameters:
210177
arch: $(arch)
@@ -217,12 +184,14 @@ stages:
217184
- containerize
218185
variables:
219186
Packaging.EnableSBOMSigning: false
187+
ACN_DIR: $(Build.SourcesDirectory)
220188
jobs:
221189
- job: manifest
222190
displayName: Compile Manifests
223191
pool:
224192
name: "$(BUILD_POOL_NAME_DEFAULT)"
225193
strategy:
194+
maxParallel: 4
226195
matrix:
227196
azure_ipam:
228197
name: azure-ipam
@@ -433,6 +402,7 @@ stages:
433402
pool:
434403
name: "$(BUILD_POOL_NAME_DEFAULT)"
435404
strategy:
405+
maxParallel: 4
436406
matrix:
437407
cilium_e2e:
438408
name: cilium_e2e
@@ -496,6 +466,7 @@ stages:
496466
pool:
497467
name: "$(BUILD_POOL_NAME_DEFAULT)"
498468
strategy:
469+
maxParallel: 4
499470
matrix:
500471
swiftv2_e2e:
501472
name: swiftv2_e2e

.pipelines/run-pipeline.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ parameters:
1616
type: string
1717
default: ''
1818

19-
2019
stages:
2120
- stage: setup
22-
displayName: ACN
21+
displayName: "[PreBuild] Configure and Provision Required Resources"
2322
# Block build start until pre-build validation occurs.
2423
dependsOn: pre_build
2524
variables:
@@ -85,21 +84,21 @@ stages:
8584
workingDirectory: $(ACN_DIR)
8685
8786
- script: |
88-
mkdir -p ./output/bins
8987
cd ./output
9088
find . -name '*.tgz' -print -exec mv -t ./bins/ {} +
9189
find . -name '*.zip' -print -exec mv -t ./bins/ {} +
9290
shopt -s extglob
9391
rm -rf !("bins")
9492
name: "PrepareArtifacts"
9593
displayName: "Prepare Artifacts"
96-
94+
9795
- task: CopyFiles@2
9896
inputs:
9997
sourceFolder: "output"
10098
targetFolder: $(Build.ArtifactStagingDirectory)
10199
condition: succeeded()
102100

101+
103102
- stage: containerize
104103
displayName: Build Images
105104
dependsOn:

.pipelines/template.trigger.jobs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
TMPL_REPO_REF: '${{ parameters.mainRepoRef }}'
5454
TMPL_REPO_NAME: '${{ parameters.mainRepoName }}'
5555
TMPL_REPO_TYPE: '${{ parameters.mainRepoType }}'
56-
ACCEPTED_REPO_REFS: '^refs/heads/feature/ob-onboard-0$'
56+
ACCEPTED_REPO_REFS: '^refs/heads/feature/ob-onboard-2$'
5757
ACCEPTED_REPO_NAME: '^Azure/azure-container-networking$'
5858
ACCEPTED_REPO_TYPE: '^github$'
5959

.pipelines/templates/log-template.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ steps:
268268
displayName: Windows Logs
269269
condition: always()
270270
271-
- publish: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt)
272-
condition: always()
273-
artifact: ${{ parameters.clusterName }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt)
274-
name: acnLogs_${{ parameters.logType }}
271+
- task: 1ES.PublishPipelineArtifact@1
275272
displayName: Publish Cluster logs
273+
condition: always()
274+
inputs:
275+
targetPath: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt)
276+
artifactName: ${{ parameters.clusterName }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt)

.pipelines/trigger.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,19 @@ trigger: none
2121
# include:
2222
# - "*"
2323

24-
2524
resources:
2625
repositories:
26+
27+
- repository: 1ESPipelineTemplates
28+
type: git
29+
name: 1ESPipelineTemplates/1ESPipelineTemplates
30+
ref: refs/tags/stable
31+
2732
- repository: azure-container-networking
2833
type: github
2934
name: Azure/azure-container-networking
3035
endpoint: 'Azure-ACN RO Service Connection'
31-
ref: refs/heads/feature/ob-onboard-0
36+
ref: refs/heads/feature/ob-onboard-2
3237

3338

3439
variables:
@@ -37,16 +42,11 @@ variables:
3742
REPO_NAME: $[ resources.repositories['azure-container-networking'].name ]
3843
REPO_TYPE: $[ resources.repositories['azure-container-networking'].type ]
3944
CHANGESET_COMMIT: $[ resources.repositories['self'].version ]
40-
41-
42-
pool:
43-
vmImage: ubuntu-latest
44-
4545

4646
extends:
47-
template: /.pipelines/template.trigger.jobs.yaml@azure-container-networking
47+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
4848
parameters:
49-
mainRepoRef: $(REPO_REF)
50-
mainRepoCommit: $(REPO_COMMIT)
51-
mainRepoName: $(REPO_NAME)
52-
mainRepoType: $(REPO_TYPE)
49+
pool:
50+
name: "$(BUILD_POOL_NAME_DEFAULT)"
51+
stages:
52+
- template: /.pipelines/pipeline.yaml@azure-container-networking

0 commit comments

Comments
 (0)