Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup unused files, improve build infra, add license to postgres, etc. #41

Merged
merged 19 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
with:
fetch-tags: 1
fetch-depth: 1
- name: Set version in .version file
run: make version
- name: Unit Tests
run: go test -v ./...
- name: Release with goreleaser
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
go-version: '1.21.x'
- name: Install dependencies
run: go get ./boot-script-service ./bss-init
- name: Generate .version
run: make -C ../ version
- name: Test with the Go CLI
run: go test ./boot-script-service ./bss-init
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
kubernetes/.packaged/
.idea/
*.swp
.version

# Binaries
boot-script-service
bss-init

# Prevent certificates from getting checked in
*.ca
Expand Down
1 change: 0 additions & 1 deletion .version

This file was deleted.

31 changes: 0 additions & 31 deletions Dockerfile.bss-debugger.Dockerfile

This file was deleted.

35 changes: 0 additions & 35 deletions Dockerfile.bss-postgres-test.Dockerfile

This file was deleted.

51 changes: 0 additions & 51 deletions Dockerfile.testing.Dockerfile

This file was deleted.

38 changes: 20 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,38 @@

# Service
NAME ?= bss
VERSION ?= $(shell cat .version)
DOCKER ?= docker

# Version
BUILD := $(shell git rev-parse --short HEAD)
VERSION := $(shell git describe --tags --always --abbrev=0)
BINARIES = boot-script-service bss-init
GOOS := $(if $(GOOS),$(GOOS),linux)
GOARCH := $(if $(GOARCH),$(GOARCH),amd64)

.PHONY: all
all: binaries
davidallendj marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: binaries
binaries: version $(BINARIES)

all : image unittest ct snyk ct_image
.PHONY: docker
container: version $(BINARIES)
$(DOCKER) build --tag openchami/bss:$(VERSION)-dirty $(DOCKEROPTS) .

binaries: $(BINARIES)
# BSS uses the .version file when printing its version, so we need to
# update it.
.PHONY: version
version:
echo '$(VERSION)' | tr -d v | tee .version

%: cmd/%/*.go
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -v -tags musl $(LDFLAGS) -o $@ ./$(dir $<)

.PHONY: clean
clean:
rm -f $(BINARIES)

image:
docker build ${NO_CACHE} --pull ${DOCKER_ARGS} --tag '${NAME}:${VERSION}' .

unittest:
./runUnitTest.sh

.PHONY: snyk
snyk:
./runSnyk.sh

ct:
./runCT.sh

ct_image:
docker build --no-cache -f test/ct/Dockerfile test/ct/ --tag hms-bss-hmth-test:${VERSION}

docker: $(BINARIES)
docker build --tag openchami/bss:v$(VERSION)-dirty $(DOCKEROPTS) .
62 changes: 0 additions & 62 deletions build_tag_push.sh

This file was deleted.

36 changes: 0 additions & 36 deletions dev/etcd/run.sh

This file was deleted.

Loading
Loading