Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
184d74bc5d
commit
2b5bc3d66f
41
.drone.yml
41
.drone.yml
@ -54,6 +54,7 @@ steps:
|
||||
- ssh-add
|
||||
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
||||
- apk add git
|
||||
- cuddle --version
|
||||
- $CI_PREFIX pr
|
||||
environment:
|
||||
DAGGER_CLOUD_TOKEN:
|
||||
@ -67,6 +68,7 @@ steps:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
DOCKER_HOST: "tcp://192.168.1.155:2376"
|
||||
CUDDLE_SECRETS_PROVIDER: 1password
|
||||
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
|
||||
CUDDLE_SSH_AGENT: "true"
|
||||
@ -143,6 +145,45 @@ steps:
|
||||
- "load_secret"
|
||||
- "build ci"
|
||||
|
||||
- name: deploy release
|
||||
image: kasperhermansen/cuddle:latest
|
||||
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 release
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: docker_password
|
||||
DOCKER_USERNAME:
|
||||
from_secret: docker_username
|
||||
CUDDLE_SECRETS_PROVIDER: 1password
|
||||
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
|
||||
CUDDLE_SSH_AGENT: "true"
|
||||
CI_PREFIX: "/mnt/ci/ci"
|
||||
CUDDLE_PLEASE_TOKEN:
|
||||
from_secret: cuddle_please_token
|
||||
OP_SERVICE_ACCOUNT_TOKEN:
|
||||
from_secret: op_service_account_token
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
ref:
|
||||
include:
|
||||
- refs/tags/v*
|
||||
depends_on:
|
||||
- "load_secret"
|
||||
- "build ci"
|
||||
|
||||
volumes:
|
||||
- name: ssh
|
||||
temp: {}
|
||||
|
@ -18,18 +18,17 @@ async fn main() -> eyre::Result<()> {
|
||||
"libgit2-dev",
|
||||
"git",
|
||||
"openssh-client",
|
||||
"protobuf-compiler",
|
||||
])
|
||||
.with_apt_release(&["git", "openssh-client"])
|
||||
.with_apt_release(&["git", "openssh-client", "protobuf-compiler"])
|
||||
.with_docker_cli()
|
||||
.with_cuddle_cli()
|
||||
.with_kubectl()
|
||||
.with_apt_ca_certificates()
|
||||
.with_workspace_crates()
|
||||
.await
|
||||
.with_crates(["ci", "crates/*"])
|
||||
.with_mold("2.3.3")
|
||||
.with_bin_name(BIN_NAME)
|
||||
.with_deployment(false)
|
||||
.with_dagger_bin("0.9.8")
|
||||
.to_owned();
|
||||
|
||||
let drone_templater = &DroneTemplater::new(client, "templates/cuddle-empty-plan.yaml")
|
||||
@ -42,7 +41,6 @@ async fn main() -> eyre::Result<()> {
|
||||
.with_main(drone_templater)
|
||||
.execute(std::env::args())
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.await?;
|
||||
|
Loading…
Reference in New Issue
Block a user