2023-04-07 19:32:12 +02:00
|
|
|
type: docker
|
|
|
|
kind: pipeline
|
2023-04-07 19:32:55 +02:00
|
|
|
name: "shuttle-drone-templates"
|
2023-04-07 19:32:12 +02:00
|
|
|
steps:
|
2023-04-07 21:52:15 +02:00
|
|
|
- name: "wait for dind"
|
2023-04-07 21:04:20 +02:00
|
|
|
image: docker:dind
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
2023-04-07 21:06:37 +02:00
|
|
|
environment:
|
2023-04-08 12:11:12 +02:00
|
|
|
DOCKER_BUILDKIT: 1
|
2023-04-07 21:06:37 +02:00
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USERNAME:
|
|
|
|
from_secret: docker_username
|
2023-04-07 21:04:20 +02:00
|
|
|
commands:
|
|
|
|
- ls /var/run
|
|
|
|
- set -eu
|
|
|
|
- sleep 10
|
2023-04-07 21:41:46 +02:00
|
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME"
|
2023-04-07 19:32:12 +02:00
|
|
|
- name: "build"
|
2024-05-07 18:48:57 +02:00
|
|
|
image: docker.io/kasperhermansen/shuttle-drone:1690570181415
|
2023-04-07 19:32:12 +02:00
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
environment:
|
2023-04-07 21:51:10 +02:00
|
|
|
DOCKER_BUILDKIT: 1
|
2023-04-07 19:38:31 +02:00
|
|
|
DOCKER_PASSWORD:
|
2023-04-07 19:43:17 +02:00
|
|
|
from_secret: docker_password
|
2023-04-07 19:38:31 +02:00
|
|
|
DOCKER_USERNAME:
|
|
|
|
from_secret: docker_username
|
2023-04-07 21:51:10 +02:00
|
|
|
SSH_KEY:
|
|
|
|
from_secret: gitea_id_ed25519
|
2023-04-08 12:14:38 +02:00
|
|
|
DRONE_TOKEN:
|
|
|
|
from_secret: drone_token
|
2023-04-07 19:32:12 +02:00
|
|
|
commands:
|
2023-07-28 20:49:29 +02:00
|
|
|
- exit 0
|
2023-04-07 20:58:01 +02:00
|
|
|
- set -eu
|
2023-04-07 21:51:10 +02:00
|
|
|
- eval `ssh-agent`
|
|
|
|
- mkdir -p ~/.ssh
|
2023-04-07 21:52:59 +02:00
|
|
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
2023-04-07 21:52:15 +02:00
|
|
|
- chmod -R 600 ~/.ssh
|
2023-04-07 21:51:10 +02:00
|
|
|
- ssh-add
|
2023-04-07 20:56:35 +02:00
|
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
2023-04-07 19:32:12 +02:00
|
|
|
- shuttle run build
|
2023-04-08 12:14:38 +02:00
|
|
|
- shuttle run ci
|
2023-04-07 19:32:12 +02:00
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
temp: {}
|
2023-07-28 19:29:03 +02:00
|
|
|
---
|
|
|
|
type: docker
|
|
|
|
kind: pipeline
|
|
|
|
name: "release-please"
|
|
|
|
steps:
|
|
|
|
- name: release
|
2023-07-28 19:35:19 +02:00
|
|
|
image: marcoieni/release-plz:0.3.16
|
2023-07-28 19:29:03 +02:00
|
|
|
commands:
|
2023-07-28 21:06:28 +02:00
|
|
|
- mkdir -p .cargo
|
2023-07-28 20:00:13 +02:00
|
|
|
- |
|
2023-07-28 21:06:28 +02:00
|
|
|
cat <<EOF >> .cargo/config.toml
|
2023-07-28 20:00:13 +02:00
|
|
|
[registry]
|
|
|
|
default = "gitea"
|
|
|
|
|
|
|
|
[registries.gitea]
|
2023-07-28 20:48:10 +02:00
|
|
|
index = "https://git.front.kjuulh.io/kjuulh/_cargo-index.git"
|
2023-07-28 20:00:13 +02:00
|
|
|
|
2023-07-28 21:03:55 +02:00
|
|
|
#[net]
|
|
|
|
#git-fetch-with-cli = true
|
2023-07-28 20:00:13 +02:00
|
|
|
EOF
|
2023-07-28 20:41:43 +02:00
|
|
|
- |
|
2023-07-28 21:06:28 +02:00
|
|
|
cat <<EOF >> .cargo/credentials.toml
|
2023-07-28 20:41:43 +02:00
|
|
|
[registries.gitea]
|
|
|
|
token = "Bearer $GIT_TOKEN"
|
|
|
|
EOF
|
2023-07-28 20:28:46 +02:00
|
|
|
- release-plz release-pr --git-token="$GIT_TOKEN" --backend gitea --registry gitea
|
2023-07-28 19:40:21 +02:00
|
|
|
environment:
|
2023-07-28 19:37:56 +02:00
|
|
|
GIT_TOKEN:
|
2023-07-28 19:29:03 +02:00
|
|
|
from_secret: gitea_token
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
- main
|