2022-08-14 21:06:40 +02:00
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
type: docker
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: load_secret
|
|
|
|
image: debian:buster-slim
|
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
path: /root/.ssh/
|
|
|
|
environment:
|
|
|
|
SSH_KEY:
|
|
|
|
from_secret: gitea_id_ed25519
|
|
|
|
commands:
|
|
|
|
- mkdir -p $HOME/.ssh/
|
2022-08-21 16:59:40 +02:00
|
|
|
- echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519
|
2022-08-14 21:06:40 +02:00
|
|
|
- ls $HOME/.ssh/
|
|
|
|
- cat $HOME/.ssh/id_ed25519
|
|
|
|
|
|
|
|
- name: build
|
2022-08-14 21:10:03 +02:00
|
|
|
image: kasperhermansen/cuddle:latest
|
2022-08-14 21:06:40 +02:00
|
|
|
pull: always
|
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
path: /root/.ssh/
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
commands:
|
2023-07-27 15:25:39 +02:00
|
|
|
- eval `ssh-agent`
|
2023-07-27 15:26:26 +02:00
|
|
|
- chmod -r 600 ~/.ssh
|
2023-07-27 15:24:04 +02:00
|
|
|
- ssh-add
|
2023-07-27 01:33:57 +02:00
|
|
|
- cuddle x build_cuddle_image
|
2022-08-14 21:06:40 +02:00
|
|
|
environment:
|
|
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
DOCKER_USERNAME:
|
|
|
|
from_secret: docker_username
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
2023-07-27 15:04:46 +02:00
|
|
|
CUDDLE_SECRETS_PROVIDER: 1password
|
|
|
|
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
|
2023-07-27 15:24:53 +02:00
|
|
|
CUDDLE_SSH_AGENT: "true"
|
2023-07-27 15:04:46 +02:00
|
|
|
OP_SERVICE_ACCOUNT_TOKEN:
|
|
|
|
from_secret: op_service_account_token
|
|
|
|
|
2022-08-14 21:06:40 +02:00
|
|
|
depends_on:
|
|
|
|
- "load_secret"
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: dockersock
|
|
|
|
path: /var/run
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: ssh
|
|
|
|
temp: {}
|
|
|
|
- name: dockersock
|
|
|
|
temp: {}
|