Skip to content

Commit 8a5c974

Browse files
committed
Update Variables to Generated Values
1 parent ac83015 commit 8a5c974

32 files changed

+194
-212
lines changed

.pipelines/build/binaries.jobs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
type: linux
1414
${{ if eq(job_data.job, 'linux_arm64') }}:
1515
hostArchitecture: arm64
16+
1617
variables:
1718
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/out
1819
ob_artifactSuffix: _$(artifact)
1920
ob_git_checkout: false
21+
REPO_ROOT: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }}
2022
${{ if eq(job_data.job, 'linux_amd64') }}:
21-
LinuxContainerImage: $(LinuxContainerImage2)
23+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
2224
ARCH: amd64
2325
OS: linux
2426
${{ elseif eq(job_data.job, 'windows_amd64') }}:
25-
LinuxContainerImage: $(LinuxContainerImage2)
26-
ob_enable_qemu: true
27+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
2728
ARCH: amd64
2829
OS: windows
2930
${{ elseif eq(job_data.job, 'linux_arm64') }}:
30-
LinuxContainerImage: $(LinuxContainerImage3)
3131
ob_enable_qemu: true
3232
ARCH: arm64
3333
OS: linux

.pipelines/build/binary.steps.yaml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,35 @@ steps:
1515
version: '$(GOVERSION)'
1616

1717
- bash: |
18-
sudo apt-get update -y
19-
if [[ $GOARCH =~ amd64 ]]; then
20-
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-multilib
21-
for dir in /usr/include/x86_64-linux-gnu/*; do
22-
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
23-
done
24-
25-
elif [[ $GOARCH =~ arm64 ]]; then
26-
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-aarch64-linux-gnu
18+
if [[ -f /etc/debian_version ]];then
19+
# Ubuntu
20+
sudo apt-get update -y
21+
if [[ $GOARCH =~ amd64 ]]; then
22+
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-multilib
23+
for dir in /usr/include/x86_64-linux-gnu/*; do
24+
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
25+
done
26+
27+
elif [[ $GOARCH =~ arm64 ]]; then
28+
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-aarch64-linux-gnu
29+
for dir in /usr/include/aarch64-linux-gnu/*; do
30+
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
31+
done
32+
fi
33+
else
34+
# Mariner
35+
sudo tdnf install -y llvm clang libbpf-devel nftables
2736
for dir in /usr/include/aarch64-linux-gnu/*; do
28-
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
37+
if [[ -d $dir ]]; then
38+
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
39+
elif [[ -f "$dir" ]]; then
40+
sudo ln -Tsfn "$dir" /usr/include/$(basename "$dir")
41+
fi
2942
done
3043
fi
3144
displayName: "Install Binary Pre-Reqs"
3245
workingDirectory: $(ACN_DIR)
46+
continueOnError: true
3347
env:
3448
TARGET: ${{ parameters.target }}
3549
GOOS: ${{ parameters.os }}
@@ -41,6 +55,7 @@ steps:
4155
displayName: "Build Binary - ${{ parameters.target }}"
4256
workingDirectory: $(ACN_DIR)
4357
env:
58+
REPO_ROOT: $(ACN_DIR)
4459
TARGET: ${{ parameters.target }}
4560
GOOS: ${{ parameters.os }}
4661
GOARCH: ${{ parameters.arch }}

.pipelines/build/generate-manifest.steps.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ steps:
1111
jq -r '.[] |
1212
.args = [ (.platform | split("/")[0]), (.platform | split("/")[1]) ] |
1313
.args = [ ("--os " + .args[0] ), ("--arch " + .args[1] ) ] |
14+
if .osVersion then .args += ["--os-version " + .osVersion] else . end |
1415
{ image: .imageReference, annotate: .args }' | \
1516
jq -rcs)
1617
echo >&2 "##vso[task.setvariable variable=MANIFEST_JSON;isOutput=true]$MANIFEST_DATA"

.pipelines/build/manifests.jobs.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ jobs:
2424
pool:
2525
type: docker
2626
os: linux
27-
vmImage: $(LinuxContainerImage)
2827
variables:
29-
LinuxContainerImage: $(LinuxContainerImage)
28+
LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0'
3029
ob_outputDirectory: $(Build.SourcesDirectory)/out
3130
ob_git_checkout: false
3231

.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ stages:
6464
- publish
6565
- setup
6666
displayName: "Cilium Test - ${{ parameters.name }}"
67+
variables:
68+
IMAGE_REPO_PATH: 'artifact/dd590928-4e04-48cb-9d3d-ee06c5f0e17f/buddy'
69+
AZURE_IPAM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpamVersion'] ]
70+
IPV6_HP_BPF_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
71+
CNI_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
72+
CNS_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
73+
CNS_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/cns
74+
CNI_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/cni
75+
IPV6_HP_BPF_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/ipv6-hp-bpf
6776
jobs:
6877
- ${{if eq(parameters.hubbleEnabled, false)}}:
6978
- job: deploy_cilium_components
@@ -102,14 +111,17 @@ stages:
102111
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-config/cilium-config.yaml
103112
fi
104113
114+
[[ -z $IPV6_HP_BPF_VERSION ]] && IPV6_HP_BPF_VERSION=$(make ipv6-hp-bpf-version)
115+
[[ -z $IPV6_HP_BPF_IMAGE_NAME_OVERRIDE ]] && IPV6_HP_BPF_IMAGE_NAME_OVERRIDE=ipv6-hp-bpf
116+
[[ -z $IPV6_IMAGE_REGISTRY ]] && IPV6_IMAGE_REGISTRY=acnpublic.azurecr.io
117+
105118
# Passes Cilium image to daemonset and deployment
106119
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-agent/files
107120
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-operator/files
108121
109122
if [ ! -z ${{ parameters.dualstackVersion }} ]; then
110123
echo "Use dualstack daemonset for Cilium"
111-
export IPV6_HP_BPF_VERSION=$(make ipv6-hp-bpf-version)
112-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY},${IPV6_HP_BPF_VERSION}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset-dualstack.yaml | kubectl apply -f -
124+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY},${IPV6_IMAGE_REGISTRY},${IPV6_HP_BPF_IMAGE_NAME_OVERRIDE},${IPV6_HP_BPF_VERSION}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset-dualstack.yaml | kubectl apply -f -
113125
else
114126
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset.yaml | kubectl apply -f -
115127
fi

.pipelines/cni/cilium/cilium-scale-test.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ stages:
3030
kubectl get po -owide -A
3131
- stage: update_daemonset_versions
3232
displayName: "Update Cilium + CNS Version and Restart Nodes"
33+
dependsOn:
34+
- setup
35+
variables:
36+
IMAGE_REPO_PATH: 'artifact/dd590928-4e04-48cb-9d3d-ee06c5f0e17f/buddy'
37+
AZURE_IPAM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpamVersion'] ]
38+
IPV6_HP_BPF_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
39+
CNI_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
40+
CNS_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
41+
IPAM_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/azure-ipam
42+
CNS_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/cns
43+
CNI_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/cni
44+
IPV6_HP_BPF_IMAGE_NAME_OVERRIDE: $(IMAGE_REPO_PATH)/ipv6-hp-bpf
3345
jobs:
3446
- job: update_version
3547
pool:
@@ -64,9 +76,12 @@ stages:
6476
6577
export CILIUM_VERSION_TAG=${CILIUM_VERSION_TAG}
6678
export CILIUM_IMAGE_REGISTRY=${CILIUM_IMAGE_REGISTRY}
79+
[[ -z $IPV6_HP_BPF_VERSION ]] && IPV6_HP_BPF_VERSION=$(make ipv6-hp-bpf-version)
80+
[[ -z $IPV6_HP_BPF_IMAGE_NAME_OVERRIDE ]] && IPV6_HP_BPF_IMAGE_NAME_OVERRIDE=ipv6-hp-bpf
81+
[[ -z $IPV6_IMAGE_REGISTRY ]] && IPV6_IMAGE_REGISTRY=acnpublic.azurecr.io
6782
if ${IS_DUALSTACK}; then
6883
echo "Use dualstack daemonset for Cilium"
69-
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY},${IPV6_HP_BPF_VERSION}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset-dualstack.yaml | kubectl apply -f -
84+
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY},${IPV6_IMAGE_REGISTRY},${IPV6_HP_BPF_IMAGE_NAME_OVERRIDE},${IPV6_HP_BPF_VERSION}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset-dualstack.yaml | kubectl apply -f -
7085
else
7186
envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-agent/templates/daemonset.yaml | kubectl apply -f -
7287
fi
@@ -75,7 +90,7 @@ stages:
7590
kubectl get po -owide -A
7691
7792
echo "Deploy Azure-CNS"
78-
sudo -E env "PATH=$PATH" make test-load AZURE_IPAM_VERSION=v$(AZURE_IPAM_VERSION) CNS_ONLY=true CNS_VERSION=v$(CNS_VERSION) INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO)
93+
sudo -E env "PATH=$PATH" make test-load AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) CNS_ONLY=true CNI_VERSION=$(CNI_VERSION) CNS_VERSION=$(CNS_VERSION) INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_NAME_OVERRIDE=$(IPAM_IMAGE_NAME_OVERRIDE) CNS_IMAGE_NAME_OVERRIDE=$(CNS_IMAGE_NAME_OVERRIDE) CNI_IMAGE_NAME_OVERRIDE=$(CNI_IMAGE_NAME_OVERRIDE)
7994
kubectl get po -owide -A
8095
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=10m || {
8196
echo "Not all pods ready"

.pipelines/run-pipeline.yaml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ stages:
115115
os: linux
116116
type: docker
117117
variables:
118-
ob_outputDirectory: $(Build.SourcesDirectory)/out
119-
ob_artifactSuffix: _$(name)_linux_amd64
118+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
119+
ob_outputDirectory: $(Build.SourcesDirectory)/out/images/$(os)_$(arch)
120+
ob_artifactSuffix: _$(name)
120121

121122
ARCH: amd64
122123
OS: linux
@@ -175,8 +176,9 @@ stages:
175176
os: linux
176177
type: docker
177178
variables:
178-
ob_outputDirectory: $(Build.SourcesDirectory)/out
179-
ob_artifactSuffix: _$(name)_windows_amd64
179+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
180+
ob_outputDirectory: $(Build.SourcesDirectory)/out/images/$(os)_$(arch)
181+
ob_artifactSuffix: _$(name)
180182
ob_enable_qemu: true
181183

182184
ARCH: amd64
@@ -193,28 +195,24 @@ stages:
193195
imageTag: $(Build.BuildNumber)
194196
cni:
195197
name: cni
196-
osVersion: ltsc2022
197198
dockerfilePath: $(ACN_DIR)/cni
198199
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
199200
archiveName: azure-cni
200201
archiveVersion: $(CNI_VERSION)
201202
imageTag: $(Build.BuildNumber)
202203
cns:
203204
name: cns
204-
osVersion: ltsc2022
205205
dockerfilePath: $(ACN_DIR)/cns
206206
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
207207
archiveName: azure-cns
208208
archiveVersion: $(CNS_VERSION)
209209
imageTag: $(Build.BuildNumber)
210210
npm:
211211
name: npm
212-
osVersion: ltsc2022
213212
dockerfilePath: $(ACN_DIR)/npm-windows
214213
extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
215214
archiveName: azure-npm
216215
archiveVersion: $(NPM_VERSION)
217-
# Note: Double check, I didn't notice a windows platform tag for npm in the Makefile
218216
imageTag: $(Build.BuildNumber)
219217
steps:
220218
- template: build/image.steps.yaml
@@ -233,12 +231,12 @@ stages:
233231
os: linux
234232
type: docker
235233
hostArchitecture: arm64
234+
LinuxHostVersion:
235+
distribution: mariner
236+
architecture: arm64
236237
variables:
237-
# Use if Mariner does not work.
238-
# This agent has qemu enabled, so it should be ok.
239-
#LinuxContainerImage: $(LinuxContainerImage3)
240-
ob_outputDirectory: $(Build.SourcesDirectory)/out
241-
ob_artifactSuffix: _$(name)_linux_arm64
238+
ob_outputDirectory: $(Build.SourcesDirectory)/out/images/$(os)_$(arch)
239+
ob_artifactSuffix: _$(name)
242240
ob_build_container: true
243241

244242
ARCH: arm64
@@ -344,7 +342,6 @@ stages:
344342
- platform: linux/arm64
345343
imageReference: $(IPAM_LINUX_ARM64_REF)
346344
- platform: windows/amd64
347-
osVersion: ltsc2022
348345
imageReference: $(IPAM_WINDOWS_AMD64_REF)
349346
- job: cni
350347
templateContext:
@@ -356,7 +353,6 @@ stages:
356353
- platform: linux/arm64
357354
imageReference: $(CNI_LINUX_ARM64_REF)
358355
- platform: windows/amd64
359-
osVersion: ltsc2022
360356
imageReference: $(CNI_WINDOWS_AMD64_REF)
361357
- job: cns
362358
templateContext:
@@ -368,7 +364,6 @@ stages:
368364
- platform: linux/arm64
369365
imageReference: $(CNS_LINUX_ARM64_REF)
370366
- platform: windows/amd64
371-
osVersion: ltsc2022
372367
imageReference: $(CNS_WINDOWS_AMD64_REF)
373368
- job: ipv6_hp_bpf
374369
templateContext:
@@ -389,7 +384,6 @@ stages:
389384
- platform: linux/arm64
390385
imageReference: $(NPM_LINUX_ARM64_REF)
391386
- platform: windows/amd64
392-
osVersion: ltsc2022
393387
imageReference: $(NPM_WINDOWS_AMD64_REF)
394388

395389

.pipelines/singletenancy/aks-swift/aks-swift-e2e.steps.yaml

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)