2020-10-09 18:02:58 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
|
|
|
pull: always
|
|
|
|
image: rust:1.47-slim-buster
|
|
|
|
commands:
|
|
|
|
- apt-get update -y
|
2020-10-09 18:06:50 +00:00
|
|
|
- apt-get install -y wget libssl-dev pkg-config
|
2020-10-09 18:02:58 +00:00
|
|
|
- wget -O sccache.tar.gz https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
|
|
|
|
- tar zxvf sccache.tar.gz
|
|
|
|
- export RUSTC_WRAPPER=$(pwd)/sccache-0.2.13-x86_64-unknown-linux-musl/sccache
|
|
|
|
- cargo build --release
|
|
|
|
- $(pwd)/sccache-0.2.13-x86_64-unknown-linux-musl/sccache --show-stats
|
|
|
|
- cp ./target/release/weasyl-watcher ./weasyl-watcher
|
|
|
|
environment:
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: sccache_s3_access_key
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: sccache_s3_secret_key
|
|
|
|
SCCACHE_BUCKET: cache
|
|
|
|
SCCACHE_ENDPOINT:
|
|
|
|
from_secret: sccache_s3_endpoint
|
|
|
|
SCCACHE_S3_USE_SSL: true
|
|
|
|
|
|
|
|
- name: docker
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2020-10-09 18:17:27 +00:00
|
|
|
tags:
|
|
|
|
- latest
|
2020-10-09 18:02:58 +00:00
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
registry: registry.huefox.com
|
|
|
|
repo: registry.huefox.com/weasyl-watcher
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
|
|
|
|
...
|