Skip to content

Commit 7217b70

Browse files
silverwindtechknowlogick
authored andcommitted
Combine Drone release steps (#9338)
* Combine Drone release steps Fixes missing JS/CSS because drone did unwanted parallelization of the js/css task and the generate task. Combined the tasks into one and made 'make release' work standalone. Fixes: #9324 Fixes: #9362 * move js/css to generate dependencies * remove unneccessary go-all target * remove go target as well
1 parent 60b31c8 commit 7217b70

File tree

2 files changed

+6
-34
lines changed

2 files changed

+6
-34
lines changed

.drone.yml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,12 @@ steps:
388388
commands:
389389
- git fetch --tags --force
390390

391-
- name: build
392-
pull: always
393-
image: node:10 # this step is kept at the lowest version of node that we support
394-
commands:
395-
- make css
396-
- make js
397-
398391
- name: static
399392
pull: always
400393
image: techknowlogick/xgo:latest
401394
commands:
395+
- apt update && apt -y install curl
396+
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
402397
- export PATH=$PATH:$GOPATH/bin
403398
- make release
404399
environment:
@@ -419,8 +414,6 @@ steps:
419414
from_secret: gpgsign_key
420415
GPGSIGN_PASSPHRASE:
421416
from_secret: gpgsign_passphrase
422-
depends_on:
423-
- static
424417

425418
- name: release-branch-release
426419
pull: always
@@ -438,8 +431,6 @@ steps:
438431
from_secret: aws_access_key_id
439432
AWS_SECRET_ACCESS_KEY:
440433
from_secret: aws_secret_access_key
441-
depends_on:
442-
- gpg-sign
443434
when:
444435
branch:
445436
- "release/*"
@@ -462,8 +453,6 @@ steps:
462453
from_secret: aws_access_key_id
463454
AWS_SECRET_ACCESS_KEY:
464455
from_secret: aws_secret_access_key
465-
depends_on:
466-
- gpg-sign
467456
when:
468457
branch:
469458
- master
@@ -496,17 +485,12 @@ steps:
496485
commands:
497486
- git fetch --tags --force
498487

499-
- name: build
500-
pull: always
501-
image: node:10 # this step is kept at the lowest version of node that we support
502-
commands:
503-
- make css
504-
- make js
505-
506488
- name: static
507489
pull: always
508490
image: techknowlogick/xgo:latest
509491
commands:
492+
- apt update && apt -y install curl
493+
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
510494
- export PATH=$PATH:$GOPATH/bin
511495
- make release
512496
environment:
@@ -527,8 +511,6 @@ steps:
527511
from_secret: gpgsign_key
528512
GPGSIGN_PASSPHRASE:
529513
from_secret: gpgsign_passphrase
530-
depends_on:
531-
- static
532514

533515
- name: release
534516
pull: always
@@ -546,8 +528,6 @@ steps:
546528
from_secret: aws_access_key_id
547529
AWS_SECRET_ACCESS_KEY:
548530
from_secret: aws_secret_access_key
549-
depends_on:
550-
- gpg-sign
551531

552532
- name: github
553533
pull: always
@@ -558,8 +538,6 @@ steps:
558538
environment:
559539
GITHUB_TOKEN:
560540
from_secret: github_token
561-
depends_on:
562-
- gpg-sign
563541

564542
---
565543
kind: pipeline

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ vet:
128128
$(GO) vet $(PACKAGES)
129129

130130
.PHONY: generate
131-
generate:
131+
generate: js css
132132
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
133133

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

387-
.PHONY: go
388-
go: go-check $(EXECUTABLE)
389-
390-
.PHONY: go-all
391-
go-all: go-check generate go
392-
393387
.PHONY: build
394-
build: js css go-all
388+
build: go-check generate $(EXECUTABLE)
395389

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

0 commit comments

Comments
 (0)