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
|
- 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
|
- apk add git
|
||||||
|
- cuddle --version
|
||||||
- $CI_PREFIX pr
|
- $CI_PREFIX pr
|
||||||
environment:
|
environment:
|
||||||
DAGGER_CLOUD_TOKEN:
|
DAGGER_CLOUD_TOKEN:
|
||||||
@ -67,6 +68,7 @@ steps:
|
|||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
DOCKER_USERNAME:
|
DOCKER_USERNAME:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
DOCKER_HOST: "tcp://192.168.1.155:2376"
|
||||||
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"
|
||||||
@ -143,6 +145,45 @@ steps:
|
|||||||
- "load_secret"
|
- "load_secret"
|
||||||
- "build ci"
|
- "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:
|
volumes:
|
||||||
- name: ssh
|
- name: ssh
|
||||||
temp: {}
|
temp: {}
|
||||||
|
@ -18,18 +18,17 @@ async fn main() -> eyre::Result<()> {
|
|||||||
"libgit2-dev",
|
"libgit2-dev",
|
||||||
"git",
|
"git",
|
||||||
"openssh-client",
|
"openssh-client",
|
||||||
|
"protobuf-compiler",
|
||||||
])
|
])
|
||||||
.with_apt_release(&["git", "openssh-client"])
|
.with_apt_release(&["git", "openssh-client", "protobuf-compiler"])
|
||||||
.with_docker_cli()
|
.with_docker_cli()
|
||||||
.with_cuddle_cli()
|
.with_cuddle_cli()
|
||||||
.with_kubectl()
|
.with_kubectl()
|
||||||
.with_apt_ca_certificates()
|
.with_apt_ca_certificates()
|
||||||
.with_workspace_crates()
|
.with_crates(["ci", "crates/*"])
|
||||||
.await
|
|
||||||
.with_mold("2.3.3")
|
.with_mold("2.3.3")
|
||||||
.with_bin_name(BIN_NAME)
|
.with_bin_name(BIN_NAME)
|
||||||
.with_deployment(false)
|
.with_deployment(false)
|
||||||
.with_dagger_bin("0.9.8")
|
|
||||||
.to_owned();
|
.to_owned();
|
||||||
|
|
||||||
let drone_templater = &DroneTemplater::new(client, "templates/cuddle-empty-plan.yaml")
|
let drone_templater = &DroneTemplater::new(client, "templates/cuddle-empty-plan.yaml")
|
||||||
@ -42,7 +41,6 @@ async fn main() -> eyre::Result<()> {
|
|||||||
.with_main(drone_templater)
|
.with_main(drone_templater)
|
||||||
.execute(std::env::args())
|
.execute(std::env::args())
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user