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]] [[package]]
name = "cuddle-ci" name = "cuddle-ci"
version = "0.2.0" 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 = [ dependencies = [
"async-trait", "async-trait",
"chrono", "chrono",
@ -340,12 +340,12 @@ dependencies = [
[[package]] [[package]]
name = "dagger-components" name = "dagger-components"
version = "0.1.0" 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]] [[package]]
name = "dagger-cuddle-please" name = "dagger-cuddle-please"
version = "0.2.0" 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 = [ dependencies = [
"async-trait", "async-trait",
"dagger-sdk", "dagger-sdk",
@ -355,7 +355,7 @@ dependencies = [
[[package]] [[package]]
name = "dagger-rust" name = "dagger-rust"
version = "0.2.0" 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 = [ dependencies = [
"async-trait", "async-trait",
"dagger-sdk", "dagger-sdk",

View File

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

View File

@ -3,22 +3,6 @@ name: default
type: docker type: docker
steps: 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 - name: load_secret
image: debian:buster-slim image: debian:buster-slim
volumes: volumes:
@ -42,20 +26,31 @@ steps:
- chmod 700 ~/.ssh/config - chmod 700 ~/.ssh/config
- name: build pr - name: build pr
image: kasperhermansen/cuddle:latest image: kasperhermansen/cuddle-rust-cli-plan:main-1711754276
pull: always pull: always
volumes: volumes:
- name: ssh - name: ssh
path: /root/.ssh/ path: /root/.ssh/
- name: ci
path: /mnt/ci
commands: commands:
- eval `ssh-agent` - eval `ssh-agent`
- ssh-add - ssh-add
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io - echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
- apk add git - export CLUSTER=clank-dev
- $CI_PREFIX pr - cuddle --version
- cuddle-rust-cli-plan pr
environment: 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_BUILDKIT: 1
DOCKER_PASSWORD: DOCKER_PASSWORD:
from_secret: docker_password from_secret: docker_password
@ -64,7 +59,10 @@ steps:
CUDDLE_SECRETS_PROVIDER: 1password CUDDLE_SECRETS_PROVIDER: 1password
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci" CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
CUDDLE_SSH_AGENT: "true" CUDDLE_SSH_AGENT: "true"
GIT_PASSWORD:
from_secret: git_password
CI_PREFIX: "/mnt/ci/ci" CI_PREFIX: "/mnt/ci/ci"
DOCKER_HOST: "tcp://192.168.1.233:2376"
CUDDLE_PLEASE_TOKEN: CUDDLE_PLEASE_TOKEN:
from_secret: cuddle_please_token from_secret: cuddle_please_token
OP_SERVICE_ACCOUNT_TOKEN: OP_SERVICE_ACCOUNT_TOKEN:
@ -77,23 +75,24 @@ steps:
- master - master
depends_on: depends_on:
- "load_secret" - "load_secret"
- "build ci"
- name: build main - name: build main
image: kasperhermansen/cuddle:latest image: kasperhermansen/cuddle-rust-cli-plan:main-1711754276
pull: always pull: always
volumes: volumes:
- name: ssh - name: ssh
path: /root/.ssh/ path: /root/.ssh/
- name: ci
path: /mnt/ci
commands: commands:
- eval `ssh-agent` - eval `ssh-agent`
- ssh-add - ssh-add
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io - echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
- apk add git - export CLUSTER=clank-prod
- $CI_PREFIX main - cuddle-rust-cli-plan main
environment: environment:
DRONE_HOST: "https://ci.i.kjuulh.io"
DRONE_USER: "kjuulh"
DRONE_TOKEN:
from_secret: drone_token
REGISTRY_CACHE_USERNAME: REGISTRY_CACHE_USERNAME:
from_secret: registry_cache_username from_secret: registry_cache_username
REGISTRY_CACHE_PASSWORD: REGISTRY_CACHE_PASSWORD:
@ -128,10 +127,8 @@ steps:
- pull_request - pull_request
depends_on: depends_on:
- "load_secret" - "load_secret"
- "build ci"
volumes: volumes:
- name: ssh - name: ssh
temp: {} temp: {}
- name: ci
temp: {}