feat: update template
Some checks reported errors
continuous-integration/drone/push Build was killed

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-03-30 02:02:41 +01:00
parent 0e5f4a0e91
commit 762d6c3bdc
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
3 changed files with 32 additions and 35 deletions

8
Cargo.lock generated
View File

@ -307,7 +307,7 @@ dependencies = [
[[package]]
name = "cuddle-ci"
version = "0.2.0"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#ef77451bb7f6e3bc32fd873d5571fa8702836b92"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#365b840fe983eeec97c8d3662d46db0ef524ee44"
dependencies = [
"async-trait",
"chrono",
@ -340,12 +340,12 @@ dependencies = [
[[package]]
name = "dagger-components"
version = "0.1.0"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#ef77451bb7f6e3bc32fd873d5571fa8702836b92"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#365b840fe983eeec97c8d3662d46db0ef524ee44"
[[package]]
name = "dagger-cuddle-please"
version = "0.2.0"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#ef77451bb7f6e3bc32fd873d5571fa8702836b92"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#365b840fe983eeec97c8d3662d46db0ef524ee44"
dependencies = [
"async-trait",
"dagger-sdk",
@ -355,7 +355,7 @@ dependencies = [
[[package]]
name = "dagger-rust"
version = "0.2.0"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#ef77451bb7f6e3bc32fd873d5571fa8702836b92"
source = "git+https://git.front.kjuulh.io/kjuulh/dagger-components?branch=main#365b840fe983eeec97c8d3662d46db0ef524ee44"
dependencies = [
"async-trait",
"dagger-sdk",

View File

@ -35,7 +35,7 @@ async fn main() -> eyre::Result<()> {
let drone_templater = Arc::new(Mutex::new(drone_templater::DroneTemplater::new(
client,
"cuddle-rust-cli-plan.yaml",
"templates/cuddle-rust-cli-plan.yaml",
)));
CuddleCI::default()

View File

@ -3,22 +3,6 @@ name: default
type: docker
steps:
- name: build ci
image: rustlang/rust:nightly
volumes:
- name: ci
path: /mnt/ci
environment:
PKG_CONFIG_SYSROOT_DIR: "/"
CI_PREFIX: "/mnt/ci"
commands:
- set -e
- apt update
- apt install musl-tools pkg-config libssl-dev openssl build-essential musl-dev -y
- rustup target add x86_64-unknown-linux-musl
- cargo build --target=x86_64-unknown-linux-musl -p ci --bin ci
- mv target/x86_64-unknown-linux-musl/debug/ci "$CI_PREFIX/ci"
- name: load_secret
image: debian:buster-slim
volumes:
@ -42,20 +26,31 @@ steps:
- chmod 700 ~/.ssh/config
- name: build pr
image: kasperhermansen/cuddle:latest
image: kasperhermansen/cuddle-rust-cli-plan:main-1711754276
pull: always
volumes:
- name: ssh
path: /root/.ssh/
- name: ci
path: /mnt/ci
commands:
- eval `ssh-agent`
- ssh-add
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
- apk add git
- $CI_PREFIX pr
- export CLUSTER=clank-dev
- cuddle --version
- cuddle-rust-cli-plan pr
environment:
DRONE_HOST: "https://ci.i.kjuulh.io"
DRONE_USER: "kjuulh"
DRONE_TOKEN:
from_secret: drone_token
REGISTRY_CACHE_USERNAME:
from_secret: registry_cache_username
REGISTRY_CACHE_PASSWORD:
from_secret: registry_cache_password
REGISTRY_CACHE_TOKEN:
from_secret: registry_cache_token
REGISTRY_CACHE_url:
from_secret: registry_cache_url
DOCKER_BUILDKIT: 1
DOCKER_PASSWORD:
from_secret: docker_password
@ -64,7 +59,10 @@ steps:
CUDDLE_SECRETS_PROVIDER: 1password
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
CUDDLE_SSH_AGENT: "true"
GIT_PASSWORD:
from_secret: git_password
CI_PREFIX: "/mnt/ci/ci"
DOCKER_HOST: "tcp://192.168.1.233:2376"
CUDDLE_PLEASE_TOKEN:
from_secret: cuddle_please_token
OP_SERVICE_ACCOUNT_TOKEN:
@ -77,23 +75,24 @@ steps:
- master
depends_on:
- "load_secret"
- "build ci"
- name: build main
image: kasperhermansen/cuddle:latest
image: kasperhermansen/cuddle-rust-cli-plan:main-1711754276
pull: always
volumes:
- name: ssh
path: /root/.ssh/
- name: ci
path: /mnt/ci
commands:
- eval `ssh-agent`
- ssh-add
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
- apk add git
- $CI_PREFIX main
- export CLUSTER=clank-prod
- cuddle-rust-cli-plan main
environment:
DRONE_HOST: "https://ci.i.kjuulh.io"
DRONE_USER: "kjuulh"
DRONE_TOKEN:
from_secret: drone_token
REGISTRY_CACHE_USERNAME:
from_secret: registry_cache_username
REGISTRY_CACHE_PASSWORD:
@ -128,10 +127,8 @@ steps:
- pull_request
depends_on:
- "load_secret"
- "build ci"
volumes:
- name: ssh
temp: {}
- name: ci
temp: {}