forked from zincsearch/zincsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec-nightly.yml
44 lines (40 loc) · 1.69 KB
/
buildspec-nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: 0.2
phases:
install:
commands:
# - GORELEASER_LATEST_VERSION=(curl -sL -o /dev/null -w %{url_effective} "https://github.com/goreleaser/goreleaser/releases/latest" | rev | cut -f1 -d'/'| rev)
- GORELEASER_LATEST_VERSION=v1.10.1-pro
- wget -nv https://github.com/goreleaser/goreleaser-pro/releases/download/$GORELEASER_LATEST_VERSION/goreleaser-pro_$(uname -s)_$(uname -m).tar.gz
- tar -xzf goreleaser-pro_$(uname -s)_$(uname -m).tar.gz
- sudo mv goreleaser /usr/local/bin/goreleaser
# install buildx
- wget -nv https://github.com/docker/buildx/releases/download/v0.7.1/buildx-v0.7.1.linux-amd64
- chmod +x buildx-v0.7.1.linux-amd64
- mkdir -p ~/.docker/cli-plugins
- mv buildx-v0.7.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx
# install prerequisites
- apt-get update && apt-get install bc -y
# update npm
- npm install --location=global npm@latest
pre_build:
commands:
# - echo Logging in to Amazon ECR...
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs
- export DOCKER_CLI_EXPERIMENTAL=enabled
# - export DOCKER_BUILDKIT=1
build:
commands:
# Build vujes UI
- echo "Building front end..."
- cd web
- npm install
- npm run build
- cd ..
# - go build -o main cmd/zinc/main.go
# Build binary and container images using goreleaser
- echo Build started on `date`
- GIT_TAG="$(git describe --tags --abbrev=0)"
- goreleaser release --nightly -f .goreleaser-nightly.yml
# post_build:
# commands:
# - echo Build completed on `date`