Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
6cb913bb1f
commit
66fc0c9895
55
.drone.yml
Normal file
55
.drone.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
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:1683325750924
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DRONE_TOKEN:
|
||||||
|
from_secret: drone_token
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: gitea_id_ed25519
|
||||||
|
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
|
||||||
|
- (cd ci; cargo build)
|
||||||
|
- ./ci/target/debug/ci
|
||||||
|
services:
|
||||||
|
- name: docker
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
temp: {}
|
Loading…
Reference in New Issue
Block a user