Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: 1ES Template #3123

Closed
wants to merge 131 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
cafd8f1
Template
Nov 4, 2024
e063ced
fixup! Separate Build Changes
Nov 20, 2024
9990f6e
fixup! Template
Nov 8, 2024
938d8b5
fixup! Template
Nov 8, 2024
ca622a0
fixup! Template
Nov 8, 2024
448ffbc
fixup! Template
Nov 8, 2024
0b010f4
fixup! Template
Nov 8, 2024
39d2730
fixup! Template
Nov 9, 2024
4501d58
fixup! Template
Nov 14, 2024
6bab4fd
fixup! Template
Nov 14, 2024
229295e
fixup! Template
Nov 14, 2024
72d8ebe
fixup! Template
Nov 14, 2024
bf8b311
fixup! Template
Nov 14, 2024
a869613
fixup! Template
Nov 14, 2024
519bbba
fixup! Template
Nov 14, 2024
b02ed06
fixup! Template
Nov 14, 2024
ba69133
Separate Build Changes
Nov 14, 2024
e20190a
fixup! Separate Build Changes
Nov 14, 2024
0abb86c
fixup! Separate Build Changes
Nov 14, 2024
6de5f76
fixup! Separate Build Changes
Nov 14, 2024
b2d4726
fixup! Separate Build Changes
Nov 15, 2024
40a4947
fixup! Separate Build Changes
Nov 15, 2024
567affa
fixup! Separate Build Changes
Nov 15, 2024
055460d
fixup! Separate Build Changes
Nov 15, 2024
01709b8
fixup! Separate Build Changes
Nov 15, 2024
3271edb
fixup! Separate Build Changes
Nov 16, 2024
56b3ba3
fixup! Separate Build Changes
Nov 16, 2024
48cef23
fixup! Separate Build Changes
Nov 16, 2024
9192925
fixup! Separate Build Changes
Nov 16, 2024
48c05fc
fixup! Separate Build Changes
Nov 16, 2024
eac8770
fixup! Separate Build Changes
Nov 16, 2024
4a82b86
fixup! Separate Build Changes
Nov 16, 2024
9244832
fixup! Separate Build Changes
Nov 16, 2024
697d351
fixup! Separate Build Changes
Nov 16, 2024
226fcbb
fixup! Separate Build Changes
Nov 16, 2024
c1ef3be
fixup! Separate Build Changes
Nov 16, 2024
382abbc
fixup! Separate Build Changes
Nov 16, 2024
ec9e709
fixup! Separate Build Changes
Nov 17, 2024
6957241
fixup! Separate Build Changes
Nov 18, 2024
82af249
fixup! Separate Build Changes
Nov 18, 2024
569e7ab
fixup! Separate Build Changes
Nov 19, 2024
9746944
fixup! Separate Build Changes
Nov 19, 2024
046d782
fixup! Separate Build Changes
Nov 19, 2024
a76ad53
fixup! Separate Build Changes
Nov 19, 2024
90bb302
fixup! Separate Build Changes
Nov 19, 2024
f015b4d
fixup! Separate Build Changes
Nov 19, 2024
b33e146
fixup! Separate Build Changes
Nov 19, 2024
8fb4256
fixup! Separate Build Changes
Nov 19, 2024
fd3ec49
fixup! Separate Build Changes
Nov 19, 2024
ffc6935
fixup! Separate Build Changes
Nov 19, 2024
95dad70
fixup! Separate Build Changes
Nov 19, 2024
da41082
fixup! Separate Build Changes
Nov 19, 2024
187eb7c
fixup! Separate Build Changes
Nov 19, 2024
b978bf3
fixup! Separate Build Changes
Nov 19, 2024
c7f13f6
fixup! Separate Build Changes
Nov 20, 2024
f592ced
fixup! Separate Build Changes
Nov 20, 2024
5ceaccb
fixup! Separate Build Changes
Nov 20, 2024
ea8175e
fixup! Separate Build Changes
Nov 20, 2024
ed8fde5
fixup! Separate Build Changes
Nov 20, 2024
8153059
fixup! Separate Build Changes
Nov 20, 2024
c05edaf
fixup! Separate Build Changes
Nov 20, 2024
24ce7a6
fixup! Separate Build Changes
Nov 20, 2024
58cdf2f
fixup! Separate Build Changes
Nov 21, 2024
0d291ed
fixup! Separate Build Changes
Nov 21, 2024
d43a0a7
fixup! Separate Build Changes
Nov 21, 2024
97130bf
fixup! Separate Build Changes
Nov 22, 2024
55c074a
fixup! Separate Build Changes
Nov 22, 2024
2b6f40a
fixup! Separate Build Changes
Nov 22, 2024
9bde1cc
fixup! Separate Build Changes
Nov 22, 2024
52413f6
fixup! Separate Build Changes
Nov 22, 2024
b78bd9c
fixup! Separate Build Changes
Nov 22, 2024
0666b85
fixup! Separate Build Changes
Nov 22, 2024
f8c0509
fixup! Separate Build Changes
Nov 22, 2024
d106cdc
fixup! Separate Build Changes
Nov 23, 2024
83eb88d
fixup! Separate Build Changes
Nov 23, 2024
5ae9156
fixup! Separate Build Changes
Nov 23, 2024
177de69
fixup! Separate Build Changes
Nov 23, 2024
66b5406
fixup! Separate Build Changes
Nov 23, 2024
660de78
fixup! Separate Build Changes
Nov 23, 2024
33871d9
fixup! Separate Build Changes
Nov 23, 2024
9b8b653
fixup! Separate Build Changes
Nov 23, 2024
7e546e4
fixup! Separate Build Changes
Nov 23, 2024
348ebaf
fixup! Separate Build Changes
Nov 23, 2024
b8badaa
fixup! Separate Build Changes
Nov 24, 2024
e8afcd8
fixup! Separate Build Changes
Nov 24, 2024
fdc112e
fixup! Separate Build Changes
Nov 24, 2024
54b968b
fixup! Separate Build Changes
Nov 24, 2024
e833ff4
fixup! Separate Build Changes
Nov 24, 2024
4281639
fixup! Separate Build Changes
Nov 24, 2024
2a69d6a
fixup! Separate Build Changes
Nov 24, 2024
2ad54b0
fixup! Separate Build Changes
Nov 24, 2024
326c9e2
fixup! Separate Build Changes
Nov 25, 2024
4c76fdc
fixup! Separate Build Changes
Nov 25, 2024
881f88b
fixup! Separate Build Changes
Nov 25, 2024
dfa3508
fixup! Separate Build Changes
Nov 25, 2024
dcf65db
fixup! Separate Build Changes
Nov 25, 2024
659e896
fixup! Separate Build Changes
Nov 25, 2024
841e234
fixup! Separate Build Changes
Nov 25, 2024
dcf2e24
fixup! Separate Build Changes
Nov 25, 2024
ec4499f
fixup! Separate Build Changes
Nov 25, 2024
b24e298
fixup! Separate Build Changes
Nov 25, 2024
4b2e1ac
fixup! Separate Build Changes
Nov 25, 2024
c82a9f8
fixup! Separate Build Changes
Nov 25, 2024
d872776
fixup! Separate Build Changes
Nov 25, 2024
b7695e7
fixup! Separate Build Changes
Nov 26, 2024
04d430f
fixup! Separate Build Changes
Nov 26, 2024
a1288fc
fixup! Separate Build Changes
Nov 26, 2024
26cce4f
fixup! Separate Build Changes
Nov 26, 2024
ff27834
fixup! Separate Build Changes
Nov 26, 2024
2e67633
fixup! Separate Build Changes
Nov 26, 2024
2fc7d03
Clean up
Nov 26, 2024
747f355
fixup! Clean up
Nov 26, 2024
6c94cab
fixup! Clean up
Nov 27, 2024
5582878
fixup! Clean up
Nov 27, 2024
11403aa
fixup! Clean up
Nov 27, 2024
9f8fe7b
fixup! Clean up
Nov 27, 2024
dde76fb
fixup! Clean up
Nov 27, 2024
4d5934a
fixup! Clean up
Nov 27, 2024
30bba20
fixup! Clean up
Nov 27, 2024
2d3dcb1
fixup! Clean up
Nov 27, 2024
285dd01
fixup! Clean up
Nov 27, 2024
f755ca4
fixup! Clean up
Nov 27, 2024
7c58546
fixup! Clean up
Nov 27, 2024
4229532
fixup! Clean up
Nov 28, 2024
e5d22f0
fixup! Clean up
Nov 30, 2024
e67819b
fixup! Clean up
Nov 30, 2024
30b5e08
fixup! Clean up
Nov 30, 2024
cabc479
fixup! Clean up
Nov 30, 2024
e346cd0
fixup! Clean up
Nov 30, 2024
8d2af25
fixup! Clean up
Dec 2, 2024
f4adfa4
Add Platform Defs
Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .config/.gdnsuppress

This file was deleted.

4 changes: 0 additions & 4 deletions .config/credScanSuppressions.json

This file was deleted.

9 changes: 9 additions & 0 deletions .config/credscan/credScanSuppressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tool": "Credential Scanner",
"suppressions": [
{
"file": "keyvault/testdata/dummy.pem",
"_justification": "Fake credentials for testing"
}
]
}
24 changes: 24 additions & 0 deletions .config/guardian/.gdnsuppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "latest",
"suppressionSets": {
"default": {
"name": "default",
"createdDate": "2024-11-21 01:58:07Z",
"lastUpdatedDate": "2024-11-21 01:58:07Z"
}
},
"results": {
"9a675be4784d448ece481deb7f6f1429fd6606a08b9598f33f23c2123c581520": {
"signature": "9a675be4784d448ece481deb7f6f1429fd6606a08b9598f33f23c2123c581520",
"alternativeSignatures": [],
"target": "keyvault/testdata/dummy.pem",
"line": 1,
"memberOf": [
"default"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0020",
"createdDate": "2024-11-21 01:58:07Z"
}
}
}
28 changes: 0 additions & 28 deletions .pipelines/OneBranch.NonOfficial.CrossPlat.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions .pipelines/OneBranch.Official.CrossPlat.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .pipelines/cni/k8s-e2e/k8s-e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ parameters:

jobs:
- job: CNI_${{ parameters.os }}
condition: and( not(canceled()), not(failed()) )
displayName: CNI k8s E2E ${{ parameters.os }}
dependsOn: ${{ parameters.dependsOn }}
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
os: linux
steps:
- task: AzureCLI@2
inputs:
Expand Down
42 changes: 11 additions & 31 deletions .pipelines/cni/k8s-e2e/k8s-e2e.jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,17 @@ parameters:

jobs:
- job: CNI_${{ parameters.os }}
condition: and( not(canceled()), not(failed()) )
displayName: CNI k8s E2E ${{ parameters.os }}
dependsOn: ${{ parameters.dependsOn }}
pool:
isCustom: true
type: linux
name: $(BUILD_POOL_NAME_DEFAULT)
variables:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/output
ob_git_checkout: true
os: linux
steps:
- checkout: ACNReviewChanges
clean: true

- task: AzureCLI@2
inputs:
azureSubscription: ${{ parameters.sub }}
scriptLocation: "inlineScript"
scriptType: "bash"
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
Expand All @@ -42,9 +33,8 @@ jobs:
# https://github.com/kubernetes/sig-release/blob/master/release-engineering/artifacts.md#content-of-kubernetes-test-system-archtargz-on-example-of-kubernetes-test-linux-amd64targz-directories-removed-from-list
# explictly unzip and strip directories from ginkgo and e2e.test
tar -xvzf kubernetes-test-linux-amd64.tar.gz --strip-components=3 kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
displayName: "Setup Environment"
retryCountOnTaskFailure: 5

displayName: "Setup Environment"
- ${{ if contains(parameters.os, 'windows') }}:
- script: |
set -e
Expand All @@ -57,13 +47,11 @@ jobs:
kubectl exec -i -n kube-system $pod -- powershell "Restart-Service kubeproxy"
kubectl exec -i -n kube-system $pod -- powershell "Get-Service kubeproxy"
done
workingDirectory: $(ACN_DIR)
name: kubeproxy
displayName: Restart Kubeproxy on Windows nodes
retryCountOnTaskFailure: 3

- ${{ if eq(parameters.datapath, true) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Datapath
name: datapath
Expand All @@ -72,9 +60,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 10

- ${{ if eq(parameters.dns, true) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DNS
name: dns
Expand All @@ -83,9 +70,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if eq(parameters.portforward, true) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Kubectl Portforward
name: portforward
Expand All @@ -94,9 +80,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cni') ) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Service Conformance
name: service
Expand All @@ -105,9 +90,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if and( eq(parameters.service, true), contains(parameters.cni, 'cilium') ) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Service Conformance|Cilium
name: service
Expand All @@ -116,9 +100,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if eq(parameters.hostport, true) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Host Port
name: hostport
Expand All @@ -127,9 +110,8 @@ jobs:
os: ${{ parameters.os }}
processes: 1 # Has a short serial test
attempts: 3

- ${{ if and(eq(parameters.hybridWin, true), eq(parameters.os, 'windows')) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: Hybrid Network
name: hybrid
Expand All @@ -138,9 +120,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if and( eq(parameters.dualstack, true), eq(contains(parameters.cni, 'cilium'), false) ) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DualStack Test
name: DualStack
Expand All @@ -150,9 +131,8 @@ jobs:
os: ${{ parameters.os }}
processes: 8
attempts: 3

- ${{ if and( eq(parameters.dualstack, true), contains(parameters.cni, 'cilium') ) }}:
- template: k8s-e2e.steps.yaml@ACNTools
- template: ../k8s-e2e/k8s-e2e-step-template.yaml
parameters:
testName: DualStack Test|Cilium
name: DualStack
Expand Down
96 changes: 96 additions & 0 deletions .pipelines/containers/build-variables-template.steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
parameters:
- name: targetOs
type: string
values:
- linux
- windows

- name: targetArch
type: string
values:
- amd64
- arm64

- name: image
type: string
values:
- azure-ipam
- cni
- cns
- ipv6-hp-bpf
- npm


steps:

#- ${{ if eq(parameters.targetOs, 'linux') }}:
- bash: |
set -e

VAR_ID="${IMAGE}_${OS}_${ARCH}"

BUILD_CONTEXT=$(make "$MAKE_BUILD_CONTEXT")
echo >&2 "##vso[task.setvariable variable=BUILD_CONTEXT_${VAR_ID};]$BUILD_CONTEXT"

IMAGE_PLATFORM_TAG=$(make "$MAKE_IMAGE_TAG")
echo >&2 "##vso[task.setvariable variable=IMAGE_PLATFORM_TAG_${VAR_ID};]$IMAGE_PLATFORM_TAG"

IMAGE_NAME_AND_TAG=$(make "$MAKE_IMAGE_NAME_AND_TAG")
echo >&2 "##vso[task.setvariable variable=IMAGE_NAME_AND_TAG_${VAR_ID};]$IMAGE_NAME_AND_TAG"

DOCKERFILE_PATH=$(make "$MAKE_DOCKERFILE_PATH")
echo >&2 "##vso[task.setvariable variable=DOCKERFILE_PATH_${VAR_ID};]$DOCKERFILE_PATH"

EXTRA_BUILD_ARGS=$(make "$MAKE_EXTRA_BUILD_ARGS")
echo >&2 "##vso[task.setvariable variable=EXTRA_BUILD_ARGS_${VAR_ID};]$EXTRA_BUILD_ARGS"
displayName: "Get Image Build Data"
env:
IMAGE: ${{ parameters.image }}
OS: ${{ parameters.targetOs }}
ARCH: ${{ parameters.targetArch }}
PLATFORM: ${{ parameters.targetOs }}/${{ parameters.targetArch }}
MAKE_IMAGE_TAG: ${{ parameters.image }}-image-tag
MAKE_BUILD_CONTEXT: ${{ parameters.image }}-image-build-context
MAKE_IMAGE_NAME_AND_TAG: ${{ parameters.image }}-image-name-and-tag
MAKE_DOCKERFILE_PATH: ${{ parameters.image }}-dockerfile-path
MAKE_EXTRA_BUILD_ARGS: ${{ parameters.image }}-docker-build-args

#- ${{ elseif eq(parameters.targetOs, 'windows') }}:
# - task: UsePythonVersion@0
# inputs:
# versionSpec: '3.x' # string. Required. Version spec. Default: 3.x.
# addToPath: true # boolean. Add to PATH. Default: true.
# architecture: 'x64'
#
# - pwsh: |
# $VAR_ID = '{0}_{1}_{2}' -f $env:IMAGE, $env:OS, $env:ARCH
#
# $BUILD_CONTEXT = (make "$env:MAKE_BUILD_CONTEXT")
# Write-Host "##vso[task.setvariable variable=BUILD_CONTEXT_$VAR_ID;]$BUILD_CONTEXT"
#
# $IMAGE_PLATFORM_TAG = (make "$env:MAKE_IMAGE_TAG")
# Write-Host "##vso[task.setvariable variable=IMAGE_PLATFORM_TAG_$VAR_ID;]$IMAGE_PLATFORM_TAG"
#
# $IMAGE_NAME_AND_TAG = (make "$env:MAKE_IMAGE_NAME_AND_TAG")
# Write-Host "##vso[task.setvariable variable=IMAGE_NAME_AND_TAG_$VAR_ID;]$IMAGE_NAME_AND_TAG"
#
# $DOCKERFILE_PATH = (make "$env:MAKE_DOCKERFILE_PATH")
# Write-Host "##vso[task.setvariable variable=DOCKERFILE_PATH_$VAR_ID;]$DOCKERFILE_PATH"
#
# $EXTRA_BUILD_ARGS = (make "$env:MAKE_EXTRA_BUILD_ARGS")
# Write-Host "##vso[task.setvariable variable=EXTRA_BUILD_ARGS_$VAR_ID;]$EXTRA_BUILD_ARGS"
# displayName: "Get Image Build Data"
# errorActionPreference: stop
# env:
# CONTAINER_BUILDER: docker
# CONTAINER_RUNTIME: docker
# CONTAINER_TRANSPORT: docker
# IMAGE: ${{ parameters.image }}
# OS: ${{ parameters.targetOs }}
# ARCH: ${{ parameters.targetArch }}
# PLATFORM: ${{ parameters.targetOs }}/${{ parameters.targetArch }}
# MAKE_IMAGE_TAG: ${{ parameters.image }}-image-tag
# MAKE_BUILD_CONTEXT: ${{ parameters.image }}-image-build-context
# MAKE_IMAGE_NAME_AND_TAG: ${{ parameters.image }}-image-name-and-tag
# MAKE_DOCKERFILE_PATH: ${{ parameters.image }}-dockerfile-path
# MAKE_EXTRA_BUILD_ARGS: ${{ parameters.image }}-docker-build-args
Loading
Loading