mirror of
https://github.com/thegeeklab/drone-docker.git
synced 2024-06-10 20:30:55 +02:00
cleanup makefile
This commit is contained in:
parent
ecfb0daa85
commit
abbb3d4f89
|
@ -1,6 +1,5 @@
|
||||||
local PipelineTest = {
|
local PipelineTest = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
image_pull_secrets: ['docker_config'],
|
|
||||||
name: 'test',
|
name: 'test',
|
||||||
platform: {
|
platform: {
|
||||||
os: 'linux',
|
os: 'linux',
|
||||||
|
@ -61,7 +60,6 @@ local PipelineTest = {
|
||||||
|
|
||||||
local PipelineBuildBinaries = {
|
local PipelineBuildBinaries = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
image_pull_secrets: ['docker_config'],
|
|
||||||
name: 'build-binaries',
|
name: 'build-binaries',
|
||||||
platform: {
|
platform: {
|
||||||
os: 'linux',
|
os: 'linux',
|
||||||
|
@ -79,7 +77,7 @@ local PipelineBuildBinaries = {
|
||||||
name: 'executable',
|
name: 'executable',
|
||||||
image: 'alpine',
|
image: 'alpine',
|
||||||
commands: [
|
commands: [
|
||||||
'$(find dist/ -executable -type f | grep drone-docker-linux-amd64) --help',
|
'$(find dist/ -executable -type f -iname ${DRONE_REPO_NAME}-linux-amd64) --help',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -127,7 +125,6 @@ local PipelineBuildBinaries = {
|
||||||
|
|
||||||
local PipelineBuildContainer(arch='amd64') = {
|
local PipelineBuildContainer(arch='amd64') = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
image_pull_secrets: ['docker_config'],
|
|
||||||
name: 'build-container-' + arch,
|
name: 'build-container-' + arch,
|
||||||
platform: {
|
platform: {
|
||||||
os: 'linux',
|
os: 'linux',
|
||||||
|
@ -258,7 +255,6 @@ local PipelineDocs = {
|
||||||
|
|
||||||
local PipelineNotifications = {
|
local PipelineNotifications = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
image_pull_secrets: ['docker_config'],
|
|
||||||
name: 'notifications',
|
name: 'notifications',
|
||||||
platform: {
|
platform: {
|
||||||
os: 'linux',
|
os: 'linux',
|
||||||
|
|
22
.drone.yml
22
.drone.yml
|
@ -35,9 +35,6 @@ volumes:
|
||||||
- name: godeps
|
- name: godeps
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -61,7 +58,7 @@ steps:
|
||||||
- name: executable
|
- name: executable
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- $(find dist/ -executable -type f | grep drone-docker-linux-amd64) --help
|
- $(find dist/ -executable -type f -iname ${DRONE_REPO_NAME}-linux-amd64) --help
|
||||||
|
|
||||||
- name: changelog-generate
|
- name: changelog-generate
|
||||||
image: thegeeklab/git-chglog
|
image: thegeeklab/git-chglog
|
||||||
|
@ -89,9 +86,6 @@ steps:
|
||||||
ref:
|
ref:
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -174,9 +168,6 @@ steps:
|
||||||
depends_on:
|
depends_on:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -259,9 +250,6 @@ steps:
|
||||||
depends_on:
|
depends_on:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -344,9 +332,6 @@ steps:
|
||||||
depends_on:
|
depends_on:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -486,9 +471,6 @@ steps:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- docker_config
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/main
|
- refs/heads/main
|
||||||
|
@ -502,6 +484,6 @@ depends_on:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 9ee9ec07028e26d74e30bb239266b01dd105621178225d50bf2a214712d816e9
|
hmac: 04cbe3e2b04cabcdb331f8dbba48337bb365ed4b6fd2f122eed3f4a7c81160d2
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
/dist/
|
/dist/
|
||||||
|
/release/
|
||||||
/drone-docker*
|
/drone-docker*
|
||||||
|
|
||||||
coverage.out
|
coverage.out
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -43,7 +43,7 @@ all: clean build
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
go clean -i ./...
|
$(GO) clean -i ./...
|
||||||
rm -rf $(DIST_DIRS)
|
rm -rf $(DIST_DIRS)
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
|
@ -59,24 +59,24 @@ lint: golangci-lint
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate:
|
generate:
|
||||||
go generate $(GENERATE)
|
$(GO) generate $(GENERATE)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go test -v -coverprofile coverage.out $(PACKAGES)
|
$(GO) test -v -coverprofile coverage.out $(PACKAGES)
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(DIST)/$(EXECUTABLE)
|
build: $(DIST)/$(EXECUTABLE)
|
||||||
|
|
||||||
$(DIST)/$(EXECUTABLE): $(SOURCES)
|
$(DIST)/$(EXECUTABLE): $(SOURCES)
|
||||||
go build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
|
$(GO) build -v -tags '$(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -o $@ ./cmd/$(EXECUTABLE)
|
||||||
|
|
||||||
$(DIST_DIRS):
|
$(DIST_DIRS):
|
||||||
mkdir -p $(DIST_DIRS)
|
mkdir -p $(DIST_DIRS)
|
||||||
|
|
||||||
.PHONY: xgo
|
.PHONY: xgo
|
||||||
xgo: | $(DIST_DIRS)
|
xgo: | $(DIST_DIRS)
|
||||||
go run $(XGO_PACKAGE) -go $(XGO_VERSION) -v -ldflags '-extldflags "-static" $(LDFLAGS)' -tags '$(TAGS)' -targets '$(XGO_TARGETS)' -out $(EXECUTABLE) --pkg cmd/$(EXECUTABLE) .
|
$(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -v -ldflags '-extldflags "-static" $(LDFLAGS)' -tags '$(TAGS)' -targets '$(XGO_TARGETS)' -out $(EXECUTABLE) --pkg cmd/$(EXECUTABLE) .
|
||||||
cp /build/* $(CWD)/$(DIST)
|
cp /build/* $(CWD)/$(DIST)
|
||||||
ls -l $(CWD)/$(DIST)
|
ls -l $(CWD)/$(DIST)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ export GOARCH=amd64
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
|
|
||||||
go build -v -a -tags netgo -o release/amd64/drone-docker ./cmd/drone-docker/
|
go build -v -a -tags netgo -o dist/drone-docker ./cmd/drone-docker/
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the Docker image with the following command:
|
Build the Docker image with the following command:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user