Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6d105e2
Edit Pipeline Trigger
sheylatrudo Mar 24, 2025
ac83015
ci: E2E work
jpayne3506 Apr 23, 2025
8a5c974
Update Variables to Generated Values
sheylatrudo Apr 25, 2025
508cf9f
fixup! Update Variables to Generated Values
sheylatrudo May 2, 2025
995279b
Use New Pipeline Files
sheylatrudo May 2, 2025
bbb314b
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
cc2addc
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
e97f24f
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
a74406f
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
d6c36a1
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
25fce7e
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
98c4a94
Update Dockerfiles
sheylatrudo May 2, 2025
5b1a259
Update Dockerfiles
sheylatrudo May 2, 2025
a7731cd
fixup! Update Dockerfiles
sheylatrudo May 2, 2025
d7fcbb5
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
ffa7d8c
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
0e1bb56
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
82ac0a8
Update .pipelines/build/utils/rename-dockerfile-references.steps.yaml
sheylatrudo May 2, 2025
ce44092
Update .pipelines/build/utils/rename-dockerfile-references.steps.yaml
sheylatrudo May 2, 2025
5f79709
Update .pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2…
sheylatrudo May 2, 2025
0814e34
Address PR Comments
sheylatrudo May 2, 2025
baf4381
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
4b971a2
fixup! Use New Pipeline Files
sheylatrudo May 2, 2025
421592f
fixup! Address PR Comments
sheylatrudo May 2, 2025
37a07b8
fixup! Address PR Comments
sheylatrudo May 2, 2025
58d8cfb
fixup! Address PR Comments
sheylatrudo May 2, 2025
da0acf8
Remove Dockerfile Changes for Testing
sheylatrudo May 2, 2025
d64d95c
fixup! Remove Dockerfile Changes for Testing
sheylatrudo May 5, 2025
5f8a212
Update .pipelines/singletenancy/cilium-dualstack-overlay/cilium-duals…
jpayne3506 May 5, 2025
5673fbb
Update .pipelines/singletenancy/cilium-nodesubnet/cilium-nodesubnet-e…
jpayne3506 May 5, 2025
d66ab28
Update .pipelines/singletenancy/cilium-overlay-withhubble/cilium-over…
jpayne3506 May 5, 2025
f3e6729
Update .pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.ste…
jpayne3506 May 5, 2025
420a9f4
fixup! Address PR Comments
sheylatrudo May 5, 2025
6085893
fixup! Address PR Comments
sheylatrudo May 6, 2025
7d825d9
fixup! Address PR Comments
sheylatrudo May 6, 2025
5239483
Add IPV6_IMAGE_REPO_PATH to Tests
sheylatrudo May 6, 2025
2ee76f8
Update .pipelines/cni/cilium/cilium-scale-test.yaml
sheylatrudo May 7, 2025
File filter

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.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ipam-*.xml

# Environment
.vscode/*
**/*.sw?

# Coverage
*.out
Expand Down
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.

45 changes: 45 additions & 0 deletions .pipelines/build/binaries.jobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
parameters:
- name: binaries
type: jobList


jobs:
- ${{ each job_data in parameters.binaries }}:
- ${{ if eq(job_data.templateContext.action, 'build') }}:
- job: binaries_${{ job_data.job }}
displayName: "Build Binary - ${{ job_data.displayName }} -"
strategy: ${{ job_data.strategy }}
pool:
type: linux
${{ if eq(job_data.job, 'linux_arm64') }}:
hostArchitecture: arm64

variables:
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/out
ob_artifactSuffix: _$(artifact)
ob_git_checkout: false
REPO_ROOT: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }}
${{ if eq(job_data.job, 'linux_amd64') }}:
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
ARCH: amd64
OS: linux
${{ elseif eq(job_data.job, 'windows_amd64') }}:
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
ARCH: amd64
OS: windows
${{ elseif eq(job_data.job, 'linux_arm64') }}:
ob_enable_qemu: true
ARCH: arm64
OS: linux

steps:
- task: DownloadPipelineArtifact@2
inputs:
targetPath: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }}
artifact: '${{ job_data.templateContext.repositoryArtifact }}'

- template: binary.steps.yaml
parameters:
target: $(name)
os: $(OS)
arch: $(ARCH)
72 changes: 72 additions & 0 deletions .pipelines/build/binary.steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
parameters:
- name: target
type: string

- name: os
type: string

- name: arch
type: string


steps:
- task: GoTool@0
inputs:
version: '$(GOVERSION)'

- bash: |
# Ubuntu
if [[ -f /etc/debian_version ]];then
sudo apt-get update -y
if [[ $GOARCH =~ amd64 ]]; then
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-multilib tree
for dir in /usr/include/x86_64-linux-gnu/*; do
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
done

elif [[ $GOARCH =~ arm64 ]]; then
sudo apt-get install -y llvm clang linux-libc-dev linux-headers-generic libbpf-dev libc6-dev nftables iproute2 gcc-aarch64-linux-gnu tree
for dir in /usr/include/aarch64-linux-gnu/*; do
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
done
fi
# Mariner
else
sudo tdnf install -y llvm clang libbpf-devel nftables tree
for dir in /usr/include/aarch64-linux-gnu/*; do
if [[ -d $dir ]]; then
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
elif [[ -f "$dir" ]]; then
sudo ln -Tsfn "$dir" /usr/include/$(basename "$dir")
fi
done
fi
displayName: "Install Binary Pre-Reqs"
workingDirectory: $(ACN_DIR)
continueOnError: true
env:
GOOS: ${{ parameters.os }}
GOARCH: ${{ parameters.arch }}

- bash: |
make "$TARGET"
displayName: "Build Binary - ${{ parameters.target }}"
workingDirectory: $(ACN_DIR)
env:
REPO_ROOT: $(ACN_DIR)
TARGET: ${{ parameters.target }}
GOOS: ${{ parameters.os }}
GOARCH: ${{ parameters.arch }}

- script: |
SOURCE_DIR="./output"
TARGET_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"/out
tree "$SOURCE_DIR"

mkdir -p "$TARGET_DIR"
find "$SOURCE_DIR" -name '*.tgz*' -print -exec mv -t "$TARGET_DIR"/ {} +
find "$SOURCE_DIR" -name '*.zip' -print -exec mv -t "$TARGET_DIR"/ {} +

tree "$TARGET_DIR"
displayName: "Prepare Artifacts"
workingDirectory: $(ACN_DIR)
23 changes: 23 additions & 0 deletions .pipelines/build/generate-manifest.steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
parameters:
- name: platforms
type: object
default: []


steps:
- bash: |
set -e
MANIFEST_DATA=$(echo "$IMAGE_PLATFORM_DATA" | \
jq -r '.[] |
.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 }' | \
jq -rcs)
echo >&2 "##vso[task.setvariable variable=MANIFEST_JSON;isOutput=true]$MANIFEST_DATA"
echo "$MANIFEST_DATA" | jq -r .
displayName: "Populate Image Manifest Data"
name: data
env:
IMAGE_PLATFORM_DATA: '${{ convertToJson(parameters.platforms) }}'

89 changes: 89 additions & 0 deletions .pipelines/build/image.steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
parameters:
- name: arch
type: string
default: ""

- name: name
type: string
default: ""

- name: os
type: string
default: ""

- name: build_tag
type: string
default: ""

- name: dockerfile_path
type: string
default: ""

- name: archive_file
type: string
default: '$(name)-$(os)-$(platform)-$(Tag)'

- name: source
type: string
default: drop_setup_env_source

- name: extra_args
type: string
default: ''


- name: default_args
type: object
default:
- "--target $(os) "
- "--platform $(os)/$(arch) "

- name: common_build_args
type: object
default:
- "PLATFORM=$(os)/$(arch) "
- "ARCH=$(arch) "
- "OS=$(os) "
- "VERSION=$(Tag) "


steps:
- task: DownloadPipelineArtifact@2
inputs:
targetPath: $(Build.SourcesDirectory)/dst/${{ parameters.source }}
artifact: '${{ parameters.source }}'

- task: onebranch.pipeline.containercontrol@1
displayName: "Login to ACR"
inputs:
command: login
endpoint: $(ACR_ARM_SERVICE_CONNECTION)

# Build and push the Docker image
- task: onebranch.pipeline.imagebuildinfo@1
displayName: Image Build
retryCountOnTaskFailure: 3
timeoutInMinutes: 30
inputs:
endpoint: $(ACR_ARM_SERVICE_CONNECTION)
registry: $(ACR).azurecr.io
repositoryName: $(os)-$(arch)/${{ parameters.name }}
os: '${{ parameters.os }}'
buildkit: 1
dockerFileRelPath: ${{ parameters.dockerfile_path }}/Dockerfile
dockerFileContextPath: ${{ parameters.source }}
enable_network: true
enable_pull: true
build_tag: ${{ parameters.build_tag }}
enable_acr_push: true

saveImageToPath: images/$(os)-$(arch)/${{ parameters.archive_file }}.tar.gz
#compress: true
#saveMetadataToPath: images/$(os)-$(arch)/metadata/${{ parameters.archive_file }}-metadata.json
#enable_isolated_acr_push: true

# Docker Build Arguments
${{ if parameters.common_build_args }}:
arguments: --build-arg ${{ join('--build-arg ', parameters.common_build_args) }} ${{ parameters.extra_args }} ${{ join(' ', parameters.default_args) }}
${{ else }}:
arguments: ${{ parameters.extra_args }} ${{ join(' ', parameters.default_args) }}
38 changes: 38 additions & 0 deletions .pipelines/build/manifests.jobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
parameters:
- name: generate
type: jobList


jobs:
- ${{ each job_data in parameters.generate }}:
- job: ${{ job_data.job }}_generate_manifest
displayName: "Generate Image Manifest - ${{ job_data.job }}"
pool:
type: linux
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
ob_git_checkout: false
steps:
- template: /.pipelines/build/generate-manifest.steps.yaml
parameters:
platforms: ${{ job_data.templateContext.platforms }}

- job: ${{ job_data.job }}_publish_manifest
displayName: "Publish Image Manifest - ${{ job_data.job }}"
dependsOn:
- ${{ job_data.job }}_generate_manifest
pool:
type: docker
os: linux
variables:
LinuxContainerImage: 'mcr.microsoft.com/onebranch/azurelinux/build:3.0'
ob_outputDirectory: $(Build.SourcesDirectory)/out
ob_git_checkout: false

MANIFEST_JSON: $[ dependencies.${{ job_data.job }}_generate_manifest.outputs['data.MANIFEST_JSON'] ]
steps:
- template: /.pipelines/build/publish-manifest.steps.yaml
parameters:
image_repository: ${{ job_data.templateContext.name }}
image_tag: ${{ job_data.templateContext.image_tag }}
manifest_data: $(MANIFEST_JSON)
Loading
Loading