commit
abbac157bb
@ -14,7 +14,7 @@ builds:
|
||||
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.
|
||||
|
||||
brews:
|
||||
- github:
|
||||
- repository:
|
||||
owner: wagoodman
|
||||
name: homebrew-dive
|
||||
homepage: "https://github.com/wagoodman/dive/"
|
||||
@ -37,7 +37,7 @@ nfpms:
|
||||
|
||||
dockers:
|
||||
-
|
||||
binaries:
|
||||
ids:
|
||||
- dive
|
||||
dockerfile: Dockerfile
|
||||
# todo: on 1.0 remove 'v' prefix
|
||||
|
27
Makefile
27
Makefile
@ -3,6 +3,7 @@ BUILD_DIR = ./dist/dive_linux_amd64
|
||||
BUILD_PATH = $(BUILD_DIR)/$(BIN)
|
||||
PWD := ${CURDIR}
|
||||
PRODUCTION_REGISTRY = docker.io
|
||||
SHELL = /bin/bash -o pipefail
|
||||
TEST_IMAGE = busybox:latest
|
||||
|
||||
all: gofmt clean build
|
||||
@ -19,10 +20,12 @@ ci-static-analysis:
|
||||
golangci-lint run
|
||||
|
||||
ci-install-go-tools:
|
||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin/ latest
|
||||
mkdir -p ${HOME}/.local/bin
|
||||
curl -sfL https://goreleaser.com/static/run > ${HOME}/.local/bin/goreleaser
|
||||
chmod +x ${HOME}/.local/bin/goreleaser
|
||||
|
||||
ci-install-ci-tools:
|
||||
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sudo sh -s -- -b /usr/local/bin/ "v0.122.0"
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${HOME}/.local/bin/
|
||||
|
||||
ci-docker-login:
|
||||
echo '${DOCKER_PASSWORD}' | docker login -u '${DOCKER_USERNAME}' --password-stdin '${PRODUCTION_REGISTRY}'
|
||||
@ -31,16 +34,16 @@ ci-docker-logout:
|
||||
docker logout '${PRODUCTION_REGISTRY}'
|
||||
|
||||
ci-publish-release:
|
||||
goreleaser --rm-dist
|
||||
goreleaser --clean
|
||||
|
||||
ci-build-snapshot-packages:
|
||||
goreleaser \
|
||||
--snapshot \
|
||||
--skip-publish \
|
||||
--rm-dist
|
||||
--clean
|
||||
|
||||
ci-release:
|
||||
goreleaser release --rm-dist
|
||||
goreleaser release --clean
|
||||
|
||||
# todo: add --pull=never when supported by host box
|
||||
ci-test-production-image:
|
||||
@ -87,18 +90,20 @@ ci-test-rpm-package-install:
|
||||
"
|
||||
|
||||
ci-test-linux-run:
|
||||
chmod 755 ./dist/dive_linux_amd64/dive && \
|
||||
./dist/dive_linux_amd64/dive '${TEST_IMAGE}' --ci && \
|
||||
./dist/dive_linux_amd64/dive --source docker-archive .data/test-kaniko-image.tar --ci --ci-config .data/.dive-ci
|
||||
ls -la ./dist
|
||||
ls -la ./dist/dive_linux_amd64_v1
|
||||
chmod 755 ./dist/dive_linux_amd64_v1/dive && \
|
||||
./dist/dive_linux_amd64_v1/dive '${TEST_IMAGE}' --ci && \
|
||||
./dist/dive_linux_amd64_v1/dive --source docker-archive .data/test-kaniko-image.tar --ci --ci-config .data/.dive-ci
|
||||
|
||||
# we're not attempting to test docker, just our ability to run on these systems. This avoids setting up docker in CI.
|
||||
ci-test-mac-run:
|
||||
chmod 755 ./dist/dive_darwin_amd64/dive && \
|
||||
./dist/dive_darwin_amd64/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
|
||||
chmod 755 ./dist/dive_darwin_amd64_v1/dive && \
|
||||
./dist/dive_darwin_amd64_v1/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
|
||||
|
||||
# we're not attempting to test docker, just our ability to run on these systems. This avoids setting up docker in CI.
|
||||
ci-test-windows-run:
|
||||
./dist/dive_windows_amd64/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
|
||||
./dist/dive_windows_amd64_v1/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user