kjuulh
467b94fb5a
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
97 lines
2.3 KiB
YAML
97 lines
2.3 KiB
YAML
type: docker
|
|
kind: pipeline
|
|
name: "shuttle-drone-templates"
|
|
steps:
|
|
- name: "wait for dind"
|
|
image: docker:dind
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
environment:
|
|
DOCKER_BUILDKIT: 1
|
|
DOCKER_PASSWORD:
|
|
from_secret: docker_password
|
|
DOCKER_USERNAME:
|
|
from_secret: docker_username
|
|
commands:
|
|
- ls /var/run
|
|
- set -eu
|
|
- sleep 10
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME"
|
|
- name: "build"
|
|
image: docker.io/kasperhermansen/shuttle-drone:1690561756917
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
environment:
|
|
DOCKER_BUILDKIT: 1
|
|
DOCKER_PASSWORD:
|
|
from_secret: docker_password
|
|
DOCKER_USERNAME:
|
|
from_secret: docker_username
|
|
SSH_KEY:
|
|
from_secret: gitea_id_ed25519
|
|
DRONE_TOKEN:
|
|
from_secret: drone_token
|
|
commands:
|
|
- set -eu
|
|
- eval `ssh-agent`
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
|
- chmod -R 600 ~/.ssh
|
|
- ssh-add
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
|
- shuttle run build
|
|
- shuttle run ci
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|
|
---
|
|
type: docker
|
|
kind: pipeline
|
|
name: "release-please"
|
|
steps:
|
|
- name: release
|
|
image: marcoieni/release-plz:0.3.16
|
|
commands:
|
|
- set -eu
|
|
- eval `ssh-agent`
|
|
- mkdir -p ~/.ssh
|
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
|
- chmod -R 600 ~/.ssh
|
|
- ssh-add
|
|
- mkdir -p .cargo
|
|
- |
|
|
cat <<EOF >> .cargo/config.toml
|
|
[registry]
|
|
default = "gitea"
|
|
|
|
[registries.gitea]
|
|
index = "git@git.i.kjuulh.io:kjuulh/_cargo-index.git"
|
|
|
|
[net]
|
|
git-fetch-with-cli = true
|
|
EOF
|
|
- |
|
|
cat <<EOF >> .cargo/credentials.toml
|
|
[registries.gitea]
|
|
token = "Bearer $GIT_TOKEN"
|
|
EOF
|
|
- release-plz release-pr --git-token="$GIT_TOKEN" --backend gitea --registry gitea
|
|
environment:
|
|
GIT_TOKEN:
|
|
from_secret: gitea_token
|
|
SSH_KEY:
|
|
from_secret: gitea_id_ed25519
|
|
when:
|
|
branch:
|
|
- master
|
|
- main
|