FB-904: Add deb/rpm packaging of FeatureBase binary

This commit is contained in:
Ben Johnson 2021-11-02 14:14:31 -06:00
parent 63fd5100d1
commit 395f35fc3d
3 changed files with 38 additions and 0 deletions

View file

@ -159,6 +159,21 @@ build for darwin arm64:
paths:
- featurebase_darwin_arm64
package for linux amd64:
stage: build
image: registry.gitlab.com/molecula/featurebase/builder:0.0.3
variables:
GOOS: "linux"
GOARCH: "amd64"
script:
- echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
- apt update && apt install nfpm
- make package
artifacts:
paths:
- "*.deb"
- "*.rpm"
# Build a FB Docker image with CI/CD and push to the GitLab registry.
build container fb:
image: docker:stable

View file

@ -44,6 +44,9 @@ clean:
vendor: go.mod
$(GO) mod vendor
version:
@echo $(VERSION)
# Run test suite
test:
$(GO) test ./... -tags='$(BUILD_TAGS) $(TEST_TAGS)' $(TESTFLAGS) -v
@ -126,6 +129,11 @@ release-sans-ui: check-clean
$(MAKE) release-build GOOS=linux GOARCH=amd64
$(MAKE) release-build GOOS=linux GOARCH=arm64
package:
go build -o featurebase ./cmd/featurebase
nfpm package --packager deb --target featurebase_$(VERSION_ID).deb
nfpm package --packager rpm --target featurebase_$(VERSION_ID).rpm
# try (e.g.) internal/clustertests/docker-compose-replication2.yml
DOCKER_COMPOSE=internal/clustertests/docker-compose.yml

15
nfpm.yaml Normal file
View file

@ -0,0 +1,15 @@
name: "featurebase"
arch: "${GOARCH}"
platform: "${GOOS}"
version: "${VERSION}"
section: "default"
priority: "extra"
maintainer: "Molecula Corp. <info@molecula.com>"
description: "FeatureBase is a feature extraction and storage technology that enables real-time analytics."
vendor: "Molecula"
homepage: "https://molecula.com"
contents:
- src: ./featurebase
dst: /usr/local/bin/featurebase
- dst: /etc/featurebase.conf
type: ghost