Skip to content

Commit f7fb831

Browse files
Merge remote-tracking branch 'origin/master' into sanprabhu/cilium-nodesubnet-target-makefile
2 parents 947ac28 + 196fce9 commit f7fb831

File tree

267 files changed

+14543
-3259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+14543
-3259
lines changed

.config/.gdnsuppress

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

.config/credScanSuppressions.json

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

.github/workflows/baseimages.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Docker Base Images'
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
merge_group:
11+
types:
12+
- checks_requested
13+
14+
jobs:
15+
render:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: '1.23'
25+
- name: Render Dockerfiles
26+
run: make dockerfiles
27+
- name: Fail if base images are outdated
28+
run: |
29+
if [ -n "$(git status --porcelain)" ]; then
30+
echo "Changes detected. Please run 'make dockerfiles' locally to update the base images."
31+
exit 1
32+
fi

.github/workflows/cyclonus-netpol-extended-nightly-test.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ jobs:
2929
go-version: "^1.23"
3030

3131
- name: Setup Kind
32-
uses: engineerd/setup-kind@v0.6.2
32+
uses: helm/kind-action@v1
3333
with:
34-
version: "v0.11.1"
34+
version: "v0.22.0"
35+
kubectl_version: "v1.27.7"
3536
config: ./test/kind/kind.yaml
36-
name: npm-kind
37+
cluster_name: npm-kind
3738

3839
- name: Check Kind
3940
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ipam-*.xml
1010

1111
# Environment
1212
.vscode/*
13+
**/*.sw?
1314

1415
# Coverage
1516
*.out

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ linters-settings:
3434
disabled-checks:
3535
- "hugeParam"
3636
govet:
37-
check-shadowing: true
37+
enable:
38+
- shadow
3839
lll:
3940
line-length: 200

.pipelines/OneBranch.NonOfficial.CrossPlat.yaml

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

.pipelines/OneBranch.Official.CrossPlat.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
parameters:
2+
- name: binaries
3+
type: jobList
4+
5+
6+
jobs:
7+
- ${{ each job_data in parameters.binaries }}:
8+
- ${{ if eq(job_data.templateContext.action, 'build') }}:
9+
- job: binaries_${{ job_data.job }}
10+
displayName: "Build Binary - ${{ job_data.displayName }} -"
11+
strategy: ${{ job_data.strategy }}
12+
pool:
13+
type: linux
14+
${{ if eq(job_data.job, 'linux_arm64') }}:
15+
hostArchitecture: arm64
16+
17+
variables:
18+
ob_outputDirectory: $(Build.ArtifactStagingDirectory)/out
19+
ob_artifactSuffix: _$(artifact)
20+
ob_git_checkout: false
21+
REPO_ROOT: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }}
22+
${{ if eq(job_data.job, 'linux_amd64') }}:
23+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
24+
ARCH: amd64
25+
OS: linux
26+
${{ elseif eq(job_data.job, 'windows_amd64') }}:
27+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
28+
ARCH: amd64
29+
OS: windows
30+
${{ elseif eq(job_data.job, 'linux_arm64') }}:
31+
ob_enable_qemu: true
32+
ARCH: arm64
33+
OS: linux
34+
35+
steps:
36+
- task: DownloadPipelineArtifact@2
37+
inputs:
38+
targetPath: $(Build.SourcesDirectory)/${{ job_data.templateContext.repositoryArtifact }}
39+
artifact: '${{ job_data.templateContext.repositoryArtifact }}'
40+
41+
- template: binary.steps.yaml
42+
parameters:
43+
target: $(name)
44+
os: $(OS)
45+
arch: $(ARCH)

.pipelines/build/binary.steps.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
parameters:
2+
- name: target
3+
type: string
4+
5+
- name: os
6+
type: string
7+
8+
- name: arch
9+
type: string
10+
11+
12+
steps:
13+
- task: GoTool@0
14+
inputs:
15+
version: '$(GOVERSION)'
16+
17+
- bash: |
18+
# Ubuntu
19+
if [[ -f /etc/debian_version ]];then
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 tree
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 tree
29+
for dir in /usr/include/aarch64-linux-gnu/*; do
30+
sudo ln -sfn "$dir" /usr/include/$(basename "$dir")
31+
done
32+
fi
33+
# Mariner
34+
else
35+
sudo tdnf install -y llvm clang libbpf-devel nftables tree
36+
for dir in /usr/include/aarch64-linux-gnu/*; do
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
42+
done
43+
fi
44+
displayName: "Install Binary Pre-Reqs"
45+
workingDirectory: $(ACN_DIR)
46+
continueOnError: true
47+
env:
48+
GOOS: ${{ parameters.os }}
49+
GOARCH: ${{ parameters.arch }}
50+
51+
- bash: |
52+
make "$TARGET"
53+
displayName: "Build Binary - ${{ parameters.target }}"
54+
workingDirectory: $(ACN_DIR)
55+
env:
56+
REPO_ROOT: $(ACN_DIR)
57+
TARGET: ${{ parameters.target }}
58+
GOOS: ${{ parameters.os }}
59+
GOARCH: ${{ parameters.arch }}
60+
61+
- script: |
62+
SOURCE_DIR="./output"
63+
TARGET_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"/out
64+
tree "$SOURCE_DIR"
65+
66+
mkdir -p "$TARGET_DIR"
67+
find "$SOURCE_DIR" -name '*.tgz*' -print -exec mv -t "$TARGET_DIR"/ {} +
68+
find "$SOURCE_DIR" -name '*.zip' -print -exec mv -t "$TARGET_DIR"/ {} +
69+
70+
tree "$TARGET_DIR"
71+
displayName: "Prepare Artifacts"
72+
workingDirectory: $(ACN_DIR)

0 commit comments

Comments
 (0)