add initial files
This commit is contained in:
99
.drone.yml
Normal file
99
.drone.yml
Normal file
@@ -0,0 +1,99 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
||||
concurrency:
|
||||
limit: 1
|
||||
|
||||
workspace:
|
||||
path: /drone/src
|
||||
|
||||
steps:
|
||||
- name: checkout submodule
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
- name: checkout tag
|
||||
image: alpine/git
|
||||
commands:
|
||||
- cd ox
|
||||
- git fetch --all --tags
|
||||
- git checkout tags/${DRONE_TAG}
|
||||
depends_on:
|
||||
- "checkout submodule"
|
||||
- name: cargo build
|
||||
image: rust:latest
|
||||
commands:
|
||||
- cd ox
|
||||
- cargo build --release --target x86_64-unknown-linux-gnu
|
||||
- cd target/x86_64-unknown-linux-gnu/release
|
||||
depends_on:
|
||||
- "checkout tag"
|
||||
- name: build slackware package
|
||||
image: vbatts/slackware:14.2
|
||||
commands:
|
||||
- mkdir -p dist/usr/sbin
|
||||
- cp ox/target/x86_64-unknown-linux-gnu/release/ox ./dist/usr/sbin/ox
|
||||
- cp -R ./usr ./dist
|
||||
- chmod +x ./dist/usr/sbin/ox
|
||||
- cd dist
|
||||
- makepkg -l y -c y ../unraid-ox-${DRONE_TAG}.txz
|
||||
depends_on:
|
||||
- "cargo build"
|
||||
- name: prepare release
|
||||
image: vbatts/slackware:14.2
|
||||
commands:
|
||||
- echo "ox ${DRONE_TAG} - built@$(date '+%FT%TZ') [Drone ${DRONE_SYSTEM_VERSION}]" > ./release_note
|
||||
- cat ./release_note
|
||||
depends_on:
|
||||
- "build slackware package"
|
||||
- name: publish gitea release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: GITEA_KEY
|
||||
base_url: https://git.panaetius.co.uk
|
||||
files:
|
||||
- ./unraid-ox-${DRONE_TAG}.txz
|
||||
checksum:
|
||||
- md5
|
||||
title: ${DRONE_TAG}
|
||||
note: ./release_note
|
||||
file_exists: "skip"
|
||||
when:
|
||||
event: tag
|
||||
depends_on:
|
||||
- "prepare release"
|
||||
- name: publish github release
|
||||
image: plugins/github-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: GITHUB_KEY
|
||||
files:
|
||||
- ./unraid-ox-${DRONE_TAG}.txz
|
||||
checksum:
|
||||
- md5
|
||||
title: ${DRONE_TAG}
|
||||
note: ./release_note
|
||||
file_exists: "skip"
|
||||
when:
|
||||
event: tag
|
||||
depends_on:
|
||||
- "prepare release"
|
||||
- name: slack
|
||||
image: plugins/slack
|
||||
settings:
|
||||
webhook:
|
||||
from_secret: BUILD_STATUS_SLACK_WEBHOOK
|
||||
username: drone
|
||||
when:
|
||||
status:
|
||||
- "success"
|
||||
- "failure"
|
||||
depends_on:
|
||||
- "publish gitea release"
|
||||
- "publish github release"
|
||||
Reference in New Issue
Block a user