refactor: drone ci prod pipeline
Diff
.drone.yml | 95 +++++++++++++++------------------------------------------------
1 file changed, 23 insertions(+), 72 deletions(-)
@@ -55,44 +55,31 @@ platform:
arch: amd64
steps:
- name: test
image: joseluisq/rust-linux-darwin-builder:1.52.1
volumes:
- name: cargo-target
path: /drone/src/target
- name: cargo-git
path: /root/.cargo/git
- name: cargo-registry
path: /root/.cargo/registry
commands:
- make test
when:
event:
- tag
- name: release
image: joseluisq/rust-linux-darwin-builder:1.52.1
volumes:
- name: cargo-target
path: /drone/src/target
- name: cargo-git
path: /root/.cargo/git
- name: cargo-registry
path: /root/.cargo/registry
commands:
- make prod.release
- name: publish-public-alpine
image: joseluisq/drone-docker
privileged: true
settings:
repo: joseluisq/static-web-server
dockerfile: ./docker/alpine/Dockerfile
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
auto_tag_suffix: alpine
- name: publish-scratch
- name: publish-public-scratch
image: joseluisq/drone-docker
privileged: true
settings:
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
repo: joseluisq/static-web-server
dockerfile: ./docker/scratch/Dockerfile
username:
from_secret: registry_username
from_secret: dockerhub_username
password:
from_secret: registry_password
from_secret: dockerhub_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
@@ -115,59 +102,23 @@ steps:
auto_tag: true
auto_tag_suffix: alpine
- name: github-release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- ./bin/*.tar.gz
- ./bin/*-SHA256SUM
title: ${DRONE_TAG}
draft: true
- name: publish-public-scratch
- name: publish-scratch
image: joseluisq/drone-docker
privileged: true
settings:
repo: joseluisq/static-web-server
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
dockerfile: ./docker/scratch/Dockerfile
username:
from_secret: dockerhub_username
from_secret: registry_username
password:
from_secret: dockerhub_password
from_secret: registry_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
auto_tag_aliases:
- latest
- name: publish-public-alpine
image: joseluisq/drone-docker
privileged: true
settings:
repo: joseluisq/static-web-server
dockerfile: ./docker/alpine/Dockerfile
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
auto_tag_suffix: alpine
volumes:
- name: cargo-target
host:
path: /var/ci-volumes/cargo-target
- name: cargo-git
host:
path: /var/ci-volumes/cargo-git
- name: cargo-registry
host:
path: /var/ci-volumes/cargo-registry
trigger:
ref:
include: