Skip to content

Commit 1c78859

Browse files
committed
Merge branch 'main' into NVSHAS-6217
2 parents 661e900 + 7ad5e68 commit 1c78859

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.github/workflows/unitest.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Run unitest on push and pull request
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
unitest:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: '1.20.3'
15+
- run: |
16+
./unitest.sh

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
deployment:
2-
env GOOS=linux GOARCH=amd64 go build .
1+
.PHONY:
2+
3+
BASE_IMAGE_TAG = latest
4+
BUILD_IMAGE_TAG = v1
5+
6+
all:
7+
env GOOS=linux GOARCH=amd64 go build -ldflags='-s -w' -buildvcs=false .
8+
9+
binary:
10+
@echo "Making $@ ..."
11+
@docker pull neuvector/build_fleet:${BUILD_IMAGE_TAG}
12+
@docker run --rm -ia STDOUT --name build --net=none -v $(CURDIR):/go/src/github.com/neuvector/sigstore-interface -w /go/src/github.com/neuvector/sigstore-interface --entrypoint ./make_bin.sh neuvector/build_fleet:${BUILD_IMAGE_TAG}

make_bin.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# This script is invoked by build container
4+
5+
./unitest.sh || exit $?
6+
7+
echo "==> Making binary"
8+
make || exit $?

unitest.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
go test ./... || exit $?

0 commit comments

Comments
 (0)