mirror of
https://github.com/helm/chart-releaser.git
synced 2026-02-05 09:45:23 +01:00
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
version: 2
|
|
jobs:
|
|
lint:
|
|
docker:
|
|
- image: koalaman/shellcheck-alpine
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: lint
|
|
command: |
|
|
shellcheck -x build.sh
|
|
shellcheck -x tag.sh
|
|
build:
|
|
docker:
|
|
- image: cimg/go:1.14
|
|
steps:
|
|
- setup_remote_docker
|
|
- checkout
|
|
- run:
|
|
name: Install tools
|
|
command: ./setup.sh
|
|
- run:
|
|
name: lint
|
|
command: |
|
|
go vet -v ./...
|
|
goimports -w -l .
|
|
go mod tidy
|
|
git diff --exit-code
|
|
- run:
|
|
name: Build
|
|
command: |
|
|
set -e
|
|
set -u
|
|
|
|
if [[ -z "${CIRCLE_TAG:-}" ]]; then
|
|
echo "Building snapshot..."
|
|
./build.sh
|
|
else
|
|
echo "Building release $CIRCLE_TAG..."
|
|
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin quay.io
|
|
./build.sh --release
|
|
fi
|
|
workflows:
|
|
version: 2
|
|
untagged-build:
|
|
jobs:
|
|
- lint
|
|
- build
|
|
tagged-build:
|
|
jobs:
|
|
- build:
|
|
filters:
|
|
tags:
|
|
only: /^v.*/
|
|
branches:
|
|
ignore: /.*/
|