forked from zincsearch/zincsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec-pr.yml
51 lines (47 loc) · 1.96 KB
/
buildspec-pr.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
45
46
47
48
49
50
51
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
- docker login -u AWS -p $(aws ecr-public get-login-password --region us-east-1) 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
- ./eslint.sh
# - ./uitest.sh
- npm run build
- cd ..
- echo "golangci-lint ..."
- ./golangci-lint.sh
- echo "golangci-lint done ..."
- ./coverage.sh
# - go build -o main cmd/zincsearch/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-dev.yml
# post_build:
# commands:
# - echo Build completed on `date`