1
0

Add downloading assets when building docker images

This commit is contained in:
kolaente
2020-12-16 20:23:38 +01:00
parent 66d4738ec5
commit 3346fe00eb
2 changed files with 67 additions and 35 deletions

View File

@ -294,6 +294,10 @@ kind: pipeline
type: docker
name: docker-arm-release
depends_on:
- release-latest
- release-version
platform:
os: linux
arch: arm
@ -304,12 +308,7 @@ trigger:
- "refs/tags/**"
steps:
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags
- name: docker
- name: docker-latest
image: plugins/docker:linux-arm
pull: true
settings:
@ -320,8 +319,30 @@ steps:
repo: vikunja/frontend
auto_tag: true
auto_tag_suffix: linux-arm
depends_on:
- fetch-tags
build_args:
- USE_RELEASE=true
- RELEASE_VERSION=master
when:
ref:
- refs/heads/master
- name: docker-version
image: plugins/docker:linux-arm
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/frontend
auto_tag: true
auto_tag_suffix: linux-arm
build_args:
- USE_RELEASE=true
- RELEASE_VERSION=${DRONE_TAG##v}
when:
ref:
- "refs/tags/**"
---
kind: pipeline
@ -332,36 +353,17 @@ platform:
os: linux
arch: amd64
depends_on:
- release-latest
- release-version
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
steps:
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags
- name: restore-cache
image: meltwater/drone-cache:dev
pull: true
environment:
AWS_ACCESS_KEY_ID:
from_secret: cache_aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: cache_aws_secret_access_key
settings:
restore: true
bucket: kolaente.dev-drone-dependency-cache
endpoint: https://s3.fr-par.scw.cloud
region: fr-par
path_style: true
cache_key: '{{ .Repo.Name }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}'
mount:
- '.cache'
- name: docker
- name: docker-latest
image: plugins/docker:linux-amd64
pull: true
settings:
@ -372,9 +374,30 @@ steps:
repo: vikunja/frontend
auto_tag: true
auto_tag_suffix: linux-amd64
depends_on:
- fetch-tags
- restore-cache
build_args:
- USE_RELEASE=true
- RELEASE_VERSION=master
when:
ref:
- refs/heads/master
- name: docker-version
image: plugins/docker:linux-amd64
pull: true
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/frontend
auto_tag: true
auto_tag_suffix: linux-amd64
build_args:
- USE_RELEASE=true
- RELEASE_VERSION=${DRONE_TAG##v}
when:
ref:
- "refs/tags/**"
---
kind: pipeline