2023-04-07 19:32:12 +02:00
|
|
|
type: docker
|
|
|
|
kind: pipeline
|
2023-04-08 12:11:12 +02:00
|
|
|
name: "shuttle-drone-templates"
|
2023-04-07 19:32:12 +02:00
|
|
|
steps:
|
2023-04-08 12:11:12 +02:00
|
|
|
- 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
|
2023-04-08 12:38:50 +02:00
|
|
|
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username="$${DOCKER_USERNAME}"
|
2023-04-07 19:32:12 +02:00
|
|
|
- name: "build"
|
2024-11-01 03:16:33 +01:00
|
|
|
image: docker.io/kasperhermansen/shuttle-drone:1690570181415
|
2023-04-07 19:32:12 +02:00
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
environment:
|
|
|
|
DOCKER_BUILDKIT: 1
|
2023-04-08 12:11:12 +02:00
|
|
|
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
|
2023-04-07 19:32:12 +02:00
|
|
|
commands:
|
2023-04-08 12:11:12 +02:00
|
|
|
- set -eu
|
|
|
|
- eval `ssh-agent`
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
|
|
|
- chmod -R 600 ~/.ssh
|
|
|
|
- ssh-add
|
2023-04-08 12:36:49 +02:00
|
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
|
|
|
- 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: {}
|