Skip to content

Commit a35f487

Browse files
committed
fixup! Use Signed Binaries for Docker Build
1 parent 96b082d commit a35f487

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.pipelines/build/images.jobs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
variables:
1717
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
18-
ob_artifactSuffix: _$(artifact)
18+
ob_artifactSuffix: _$(name)
1919
ob_git_checkout: false
2020
${{ if eq(job_data.job, 'linux_amd64') }}:
2121
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'

.pipelines/build/scripts/cni.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
#ARG CNI_AI_PATH
4+
#ARG CNI_AI_ID
5+
# WORKDIR /azure-container-networking
6+
7+
CNI_BUILD_DIR=$(mktemp -d -p "$GEN_DIR")
8+
pushd "$REPO_ROOT"
9+
GOOS=$OS CGO_ENABLED=0 go build -a -o "$CNI_BUILD_DIR"/azure-vnet -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" cni/network/plugin/main.go
10+
GOOS=$OS CGO_ENABLED=0 go build -a -o "$CNI_BUILD_DIR"/azure-vnet-telemetry -trimpath -ldflags "-X main.version="$VERSION" -X "$CNI_AI_PATH"="$CNI_AI_ID"" -gcflags="-dwarflocationlists=true" cni/telemetry/service/telemetrymain.go
11+
GOOS=$OS CGO_ENABLED=0 go build -a -o "$CNI_BUILD_DIR"/azure-vnet-ipam -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" cni/ipam/plugin/main.go
12+
GOOS=$OS CGO_ENABLED=0 go build -a -o "$CNI_BUILD_DIR"/azure-vnet-stateless -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" cni/network/stateless/main.go
13+
14+
cp cni/azure-$OS.conflist "$CNI_BUILD_DIR"/azure.conflist
15+
cp cni/azure-$OS-swift.conflist "$CNI_BUILD_DIR"/azure-swift.conflist
16+
cp cni/azure-linux-multitenancy-transparent-vlan.conflist "$CNI_BUILD_DIR"/azure-multitenancy-transparent-vlan.conflist
17+
cp cni/azure-$OS-swift-overlay.conflist "$CNI_BUILD_DIR"/azure-swift-overlay.conflist
18+
cp cni/azure-$OS-swift-overlay-dualstack.conflist "$CNI_BUILD_DIR"/azure-swift-overlay-dualstack.conflist
19+
cp cni/azure-$OS-multitenancy.conflist "$CNI_BUILD_DIR"/azure-multitenancy.conflist
20+
cp telemetry/azure-vnet-telemetry.config "$CNI_BUILD_DIR"/azure-vnet-telemetry.config
21+
sha256sum * > sum.txt
22+
gzip --verbose --best --recursive "$CNI_BUILD_DIR" && for f in *.gz; do mv -- "$f" "${f%%.gz}"; done
23+
popd
24+
25+
go mod download github.com/azure/azure-container-networking/dropgz@$DROPGZ_VERSION
26+
pushd "$GOPATH"/pkg/mod/github.com/azure/azure-container-networking/dropgz\@$DROPGZ_VERSION
27+
cp "$CNI_BUILD_DIR"/* pkg/embed/fs/
28+
GOOS=$OS CGO_ENABLED=0 go build -a -o "$OUT_DIR"/bins/dropgz -trimpath -ldflags "-X github.com/Azure/azure-container-networking/dropgz/internal/buildinfo.Version="$VERSION"" -gcflags="-dwarflocationlists=true" main.go
29+
popd

0 commit comments

Comments
 (0)