Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
fc9a0abe7e
commit
185d997694
50
.drone.yml
50
.drone.yml
@ -26,18 +26,15 @@ steps:
|
|||||||
- chmod 700 ~/.ssh/config
|
- chmod 700 ~/.ssh/config
|
||||||
|
|
||||||
- name: build pr
|
- name: build pr
|
||||||
image: kasperhermansen/cuddle:latest
|
image: kasperhermansen/cuddle-rust-service-plan:main-1708174643
|
||||||
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 RUST_LOG=trace
|
- export RUST_LOG=trace
|
||||||
- cuddle-rust-service-plan pr
|
- cuddle-rust-service-plan pr
|
||||||
environment:
|
environment:
|
||||||
@ -49,13 +46,14 @@ 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"
|
||||||
CI_PREFIX: "/mnt/ci/ci"
|
|
||||||
CUDDLE_PLEASE_TOKEN:
|
CUDDLE_PLEASE_TOKEN:
|
||||||
from_secret: cuddle_please_token
|
from_secret: cuddle_please_token
|
||||||
OP_SERVICE_ACCOUNT_TOKEN:
|
OP_SERVICE_ACCOUNT_TOKEN:
|
||||||
from_secret: op_service_account_token
|
from_secret: op_service_account_token
|
||||||
|
DOCKER_HOST: "tcp://192.168.1.233:2376"
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
exclude:
|
exclude:
|
||||||
- main
|
- main
|
||||||
@ -64,7 +62,7 @@ steps:
|
|||||||
- "load_secret"
|
- "load_secret"
|
||||||
|
|
||||||
- name: build main
|
- name: build main
|
||||||
image: kasperhermansen/cuddle-rust-service-plan:main-1707658158
|
image: kasperhermansen/cuddle-rust-service-plan:main-1708174643
|
||||||
pull: always
|
pull: always
|
||||||
volumes:
|
volumes:
|
||||||
- name: ssh
|
- name: ssh
|
||||||
@ -94,7 +92,6 @@ steps:
|
|||||||
CUDDLE_SSH_AGENT: "true"
|
CUDDLE_SSH_AGENT: "true"
|
||||||
GIT_PASSWORD:
|
GIT_PASSWORD:
|
||||||
from_secret: git_password
|
from_secret: git_password
|
||||||
CI_PREFIX: "/mnt/ci/ci"
|
|
||||||
DOCKER_HOST: "tcp://192.168.1.233:2376"
|
DOCKER_HOST: "tcp://192.168.1.233:2376"
|
||||||
CUDDLE_PLEASE_TOKEN:
|
CUDDLE_PLEASE_TOKEN:
|
||||||
from_secret: cuddle_please_token
|
from_secret: cuddle_please_token
|
||||||
@ -111,45 +108,6 @@ steps:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- "load_secret"
|
- "load_secret"
|
||||||
|
|
||||||
- name: deploy release
|
|
||||||
image: kasperhermansen/cuddle:latest
|
|
||||||
pull: always
|
|
||||||
volumes:
|
|
||||||
- name: ssh
|
|
||||||
path: /root/.ssh/
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
- 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
|
|
||||||
- cuddle x ci: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"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: ssh
|
- name: ssh
|
||||||
temp: {}
|
temp: {}
|
||||||
|
Loading…
Reference in New Issue
Block a user