Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .pipelines/build/generate-manifest.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
.args = [ (.platform | split("/")[0]), (.platform | split("/")[1]) ] |
.args = [ ("--os " + .args[0] ), ("--arch " + .args[1] ) ] |
if .osVersion then .args += ["--os-version " + .osVersion] else . end |
{ image: .imageReference, annotate: .args }' | \
{ image: .imageReference, annotate: (.args | join(" ")) }' | \
jq -rcs)
echo >&2 "##vso[task.setvariable variable=MANIFEST_JSON;isOutput=true]$MANIFEST_DATA"
echo "$MANIFEST_DATA" | jq -r .
Expand Down
1 change: 1 addition & 0 deletions .pipelines/build/image.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ parameters:
default:
- "--target $(os) "
- "--platform $(os)/$(arch) "
- "--provenance false "

- name: common_build_args
type: object
Expand Down
6 changes: 2 additions & 4 deletions .pipelines/build/images.jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ jobs:
pool:
os: linux
type: docker
# ${{ if eq(job_data.job, 'linux_arm64') }}:
# hostArchitecture: arm64
${{ if eq(job_data.job, 'linux_arm64') }}:
hostArchitecture: arm64
# ${{ else }}:
# LinuxHostVersion: 'AzLinux3.0AMD64'
variables:
Expand All @@ -127,12 +127,10 @@ jobs:
OS: linux
${{ elseif eq(job_data.job, 'windows_amd64') }}:
LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0'
ob_enable_qemu: true
ARCH: amd64
OS: windows
${{ elseif eq(job_data.job, 'linux_arm64') }}:
LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0'
ob_enable_qemu: true
ARCH: arm64
OS: linux
GOARCH: arm64
Expand Down
16 changes: 8 additions & 8 deletions .pipelines/build/ob-prepare.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ steps:
# target_path: npm-windows
# source_dockerfile: windows.Dockerfile

# - template: utils/rename-dockerfile-references.steps.yaml
# parameters:
# topic: "Linux - npm"
# replace_references: true
# working_directory: $(ACN_DIR)
# source_path: npm
# target_path: npm
# source_dockerfile: linux.Dockerfile
- template: utils/rename-dockerfile-references.steps.yaml
parameters:
topic: "Linux - npm"
replace_references: true
working_directory: $(ACN_DIR)
source_path: npm
target_path: npm
source_dockerfile: linux.Dockerfile

- bash: |
rm -rf .hooks .github
Expand Down
314 changes: 157 additions & 157 deletions .pipelines/run-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,154 +20,154 @@ stages:

- template: templates/run-unit-tests.stages.yaml


- ${{ if not(contains(variables['Build.SourceBranch'], 'refs/pull')) }}:
- stage: build
displayName: "Build Project"
dependsOn:
- setup
- unittest
variables:
ACN_DIR: drop_setup_env_source
ACN_PACKAGE_PATH: github.com/Azure/azure-container-networking
CNI_AI_PATH: $(ACN_PACKAGE_PATH)/telemetry.aiMetadata
CNS_AI_PATH: $(ACN_PACKAGE_PATH)/cns/logger.aiMetadata
NPM_AI_PATH: $(ACN_PACKAGE_PATH)/npm.aiMetadata

STORAGE_ID: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
TAG: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]

IMAGE_REPO_PATH: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.imageRepositoryPath'] ]
AZURE_IPAM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpamVersion'] ]
CNI_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
CNS_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
IPV6_HP_BPF_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
NPM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ]
jobs:
- template: /.pipelines/build/images.jobs.yaml
parameters:
images:
- job: linux_amd64
displayName: "Linux/AMD64"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 5
matrix:
azure_ipam:
name: azure-ipam
extraArgs: ''
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
ipv6_hp_bpf:
name: ipv6-hp-bpf
extraArgs: "--build-arg DEBUG=$(System.Debug)"
archiveName: ipv6-hp-bpf
archiveVersion: $(IPV6_HP_BPF_VERSION)
imageTag: $(Build.BuildNumber)
# npm:
# name: npm
# extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
# archiveName: azure-npm
# archiveVersion: $(NPM_VERSION)
# imageTag: $(Build.BuildNumber)

- job: windows_amd64
displayName: "Windows"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 5
matrix:
azure_ipam:
name: azure-ipam
extraArgs: ''
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
# npm:
# name: npm
# extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
# archiveName: azure-npm
# archiveVersion: $(NPM_VERSION)
# imageTag: $(Build.BuildNumber)

- job: linux_arm64
displayName: "Linux/ARM64"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 3
matrix:
azure_ipam:
name: azure-ipam
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
extraArgs: ''
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
ipv6_hp_bpf:
name: ipv6-hp-bpf
extraArgs: "--build-arg DEBUG=$(System.Debug)"
archiveName: ipv6-hp-bpf
archiveVersion: $(IPV6_HP_BPF_VERSION)
imageTag: $(Build.BuildNumber)
# npm:
# name: npm
# extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
# archiveName: azure-npm
# archiveVersion: $(NPM_VERSION)
# imageTag: $(Build.BuildNumber)
- stage: build
displayName: "Build Project"
dependsOn:
- setup
- unittest
variables:
ACN_DIR: drop_setup_env_source
ACN_PACKAGE_PATH: github.com/Azure/azure-container-networking
CNI_AI_PATH: $(ACN_PACKAGE_PATH)/telemetry.aiMetadata
CNS_AI_PATH: $(ACN_PACKAGE_PATH)/cns/logger.aiMetadata
NPM_AI_PATH: $(ACN_PACKAGE_PATH)/npm.aiMetadata

STORAGE_ID: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.StorageID'] ]
TAG: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]

IMAGE_REPO_PATH: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.imageRepositoryPath'] ]
AZURE_IPAM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.azureIpamVersion'] ]
CNI_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cniVersion'] ]
CNS_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.cnsVersion'] ]
IPV6_HP_BPF_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.ipv6HpBpfVersion'] ]
NPM_VERSION: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.npmVersion'] ]
jobs:
- template: /.pipelines/build/images.jobs.yaml
parameters:
images:
- job: linux_amd64
displayName: "Linux/AMD64"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 5
matrix:
azure_ipam:
name: azure-ipam
extraArgs: ''
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
ipv6_hp_bpf:
name: ipv6-hp-bpf
extraArgs: "--build-arg DEBUG=$(System.Debug)"
archiveName: ipv6-hp-bpf
archiveVersion: $(IPV6_HP_BPF_VERSION)
imageTag: $(Build.BuildNumber)
npm:
name: npm
extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
archiveName: azure-npm
archiveVersion: $(NPM_VERSION)
imageTag: $(Build.BuildNumber)

- job: windows_amd64
displayName: "Windows"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 5
matrix:
azure_ipam:
name: azure-ipam
extraArgs: ''
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
# We do not build NPM for Windows 1.6+
# npm:
# name: npm
# extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
# archiveName: azure-npm
# archiveVersion: $(NPM_VERSION)
# imageTag: $(Build.BuildNumber)

- job: linux_arm64
displayName: "Linux/ARM64"
templateContext:
repositoryArtifact: drop_setup_env_source
buildScript: .pipelines/build/scripts/$(name).sh
obDockerfile: .pipelines/build/dockerfiles/$(name).Dockerfile
strategy:
maxParallel: 3
matrix:
azure_ipam:
name: azure-ipam
archiveName: azure-ipam
archiveVersion: $(AZURE_IPAM_VERSION)
extraArgs: ''
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cni:
name: cni
extraArgs: '--build-arg CNI_AI_PATH=$(CNI_AI_PATH) --build-arg CNI_AI_ID=$(CNI_AI_ID)'
archiveName: azure-cni
archiveVersion: $(CNI_VERSION)
imageTag: $(Build.BuildNumber)
packageWithDropGZ: True
cns:
name: cns
extraArgs: '--build-arg CNS_AI_PATH=$(CNS_AI_PATH) --build-arg CNS_AI_ID=$(CNS_AI_ID)'
archiveName: azure-cns
archiveVersion: $(CNS_VERSION)
imageTag: $(Build.BuildNumber)
ipv6_hp_bpf:
name: ipv6-hp-bpf
extraArgs: "--build-arg DEBUG=$(System.Debug)"
archiveName: ipv6-hp-bpf
archiveVersion: $(IPV6_HP_BPF_VERSION)
imageTag: $(Build.BuildNumber)
npm:
name: npm
extraArgs: '--build-arg NPM_AI_PATH=$(NPM_AI_PATH) --build-arg NPM_AI_ID=$(NPM_AI_ID)'
archiveName: azure-npm
archiveVersion: $(NPM_VERSION)
imageTag: $(Build.BuildNumber)


- ${{ if not(contains(variables['Build.SourceBranch'], 'refs/pull')) }}:
- stage: manifests
displayName: "Image Manifests"
dependsOn:
Expand Down Expand Up @@ -247,17 +247,17 @@ stages:
imageReference: $(IPV6_LINUX_AMD64_REF)
- platform: linux/arm64
imageReference: $(IPV6_LINUX_ARM64_REF)
# - job: npm
# templateContext:
# name: npm
# image_tag: $(NPM_VERSION)
# platforms:
# - platform: linux/amd64
# imageReference: $(NPM_LINUX_AMD64_REF)
# - platform: linux/arm64
# imageReference: $(NPM_LINUX_ARM64_REF)
# - platform: windows/amd64
# imageReference: $(NPM_WINDOWS_AMD64_REF)
- job: npm
templateContext:
name: npm
image_tag: $(NPM_VERSION)
platforms:
- platform: linux/amd64
imageReference: $(NPM_LINUX_AMD64_REF)
- platform: linux/arm64
imageReference: $(NPM_LINUX_ARM64_REF)
# - platform: windows/amd64
# imageReference: $(NPM_WINDOWS_AMD64_REF)


# Cilium Podsubnet E2E tests
Expand Down
Loading
Loading