2022-08-31 18:19:30 -04:00
|
|
|
pipeline:
|
2022-09-01 23:49:12 -04:00
|
|
|
tests:
|
2022-08-31 18:19:30 -04:00
|
|
|
image: rust:1.63
|
|
|
|
commands:
|
2022-09-02 02:24:39 -04:00
|
|
|
- "apt update"
|
|
|
|
- "apt install -y lsof"
|
2022-09-01 23:49:12 -04:00
|
|
|
- "cargo test"
|
2022-08-31 18:19:30 -04:00
|
|
|
|
|
|
|
build_release:
|
|
|
|
image: rust:1.63
|
|
|
|
commands:
|
|
|
|
- "cargo install cargo-deb cargo-generate-rpm"
|
|
|
|
- "cargo build --release"
|
|
|
|
- "cargo deb"
|
|
|
|
- "cargo generate-rpm"
|
2022-09-02 02:04:07 -04:00
|
|
|
- "mv target/release/zealot target/release/zealot-${CI_COMMIT_TAG}-linux-x86_64"
|
2022-08-31 18:19:30 -04:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
gitea_release:
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_api_key
|
|
|
|
base_url: https://git.metaunix.net
|
|
|
|
files:
|
|
|
|
- "target/release/*${CI_COMMIT_TAG}-linux-x86_64"
|
2022-09-02 02:04:07 -04:00
|
|
|
- "target/debian/zealot*.deb"
|
|
|
|
- "target/generate-rpm/zealot*.rpm"
|
2022-08-31 18:19:30 -04:00
|
|
|
title: "${CI_COMMIT_TAG}"
|
|
|
|
when:
|
|
|
|
event: tag
|
2022-10-26 15:42:19 -04:00
|
|
|
|
|
|
|
copy_deb_package:
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: "repo.int.metaunix.net"
|
|
|
|
username:
|
|
|
|
from_secret: repo_admin
|
|
|
|
password:
|
|
|
|
from_secret: repo_password
|
|
|
|
port: 22
|
2022-10-26 20:13:04 -04:00
|
|
|
target: /srv/repo/apt/zealot/
|
2022-10-26 16:59:42 -04:00
|
|
|
source: target/debian/zealot*.deb
|
2022-10-26 16:25:35 -04:00
|
|
|
strip_components: 2
|
2022-10-26 15:42:19 -04:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
copy_rpm_package:
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: "repo.int.metaunix.net"
|
|
|
|
username:
|
|
|
|
from_secret: repo_admin
|
|
|
|
password:
|
|
|
|
from_secret: repo_password
|
|
|
|
port: 22
|
2022-10-26 20:13:04 -04:00
|
|
|
target: /srv/repo/dnf/zealot/
|
2022-10-26 16:59:42 -04:00
|
|
|
source: target/generate-rpm/zealot*.rpm
|
2022-10-26 16:25:35 -04:00
|
|
|
strip_components: 2
|
2022-10-26 15:42:19 -04:00
|
|
|
when:
|
|
|
|
event: tag
|
2022-10-26 16:25:35 -04:00
|
|
|
|
|
|
|
update_repos:
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
- repo.int.metaunix.net
|
|
|
|
username:
|
|
|
|
from_secret: repo_admin
|
|
|
|
password:
|
|
|
|
from_secret: repo_password
|
|
|
|
port: 22
|
|
|
|
command_timeout: 2m
|
|
|
|
script:
|
2022-10-26 16:35:49 -04:00
|
|
|
- "sudo /home/xadmin/scripts/update_repo.sh"
|
|
|
|
when:
|
|
|
|
event: tag
|