2023-07-24 10:26:55 +02:00
|
|
|
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"
|
2023-07-28 11:07:41 +02:00
|
|
|
image: docker.io/kasperhermansen/shuttle-drone:1690534517371
|
2023-07-24 10:26:55 +02:00
|
|
|
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
|
2023-07-24 10:58:39 +02:00
|
|
|
GIT_USERNAME:
|
|
|
|
from_secret: GIT_USERNAME
|
|
|
|
GIT_PASSWORD:
|
|
|
|
from_secret: GIT_PASSWORD
|
2023-07-24 10:26:55 +02:00
|
|
|
commands:
|
|
|
|
- set -eu
|
2023-07-24 10:52:13 +02:00
|
|
|
- apt update && apt install -y libssl-dev pkg-config openssl # musl-tools
|
2023-07-24 10:26:55 +02:00
|
|
|
- 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
|
2023-07-24 10:52:13 +02:00
|
|
|
#- rustup target add x86_64-unknown-linux-musl
|
2023-07-24 10:30:38 +02:00
|
|
|
- cd ci || exit 1
|
2023-07-24 10:52:13 +02:00
|
|
|
- cargo build
|
2023-07-24 10:30:38 +02:00
|
|
|
- cd - || exit 1
|
2023-07-24 10:52:13 +02:00
|
|
|
# - sha1sum ci/target/x86_64-unknown-linux-musl/debug/ci
|
|
|
|
# - ldd ci/target/x86_64-unknown-linux-musl/debug/ci
|
|
|
|
# - "./ci/target/x86_64-unknown-linux-musl/debug/ci"
|
|
|
|
- sha1sum ci/target/debug/ci
|
|
|
|
- ldd ci/target/debug/ci
|
|
|
|
- "./ci/target/debug/ci"
|
2023-07-24 10:26:55 +02:00
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
2023-07-24 10:58:39 +02:00
|
|
|
temp: {}
|