Skip to content

Commit 0a8bec4

Browse files
committed
Merge branch 'upstream-main' into updated-654
2 parents fe084c5 + 267fca0 commit 0a8bec4

File tree

5 files changed

+12
-19
lines changed

5 files changed

+12
-19
lines changed

.github/workflows/build-and-test.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
- cron: '0 19 * * 1-5'
1414

1515
env:
16-
DEFAULT_GO_VERSION: ^1.16
16+
DEFAULT_GO_VERSION: 1.16
1717
GITHUB_USERNAME: ${{ secrets.EC2_BOT_GITHUB_USERNAME }}
1818
GITHUB_TOKEN: ${{ secrets.EC2_BOT_GITHUB_TOKEN }}
1919
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
@@ -61,10 +61,11 @@ jobs:
6161
steps:
6262
- uses: actions/checkout@v2
6363
- name: Set up golangci-lint
64-
uses: golangci/golangci-lint-action@v2.5.2
64+
uses: golangci/golangci-lint-action@v3.2.0
6565
with:
6666
version: v1.45.2
6767
args: --timeout=5m
68+
skip-cache: true
6869

6970
buildLinux:
7071
name: Build Linux Binaries

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fmt:
2929
goimports -w ./ && gofmt -s -w ./
3030

3131
docker-build:
32-
${MAKEFILE_PATH}/scripts/build-docker-images -d -p ${GOOS}/${GOARCH} -r ${IMG} -v ${VERSION}
32+
${MAKEFILE_PATH}/scripts/build-docker-images -p ${GOOS}/${GOARCH} -r ${IMG} -v ${VERSION}
3333

3434
docker-run:
3535
docker run ${IMG_W_TAG}
@@ -93,10 +93,10 @@ helm-validate-eks-versions:
9393
${MAKEFILE_PATH}/test/helm/validate-chart-versions
9494

9595
build-binaries:
96-
${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS_LINUX} -v ${VERSION} -d
96+
${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS_LINUX} -v ${VERSION}
9797

9898
build-binaries-windows:
99-
${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS_WINDOWS} -v ${VERSION} -d
99+
${MAKEFILE_PATH}/scripts/build-binaries -p ${SUPPORTED_PLATFORMS_WINDOWS} -v ${VERSION}
100100

101101
upload-resources-to-github:
102102
${MAKEFILE_PATH}/scripts/upload-resources-to-github

scripts/build-binaries

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ mkdir -p $BIN_DIR
1111
VERSION=$(make -s -f $MAKE_FILE_PATH version)
1212
BASE_BIN_NAME=$(make -s -f $MAKE_FILE_PATH binary-name)
1313
PLATFORMS=("linux/amd64")
14-
PASS_THRU_ARGS=""
1514

1615
USAGE=$(cat << 'EOM'
1716
Usage: build-binaries [-p <platform pairs>]
@@ -21,20 +20,16 @@ USAGE=$(cat << 'EOM'
2120
Optional:
2221
-b Base bin name [DEFAULT: output of "make binary-name"]
2322
-p Platform pair list (os/architecture) [DEFAULT: linux/amd64]
24-
-d DIRECT: Set GOPROXY=direct to bypass go proxies
2523
-v VERSION: The application version of the docker image [DEFAULT: output of `make version`]
2624
EOM
2725
)
2826

2927
# Process our input arguments
30-
while getopts "dp:v:b:" opt; do
28+
while getopts "p:v:b:" opt; do
3129
case ${opt} in
3230
p ) # Platform Pairs
3331
IFS=',' read -ra PLATFORMS <<< "$OPTARG"
3432
;;
35-
d ) # sets GOPROXY=direct
36-
PASS_THRU_ARGS="$PASS_THRU_ARGS -d"
37-
;;
3833
v ) # Image Version
3934
VERSION="$OPTARG"
4035
;;
@@ -61,7 +56,7 @@ for os_arch in "${PLATFORMS[@]}"; do
6156
fi
6257

6358
docker container rm $container_name || :
64-
$SCRIPTPATH/build-docker-images -p $os_arch -v $VERSION -r $repo_name $PASS_THRU_ARGS
59+
$SCRIPTPATH/build-docker-images -p $os_arch -v $VERSION -r $repo_name
6560
docker container create --rm --name $container_name "$repo_name:$VERSION-$os-$arch"
6661
docker container cp $container_name:/${BASE_BIN_NAME} $BIN_DIR/$bin_name
6762

scripts/build-docker-images

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DOCKERFILE_PATH=$REPO_ROOT_PATH/Dockerfile
99

1010
VERSION=$(make -s -f $MAKE_FILE_PATH version)
1111
PLATFORMS=("linux/amd64")
12-
GOPROXY="https://proxy.golang.org,direct"
12+
GOPROXY="direct|https://proxy.golang.org"
1313

1414

1515
USAGE=$(cat << 'EOM'
@@ -19,21 +19,17 @@ USAGE=$(cat << 'EOM'
1919
Example: build-docker-images -p "linux/amd64,linux/arm"
2020
Optional:
2121
-p Platform pair list (os/architecture) [DEFAULT: linux/amd64]
22-
-d DIRECT: Set GOPROXY=direct to bypass go proxies
2322
-r IMAGE REPO: set the docker image repo
2423
-v VERSION: The application version of the docker image [DEFAULT: output of `make version`]
2524
EOM
2625
)
2726

2827
# Process our input arguments
29-
while getopts "dp:r:v:" opt; do
28+
while getopts "p:r:v:" opt; do
3029
case ${opt} in
3130
p ) # Platform Pairs
3231
IFS=',' read -ra PLATFORMS <<< "$OPTARG"
3332
;;
34-
d ) # GOPROXY=direct
35-
GOPROXY="direct"
36-
;;
3733
r ) # Image Repo
3834
IMAGE_REPO="$OPTARG"
3935
;;

test/license-test/run-license-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ BUILD_BIN="$BUILD_PATH/bin"
88
BINARY_NAME="node-termination-handler-linux-amd64"
99
LICENSE_TEST_TAG="nth-license-test"
1010
LICENSE_REPORT_FILE="$BUILD_PATH/license-report"
11+
GOPROXY="direct|https://proxy.golang.org"
1112

1213
SUPPORTED_PLATFORMS_LINUX="linux/amd64" make -s -f $SCRIPTPATH/../../Makefile build-binaries
13-
docker buildx build --load --build-arg=GOPROXY=direct -t $LICENSE_TEST_TAG $SCRIPTPATH/
14+
docker buildx build --load --build-arg=GOPROXY=${GOPROXY} -t $LICENSE_TEST_TAG $SCRIPTPATH/
1415
docker run -i -e GITHUB_TOKEN --rm -v $SCRIPTPATH/:/test -v $BUILD_BIN/:/nth-bin $LICENSE_TEST_TAG golicense /test/license-config.hcl /nth-bin/$BINARY_NAME | tee $LICENSE_REPORT_FILE
1516
$SCRIPTPATH/check-licenses.sh $LICENSE_REPORT_FILE

0 commit comments

Comments
 (0)