53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
type: docker
|
|
kind: pipeline
|
|
name: "shuttle-drone-templates"
|
|
steps:
|
|
- name: test
|
|
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:1680894029336
|
|
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
|
|
commands:
|
|
- set -eu
|
|
- eval `ssh-agent`
|
|
- mkdir -p ~/.ssh
|
|
- chmod -R 600 ~/.ssh
|
|
- echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
|
- ssh-add
|
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
|
- shuttle run build
|
|
services:
|
|
- name: docker
|
|
image: docker:dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|