commit
abbac157bb
@ -14,7 +14,7 @@ builds:
|
|||||||
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.
|
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.
|
||||||
|
|
||||||
brews:
|
brews:
|
||||||
- github:
|
- repository:
|
||||||
owner: wagoodman
|
owner: wagoodman
|
||||||
name: homebrew-dive
|
name: homebrew-dive
|
||||||
homepage: "https://github.com/wagoodman/dive/"
|
homepage: "https://github.com/wagoodman/dive/"
|
||||||
@ -37,7 +37,7 @@ nfpms:
|
|||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
-
|
-
|
||||||
binaries:
|
ids:
|
||||||
- dive
|
- dive
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# todo: on 1.0 remove 'v' prefix
|
# 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)
|
BUILD_PATH = $(BUILD_DIR)/$(BIN)
|
||||||
PWD := ${CURDIR}
|
PWD := ${CURDIR}
|
||||||
PRODUCTION_REGISTRY = docker.io
|
PRODUCTION_REGISTRY = docker.io
|
||||||
|
SHELL = /bin/bash -o pipefail
|
||||||
TEST_IMAGE = busybox:latest
|
TEST_IMAGE = busybox:latest
|
||||||
|
|
||||||
all: gofmt clean build
|
all: gofmt clean build
|
||||||
@ -19,10 +20,12 @@ ci-static-analysis:
|
|||||||
golangci-lint run
|
golangci-lint run
|
||||||
|
|
||||||
ci-install-go-tools:
|
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:
|
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:
|
ci-docker-login:
|
||||||
echo '${DOCKER_PASSWORD}' | docker login -u '${DOCKER_USERNAME}' --password-stdin '${PRODUCTION_REGISTRY}'
|
echo '${DOCKER_PASSWORD}' | docker login -u '${DOCKER_USERNAME}' --password-stdin '${PRODUCTION_REGISTRY}'
|
||||||
@ -31,16 +34,16 @@ ci-docker-logout:
|
|||||||
docker logout '${PRODUCTION_REGISTRY}'
|
docker logout '${PRODUCTION_REGISTRY}'
|
||||||
|
|
||||||
ci-publish-release:
|
ci-publish-release:
|
||||||
goreleaser --rm-dist
|
goreleaser --clean
|
||||||
|
|
||||||
ci-build-snapshot-packages:
|
ci-build-snapshot-packages:
|
||||||
goreleaser \
|
goreleaser \
|
||||||
--snapshot \
|
--snapshot \
|
||||||
--skip-publish \
|
--skip-publish \
|
||||||
--rm-dist
|
--clean
|
||||||
|
|
||||||
ci-release:
|
ci-release:
|
||||||
goreleaser release --rm-dist
|
goreleaser release --clean
|
||||||
|
|
||||||
# todo: add --pull=never when supported by host box
|
# todo: add --pull=never when supported by host box
|
||||||
ci-test-production-image:
|
ci-test-production-image:
|
||||||
@ -87,18 +90,20 @@ ci-test-rpm-package-install:
|
|||||||
"
|
"
|
||||||
|
|
||||||
ci-test-linux-run:
|
ci-test-linux-run:
|
||||||
chmod 755 ./dist/dive_linux_amd64/dive && \
|
ls -la ./dist
|
||||||
./dist/dive_linux_amd64/dive '${TEST_IMAGE}' --ci && \
|
ls -la ./dist/dive_linux_amd64_v1
|
||||||
./dist/dive_linux_amd64/dive --source docker-archive .data/test-kaniko-image.tar --ci --ci-config .data/.dive-ci
|
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.
|
# 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:
|
ci-test-mac-run:
|
||||||
chmod 755 ./dist/dive_darwin_amd64/dive && \
|
chmod 755 ./dist/dive_darwin_amd64_v1/dive && \
|
||||||
./dist/dive_darwin_amd64/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
|
./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.
|
# 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:
|
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