Skip to content

Commit 869eea4

Browse files
authored
Merge branch 'master' into copilot/fix-3550
Signed-off-by: Paul Johnston <[email protected]>
2 parents e11205c + 8d75d8b commit 869eea4

Some content is hidden

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

60 files changed

+1655
-518
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "daily"
8-
reviewers:
9-
- "azure/azure-sdn-members"
108
commit-message:
119
prefix: "ci"
1210
labels: [ "ci", "dependencies" ]
@@ -15,8 +13,6 @@ updates:
1513
directory: "/"
1614
schedule:
1715
interval: "daily"
18-
reviewers:
19-
- "azure/azure-sdn-members"
2016
commit-message:
2117
prefix: "ci"
2218
labels: [ "ci", "dependencies" ]
@@ -25,8 +21,6 @@ updates:
2521
directory: "/"
2622
schedule:
2723
interval: "daily"
28-
reviewers:
29-
- "azure/azure-sdn-members"
3024
commit-message:
3125
prefix: "deps"
3226
labels: [ "dependencies" ]
@@ -35,8 +29,6 @@ updates:
3529
directory: "/azure-ipam"
3630
schedule:
3731
interval: "daily"
38-
reviewers:
39-
- "azure/azure-sdn-members"
4032
commit-message:
4133
prefix: "deps"
4234
labels: [ "dependencies", "azure-ipam" ]
@@ -45,8 +37,6 @@ updates:
4537
directory: "/build/tools"
4638
schedule:
4739
interval: "daily"
48-
reviewers:
49-
- "azure/azure-sdn-members"
5040
commit-message:
5141
prefix: "deps"
5242
labels: [ "dependencies" ]
@@ -71,8 +61,6 @@ updates:
7161
directory: "/"
7262
schedule:
7363
interval: "daily"
74-
reviewers:
75-
- "azure/azure-sdn-members"
7664
commit-message:
7765
prefix: "deps"
7866
labels: [ "dependencies", "release/1.5" ]
@@ -82,8 +70,6 @@ updates:
8270
directory: "/azure-ipam"
8371
schedule:
8472
interval: "daily"
85-
reviewers:
86-
- "azure/azure-sdn-members"
8773
commit-message:
8874
prefix: "deps"
8975
labels: [ "dependencies", "azure-ipam", "release/1.5" ]
@@ -93,8 +79,6 @@ updates:
9379
directory: "/"
9480
schedule:
9581
interval: "daily"
96-
reviewers:
97-
- "azure/azure-sdn-members"
9882
commit-message:
9983
prefix: "deps"
10084
labels: [ "dependencies", "release/1.4" ]
@@ -104,8 +88,6 @@ updates:
10488
directory: "/azure-ipam"
10589
schedule:
10690
interval: "daily"
107-
reviewers:
108-
- "azure/azure-sdn-members"
10991
commit-message:
11092
prefix: "deps"
11193
labels: [ "dependencies", "azure-ipam", "release/1.4" ]

.golangci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ linters:
99
- format
1010
- performance
1111
- unused
12-
disable:
13-
- maligned
14-
- scopelint
1512
enable:
16-
- exportloopref
13+
- copyloopvar
1714
- goconst
1815
- gocritic
1916
- gocyclo

.pipelines/build/binaries.jobs.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,37 @@ jobs:
4343
target: $(name)
4444
os: $(OS)
4545
arch: $(ARCH)
46+
47+
48+
- ${{ elseif and(eq(job_data.templateContext.action, 'sign'), job_data.templateContext.isOfficial) }}:
49+
- job: sign_${{ job_data.job }}
50+
displayName: "Sign Binary - ${{ job_data.displayName }} -"
51+
strategy: ${{ job_data.strategy }}
52+
pool:
53+
${{ if eq(job_data.job, 'windows_amd64') }}:
54+
type: windows
55+
${{ else }}:
56+
type: linux
57+
variables:
58+
ob_outputDirectory: $(Build.SourcesDirectory)
59+
ob_artifactSuffix: _$(artifact)
60+
ob_git_checkout: false
61+
steps:
62+
- task: DownloadPipelineArtifact@2
63+
inputs:
64+
targetPath: $(Build.SourcesDirectory)
65+
artifact: '${{ job_data.templateContext.repositoryArtifact }}'
66+
67+
- task: ExtractFiles@1
68+
inputs:
69+
archiveFilePatterns: '**/*.?(tgz|tgz.gz|zip)'
70+
destinationFolder: $(Build.SourcesDirectory)
71+
cleanDestinationFolder: false
72+
overwriteExistingFiles: true
73+
74+
- task: onebranch.pipeline.signing@1
75+
inputs:
76+
command: 'sign'
77+
signing_profile: 'external_distribution'
78+
files_to_sign: '**/*'
79+
search_root: $(Build.SourcesDirectory)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG ARCH
2+
3+
4+
# skopeo inspect docker://mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 --format "{{.Name}}@{{.Digest}}"
5+
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b as windows
6+
ARG ARTIFACT_DIR .
7+
8+
COPY ${ARTIFACT_DIR}/bin/dropgz.exe /dropgz.exe
9+
ENTRYPOINT [ "/dropgz.exe" ]
10+
11+
12+
FROM scratch AS linux
13+
ARG ARTIFACT_DIR .
14+
15+
COPY ${ARTIFACT_DIR}/bin/dropgz /dropgz
16+
ENTRYPOINT [ "/dropgz" ]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG ARCH
2+
3+
4+
# skopeo inspect docker://mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 --format "{{.Name}}@{{.Digest}}"
5+
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b as windows
6+
ARG ARTIFACT_DIR .
7+
8+
COPY ${ARTIFACT_DIR}/bin/dropgz.exe /dropgz.exe
9+
ENTRYPOINT [ "/dropgz.exe" ]
10+
11+
12+
FROM scratch AS linux
13+
ARG ARTIFACT_DIR .
14+
15+
COPY ${ARTIFACT_DIR}/bin/dropgz /dropgz
16+
ENTRYPOINT [ "/dropgz" ]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG ARCH
2+
3+
4+
# mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
5+
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b AS windows
6+
ARG ARTIFACT_DIR .
7+
8+
COPY ${ARTIFACT_DIR}/files/kubeconfigtemplate.yaml kubeconfigtemplate.yaml
9+
COPY ${ARTIFACT_DIR}/scripts/setkubeconfigpath.ps1 setkubeconfigpath.ps1
10+
COPY ${ARTIFACT_DIR}/bin/azure-cns.exe /azure-cns.exe
11+
ENTRYPOINT ["azure-cns.exe"]
12+
EXPOSE 10090
13+
14+
15+
# mcr.microsoft.com/cbl-mariner/base/core:2.0
16+
# skopeo inspect docker://mcr.microsoft.com/cbl-mariner/base/core:2.0 --format "{{.Name}}@{{.Digest}}"
17+
FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/base/core@sha256:961bfedbbbdc0da51bc664f51d959da292eced1ad46c3bf674aba43b9be8c703 AS build-helper
18+
RUN tdnf install -y iptables
19+
20+
# mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0
21+
FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/distroless/minimal@sha256:7778a86d86947d5f64c1280a7ee0cf36c6c6d76b5749dd782fbcc14f113961bf AS linux
22+
ARG ARTIFACT_DIR .
23+
24+
COPY --from=build-helper /usr/sbin/*tables* /usr/sbin/
25+
COPY --from=build-helper /usr/lib /usr/lib
26+
COPY ${ARTIFACT_DIR}/bin/azure-cns /usr/local/bin/azure-cns
27+
ENTRYPOINT [ "/usr/local/bin/azure-cns" ]
28+
EXPOSE 10090
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ARG ARCH
2+
3+
4+
FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/distroless/minimal:3.0 AS linux
5+
ARG ARTIFACT_DIR
6+
COPY ${ARTIFACT_DIR}/lib/* /lib
7+
COPY ${ARTIFACT_DIR}/bin/ipv6-hp-bpf /ipv6-hp-bpf
8+
COPY ${ARTIFACT_DIR}/bin/nft /usr/sbin/nft
9+
COPY ${ARTIFACT_DIR}/bin/ip /sbin/ip
10+
CMD ["/ipv6-hp-bpf"]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG ARCH
2+
3+
4+
# intermediate for win-ltsc2022
5+
FROM --platform=windows/${ARCH} mcr.microsoft.com/windows/servercore@sha256:45952938708fbde6ec0b5b94de68bcdec3f8c838be018536b1e9e5bd95e6b943 as windows
6+
ARG ARTIFACT_DIR
7+
8+
COPY ${ARTIFACT_DIR}/files/kubeconfigtemplate.yaml kubeconfigtemplate.yaml
9+
COPY ${ARTIFACT_DIR}/scripts/setkubeconfigpath.ps1 setkubeconfigpath.ps1
10+
COPY ${ARTIFACT_DIR}/scripts/setkubeconfigpath-capz.ps1 setkubeconfigpath-capz.ps1
11+
COPY ${ARTIFACT_DIR}/bin/azure-npm.exe npm.exe
12+
13+
CMD ["npm.exe", "start" "--kubeconfig=.\\kubeconfig"]
14+
15+
16+
FROM --platform=linux/${ARCH} mcr.microsoft.com/mirror/docker/library/ubuntu:24.04 as linux
17+
ARG ARTIFACT_DIR
18+
19+
RUN apt-get update && apt-get install -y iptables ipset ca-certificates && apt-get autoremove -y && apt-get clean
20+
#RUN apt-get update && \
21+
# apt-get install -y \
22+
# linux-libc-dev \
23+
# libc6-dev \
24+
# libtasn1-6 \
25+
# gnutls30 iptables ipset ca-certificates
26+
#RUN apt-get autoremove -y && apt-get clean
27+
28+
COPY ${ARTIFACT_DIR}/bin/azure-npm /usr/bin/azure-npm
29+
ENTRYPOINT ["/usr/bin/azure-npm", "start"]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ steps:
1010
MANIFEST_DATA=$(echo "$IMAGE_PLATFORM_DATA" | \
1111
jq -r '.[] |
1212
.args = [ (.platform | split("/")[0]), (.platform | split("/")[1]) ] |
13-
.args = [ ("--os " + .args[0] ), ("--arch " + .args[1] ) ] |
13+
.args = [ ("--os " + .args[0] ), ("--arch " + .args[1] ) ] |
1414
if .osVersion then .args += ["--os-version " + .osVersion] else . end |
1515
{ image: .imageReference, annotate: .args }' | \
1616
jq -rcs)

.pipelines/build/image.steps.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ parameters:
1515
type: string
1616
default: ""
1717

18-
- name: dockerfile_path
19-
type: string
20-
default: ""
21-
2218
- name: archive_file
2319
type: string
2420
default: '$(name)-$(os)-$(platform)-$(Tag)'
@@ -50,8 +46,8 @@ parameters:
5046
steps:
5147
- task: DownloadPipelineArtifact@2
5248
inputs:
53-
targetPath: $(Build.SourcesDirectory)/dst/${{ parameters.source }}
54-
artifact: '${{ parameters.source }}'
49+
targetPath: $(Build.SourcesDirectory)/dst/artifacts
50+
artifact: ${{ parameters.source }}
5551

5652
- task: onebranch.pipeline.containercontrol@1
5753
displayName: "Login to ACR"
@@ -70,14 +66,13 @@ steps:
7066
repositoryName: $(os)-$(arch)/${{ parameters.name }}
7167
os: '${{ parameters.os }}'
7268
buildkit: 1
73-
dockerFileRelPath: ${{ parameters.dockerfile_path }}/Dockerfile
74-
dockerFileContextPath: ${{ parameters.source }}
69+
dockerFileRelPath: artifacts/Dockerfile
7570
enable_network: true
7671
enable_pull: true
7772
build_tag: ${{ parameters.build_tag }}
7873
enable_acr_push: true
79-
8074
saveImageToPath: images/$(os)-$(arch)/${{ parameters.archive_file }}.tar.gz
75+
enabled_cache: false
8176
#compress: true
8277
#saveMetadataToPath: images/$(os)-$(arch)/metadata/${{ parameters.archive_file }}-metadata.json
8378
#enable_isolated_acr_push: true

0 commit comments

Comments
 (0)