index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2022-06-26 20:44:03.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2022-06-26 20:44:03.0 +00:00:00
commit
ef7aff1dcb3e7b7cde7d14f77057a4f87c8c73ab [patch]
tree
fd485a0273fa7253029f37d8de149a161eaeb394
parent
7865c28718801987172914ef7994e463330fc726
download
ef7aff1dcb3e7b7cde7d14f77057a4f87c8c73ab.tar.gz

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(-)

diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index 7b0debd..0000000
--- a/.drone.yml
+++ /dev/null
@@ -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
diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml
index c5f7d62..f56979a 100644
--- a/.github/workflows/devel.yml
+++ b/.github/workflows/devel.yml
@@ -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
diff --git a/.github/workflows/release.docker.yml b/.github/workflows/release.docker.yml
index 7aa0fcc..a141c51 100644
--- a/.github/workflows/release.docker.yml
+++ b/.github/workflows/release.docker.yml
@@ -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
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 57d75a1..60c262f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -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