This commit is contained in:
commit
017cf5f58a
87
.drone.yml
Normal file
87
.drone.yml
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Build CoreOS Installer
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- custom
|
||||
- cron
|
||||
|
||||
steps:
|
||||
- name: Pull Cache
|
||||
image: plugins/s3-cache
|
||||
settings:
|
||||
pull: true
|
||||
endpoint: https://s3.tobiasmanske.de
|
||||
root: cache
|
||||
access_key:
|
||||
from_secret: minio_access_key
|
||||
secret_key:
|
||||
from_secret: minio_secret_key
|
||||
restore: true
|
||||
|
||||
- name: Build Binary
|
||||
depends_on:
|
||||
- Pull Cache
|
||||
image: rust:1-bullseye # Same OS that runs the hetzner recovery
|
||||
pull: always
|
||||
environment:
|
||||
CARGO_HOME: ./.cargo
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y build-essential libssl-dev libzstd-dev pkg-config
|
||||
- cargo install --bin=coreos-installer --target=x86_64-unknown-linux-gnu coreos-installer
|
||||
|
||||
- name: Upload Binary
|
||||
depends_on:
|
||||
- Build Binary
|
||||
image: plugins/s3
|
||||
settings:
|
||||
endpoint: https://s3.tobiasmanske.de
|
||||
path_style: true
|
||||
bucket: public
|
||||
access_key:
|
||||
from_secret: minio_access_key
|
||||
secret_key:
|
||||
from_secret: minio_secret_key
|
||||
source: .cargo/bin/coreos-installer
|
||||
strip_prefix: .cargo/bin
|
||||
target: /${DRONE_REPO}/${DRONE_REPO_BRANCH}
|
||||
|
||||
- name: Upload Artifact to Gitea
|
||||
depends_on:
|
||||
- Build Binary
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_api_token
|
||||
checksum: sha256
|
||||
base_url: https://git.tobiasmanske.de
|
||||
files: .cargo/bin/coreos-installer
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: Push Cache
|
||||
depends_on:
|
||||
- Build Binary
|
||||
image: plugins/s3-cache
|
||||
settings:
|
||||
pull: true
|
||||
endpoint: https://s3.tobiasmanske.de
|
||||
root: cache
|
||||
access_key:
|
||||
from_secret: minio_access_key
|
||||
secret_key:
|
||||
from_secret: minio_secret_key
|
||||
rebuild: true
|
||||
mount:
|
||||
- .cargo
|
||||
|
||||
image_pull_secrets:
|
||||
- registry
|
Loading…
Reference in New Issue
Block a user