refactor: update ga pipelines
Diff
.drone.yml | 238 +------------------------------------
.github/workflows/devel.yml | 10 +--
.github/workflows/release.docker.yml | 4 +-
.github/workflows/release.yml | 6 +-
4 files changed, 7 insertions(+), 251 deletions(-)
@@ -1,238 +0,0 @@
---
kind: pipeline
type: docker
name: development
platform:
os: linux
arch: amd64
steps:
- name: test
image: joseluisq/rust-linux-darwin-builder:1.56.0
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
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:
event:
- push
- pull_request
branch:
- master
- develop
- feature/*
- bugfix/*
- hotfix/*
- 1.x
---
kind: pipeline
type: docker
name: production
platform:
os: linux
arch: amd64
steps:
- 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-public-scratch
image: joseluisq/drone-docker
privileged: true
settings:
repo: joseluisq/static-web-server
dockerfile: ./docker/scratch/Dockerfile
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
- name: publish-alpine
image: joseluisq/drone-docker
privileged: true
settings:
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
dockerfile: ./docker/alpine/Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
auto_tag_suffix: alpine
- name: publish-scratch
image: joseluisq/drone-docker
privileged: true
settings:
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
dockerfile: ./docker/scratch/Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
build_args:
- SERVER_VERSION=${DRONE_TAG##v}
auto_tag: true
trigger:
ref:
include:
- refs/tags/v*
exclude:
- refs/tags/**rc**
- refs/tags/**alpha**
- refs/tags/**beta**
- refs/tags/**latest**
- refs/tags/**dev**
---
kind: pipeline
type: docker
name: staging
platform:
os: linux
arch: amd64
steps:
- name: test
image: joseluisq/rust-linux-darwin-builder:1.56.0
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
- name: release
image: joseluisq/rust-linux-darwin-builder:1.56.0
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-scratch
image: joseluisq/drone-docker
privileged: true
settings:
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
dockerfile: ./docker/scratch/Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
tags:
- v1-dev
- name: publish-alpine
image: joseluisq/drone-docker
privileged: true
settings:
registry: registry.joseluisq.net
repo: registry.joseluisq.net/static-web-server
dockerfile: ./docker/alpine/Dockerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
tags:
- v1-dev-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:
target:
- staging
---
kind: pipeline
type: docker
name: notification
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: notify
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: ci-cd
depends_on:
- development
- staging
- production
trigger:
status:
- success
- failure
@@ -83,14 +83,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Use Cross
if: matrix.target != ''
@@ -115,11 +113,9 @@ jobs:
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Check formatting
@@ -10,7 +10,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Docker meta alpine
id: meta_alpine
@@ -57,7 +57,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Docker meta scratch
id: meta_scratch
@@ -98,16 +98,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Use Cross