Skip to content

Combine Drone release steps #9338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,12 @@ steps:
commands:
- git fetch --tags --force

- name: build
pull: always
image: node:10 # this step is kept at the lowest version of node that we support
commands:
- make css
- make js

- name: static
pull: always
image: techknowlogick/xgo:latest
commands:
- apt update && apt -y install curl
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
Expand All @@ -419,8 +414,6 @@ steps:
from_secret: gpgsign_key
GPGSIGN_PASSPHRASE:
from_secret: gpgsign_passphrase
depends_on:
- static

- name: release-branch-release
pull: always
Expand All @@ -438,8 +431,6 @@ steps:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
depends_on:
- gpg-sign
when:
branch:
- "release/*"
Expand All @@ -462,8 +453,6 @@ steps:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
depends_on:
- gpg-sign
when:
branch:
- master
Expand Down Expand Up @@ -496,17 +485,12 @@ steps:
commands:
- git fetch --tags --force

- name: build
pull: always
image: node:10 # this step is kept at the lowest version of node that we support
commands:
- make css
- make js

- name: static
pull: always
image: techknowlogick/xgo:latest
commands:
- apt update && apt -y install curl
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
- export PATH=$PATH:$GOPATH/bin
- make release
environment:
Expand All @@ -527,8 +511,6 @@ steps:
from_secret: gpgsign_key
GPGSIGN_PASSPHRASE:
from_secret: gpgsign_passphrase
depends_on:
- static

- name: release
pull: always
Expand All @@ -546,8 +528,6 @@ steps:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
depends_on:
- gpg-sign

- name: github
pull: always
Expand All @@ -558,8 +538,6 @@ steps:
environment:
GITHUB_TOKEN:
from_secret: github_token
depends_on:
- gpg-sign

---
kind: pipeline
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ vet:
$(GO) vet $(PACKAGES)

.PHONY: generate
generate:
generate: js css
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)

.PHONY: generate-swagger
Expand Down Expand Up @@ -384,14 +384,8 @@ check: test
install: $(wildcard *.go)
$(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'

.PHONY: go
go: go-check $(EXECUTABLE)

.PHONY: go-all
go-all: go-check generate go

.PHONY: build
build: js css go-all
build: go-check generate $(EXECUTABLE)

$(EXECUTABLE): $(GO_SOURCES)
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
Expand Down