add initial packages-oss.yml

build-be1555d9b0325d7d8078451c19df46d0aa514c40-77765297f95ba814
Sam Salisbury 6 years ago
parent 34a73b5c53
commit d67025cb2b

@ -0,0 +1,63 @@
---
config:
product-repo: git@github.com:hashicorp/boundary.git
release-repo: git@github.com:hashicorp/boundary-release.git
product-id: github.com/hashicorp/boundary
circleci-project-slug: gh/hashicorp/boundary
circleci-host: circleci.com
inputs:
defaults:
PRODUCT_NAME: boundary
PRODUCT_VERSION: 0.0.1
BUILD_TAGS: ui
CGO_ENABLED: 0
templates:
BINARY_NAME: '{{.PRODUCT_NAME}}{{if eq .GOOS "windows"}}.exe{{end}}'
packages:
- inputs: { GOOS: darwin, GOARCH: amd64 }
- inputs: { GOOS: linux, GOARCH: amd64 }
meta:
defaults:
# No default metadata.
templates:
BUILD_JOB_NAME: >-
{{.GOOS}}_{{.GOARCH}}_package
POST_PROCESSORS: '
{{- if and (eq .GOOS "darwin") (eq .GOARCH "amd64")}}apple-notarize {{end -}}
{{- if and (eq .GOOS "windows") (eq .GOARCH "amd64")}}microsoft-notarize {{end -}}
av-scan'
BUNDLE_NAME: "boundary_{{.PRODUCT_VERSION}}"
package-aliases:
- type: local
template: >-
{{.BUNDLE_NAME}}_{{.GOOS}}_{{.GOARCH}}.zip
- type: public-hc-releases
template: >-
boundary/{{.BUNDLE_NAME}}/{{.BUNDLE_NAME}}_{{.GOOS}}_{{.GOARCH}}.zip
base-image: "golang@sha256:21408f9e65fbd1fac28d8a6788485a74f9029fece0086a25d1eaf1d8cc79b7ad"
layers:
- name: install-deps
dockerfile: |
RUN apt-get update -y && apt-get install -yq zip
- name: download-modules
source-include: go.mod go.sum
dockerfile: |
ENV GOPATH=
RUN go mod download
- name: copy-source
source-include: "*.go"
build-command: VERSION_PKG_PATH=github.com/hashicorp/boundary;
unset GOPATH;
go build -v
-ldflags "-X $VERSION_PKG_PATH.Revision=$PACKAGE_SOURCE_ID
-X $VERSION_PKG_PATH.Version={{.PRODUCT_VERSION}}"
-o $OUTPUT_DIR/{{.BINARY_NAME}}
./cmd/boundary
&& cd $OUTPUT_DIR && zip $PACKAGE_ZIP_NAME {{.BINARY_NAME}}
Loading…
Cancel
Save