Skip to content

Commit 93f2ec8

Browse files
committed
fixup! fixup! Use Signed Binaries for Docker Build
1 parent 61c10fe commit 93f2ec8

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

.pipelines/build/scripts/azure-ipam.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eux
33

4-
[[ $GOOS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
4+
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
55

66
export CGO_ENABLED=0
77

.pipelines/build/scripts/cni.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eux
33

4-
[[ $GOOS =~ windows ]] && FILE_EXT='exe' || FILE_EXT=''
4+
[[ $OS =~ windows ]] && FILE_EXT='exe' || FILE_EXT=''
55

66
mkdir -p "$OUT_DIR"/files
77
mkdir -p "$OUT_DIR"/bin
@@ -11,7 +11,7 @@ export CGO_ENABLED=0
1111

1212
CNI_NET_DIR="$REPO_ROOT"/cni/network/plugin
1313
pushd "$CNI_NET_DIR"
14-
go build -v -a -trimpath \
14+
GOOS="$OS" go build -v -a -trimpath \
1515
-o "$OUT_DIR"/bin/azure-vnet"$FILE_EXT" \
1616
-ldflags "-X main.version="$CNI_VERSION"" \
1717
-gcflags="-dwarflocationlists=true" \
@@ -20,7 +20,7 @@ popd
2020

2121
STATELESS_CNI_BUILD_DIR="$REPO_ROOT"/cni/network/stateless
2222
pushd "$STATELESS_CNI_BUILD_DIR"
23-
go build -v -a -trimpath \
23+
GOOS="$OS" go build -v -a -trimpath \
2424
-o "$OUT_DIR"/bin/azure-vnet-stateless"$FILE_EXT" \
2525
-ldflags "-X main.version="$CNI_VERSION"" \
2626
-gcflags="-dwarflocationlists=true" \
@@ -29,7 +29,7 @@ popd
2929

3030
CNI_IPAM_DIR="$REPO_ROOT"/cni/ipam/plugin
3131
pushd "$CNI_IPAM_DIR"
32-
go build -v -a -trimpath \
32+
GOOS="$OS" go build -v -a -trimpath \
3333
-o "$OUT_DIR"/bin/azure-vnet-ipam"$FILE_EXT" \
3434
-ldflags "-X main.version="$CNI_VERSION"" \
3535
-gcflags="-dwarflocationlists=true" \
@@ -38,7 +38,7 @@ popd
3838

3939
CNI_IPAMV6_DIR="$REPO_ROOT"/cni/ipam/pluginv6
4040
pushd "$CNI_IPAMV6_DIR"
41-
go build -v -a -trimpath \
41+
GOOS="$OS" go build -v -a -trimpath \
4242
-o "$OUT_DIR"/bin/azure-vnet-ipamv6"$FILE_EXT" \
4343
-ldflags "-X main.version="$CNI_VERSION"" \
4444
-gcflags="-dwarflocationlists=true" \
@@ -47,7 +47,7 @@ popd
4747

4848
CNI_TELEMETRY_DIR="$REPO_ROOT"/cni/telemetry/service
4949
pushd "$CNI_TELEMETRY_DIR"
50-
go build -v -a -trimpath \
50+
GOOS="$OS" go build -v -a -trimpath \
5151
-o "$OUT_DIR"/bin/azure-vnet-telemetry"$FILE_EXT" \
5252
-ldflags "-X main.version="$CNI_VERSION" -X "$CNI_AI_PATH"="$CNI_AI_ID"" \
5353
-gcflags="-dwarflocationlists=true" \

.pipelines/build/scripts/cns.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eux
33

4-
[[ $GOOS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
4+
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
55

66
export CGO_ENABLED=0
77

@@ -10,7 +10,7 @@ mkdir -p "$OUT_DIR"/bin
1010
mkdir -p "$OUT_DIR"/scripts
1111

1212
pushd "$REPO_ROOT"/cns
13-
go build -v -a \
13+
GOOS="$OS" go build -v -a \
1414
-o "$OUT_DIR"/bin/azure-cns"$FILE_EXT" \
1515
-ldflags "-X main.version="$CNS_VERSION" -X "$CNS_AI_PATH"="$CNS_AI_ID"" \
1616
-gcflags="-dwarflocationlists=true" \

.pipelines/build/scripts/dropgz.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eux
33

4-
[[ $GOOS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
4+
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
55

66
export CGO_ENABLED=0
77

@@ -34,15 +34,10 @@ echo >&2 "##[section]Download DropGZ ($DROPGZ_VERSION)"
3434
GOPATH="$DROPGZ_BUILD_DIR" \
3535
go mod download "$DROPGZ_MOD_DOWNLOAD_PATH"
3636

37-
ls -la
38-
ls -la "$GEN_DIR"
39-
ls -la "$DROPGZ_BUILD_DIR"
40-
apt-get install -y tree || tdnf install -y tree
41-
tree "$GEN_DIR"
4237
echo >&2 "##[section]Build DropGZ with Embedded Payload"
4338
pushd "$DROPGZ_BUILD_DIR"/pkg/mod/"$DROPGZ_MOD_DOWNLOAD_PATH"
4439
mv "$PAYLOAD_DIR"/* pkg/embed/fs/
45-
go build -v -trimpath -a \
40+
GOOS="$OS" go build -v -trimpath -a \
4641
-o "$OUT_DIR"/bin/dropgz"$FILE_EXT" \
4742
-ldflags "-X github.com/Azure/azure-container-networking/dropgz/internal/buildinfo.Version="$DROPGZ_VERSION"" \
4843
-gcflags="-dwarflocationlists=true" \

.pipelines/build/scripts/ipv6-hp-bpf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function findcp::shared_library() {
3535
}
3636

3737

38-
[[ $GOOS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
38+
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
3939

4040
export CGO_ENABLED=0
4141
export C_INCLUDE_PATH=/usr/include/bpf
@@ -157,7 +157,7 @@ pushd "$REPO_ROOT"/bpf-prog/ipv6-hp-bpf
157157
fi
158158

159159
go generate ./...
160-
go build -v -a -trimpath \
160+
GOOS="$OS" go build -v -a -trimpath \
161161
-o "$OUT_DIR"/bin/ipv6-hp-bpf"$FILE_EXT" \
162162
-ldflags "-X main.version="$IPV6_HP_BPF_VERSION"" \
163163
-gcflags="-dwarflocationlists=true" .

.pipelines/build/scripts/npm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eux
33

4-
[[ $GOOS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
4+
[[ $OS =~ windows ]] && FILE_EXT='.exe' || FILE_EXT=''
55

66
export CGO_ENABLED=0
77

@@ -10,7 +10,7 @@ mkdir -p "$OUT_DIR"/bin
1010
mkdir -p "$OUT_DIR"/scripts
1111

1212
pushd "$REPO_ROOT"/npm
13-
go build -a -v -trimpath \
13+
GOOS="$OS" go build -a -v -trimpath \
1414
-o "$OUT_DIR"/bin/azure-npm"$FILE_EXT" \
1515
-ldflags "-X main.version="$NPM_VERSION" -X "$NPM_AI_PATH"="$NPM_AI_ID"" \
1616
-gcflags="-dwarflocationlists=true" \

0 commit comments

Comments
 (0)