Compare commits
4 Commits
6800be7db9
...
f28035fb28
Author | SHA1 | Date | |
---|---|---|---|
f28035fb28 | |||
522db2293b | |||
1fb24abd39 | |||
96f3b52c2a |
114
.drone.yml
114
.drone.yml
@ -1,112 +1,2 @@
|
|||||||
kind: pipeline
|
kind: template
|
||||||
name: default
|
load: cuddle-rust-service-plan.yaml
|
||||||
type: docker
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: load_secret
|
|
||||||
image: debian:buster-slim
|
|
||||||
volumes:
|
|
||||||
- name: ssh
|
|
||||||
path: /root/.ssh/
|
|
||||||
environment:
|
|
||||||
SSH_KEY:
|
|
||||||
from_secret: gitea_id_ed25519
|
|
||||||
commands:
|
|
||||||
- mkdir -p $HOME/.ssh/
|
|
||||||
- echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519
|
|
||||||
- chmod -R 600 ~/.ssh
|
|
||||||
- |
|
|
||||||
cat >$HOME/.ssh/config <<EOL
|
|
||||||
Host git.front.kjuulh.io
|
|
||||||
IdentityFile $HOME/.ssh/id_ed25519
|
|
||||||
IdentitiesOnly yes
|
|
||||||
UserKnownHostsFile=/dev/null
|
|
||||||
StrictHostKeyChecking no
|
|
||||||
EOL
|
|
||||||
- chmod 700 ~/.ssh/config
|
|
||||||
|
|
||||||
- name: build pr
|
|
||||||
image: kasperhermansen/cuddle-rust-service-plan:main-1709748821
|
|
||||||
pull: always
|
|
||||||
volumes:
|
|
||||||
- name: ssh
|
|
||||||
path: /root/.ssh/
|
|
||||||
commands:
|
|
||||||
- eval `ssh-agent`
|
|
||||||
- ssh-add
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
|
||||||
- export RUST_LOG=trace
|
|
||||||
- cuddle-rust-service-plan pr
|
|
||||||
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"
|
|
||||||
CUDDLE_PLEASE_TOKEN:
|
|
||||||
from_secret: cuddle_please_token
|
|
||||||
OP_SERVICE_ACCOUNT_TOKEN:
|
|
||||||
from_secret: op_service_account_token
|
|
||||||
DOCKER_HOST: "tcp://192.168.1.233:2376"
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
exclude:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
depends_on:
|
|
||||||
- "load_secret"
|
|
||||||
|
|
||||||
- name: build main
|
|
||||||
image: kasperhermansen/cuddle-rust-service-plan:main-1709748821
|
|
||||||
pull: always
|
|
||||||
volumes:
|
|
||||||
- name: ssh
|
|
||||||
path: /root/.ssh/
|
|
||||||
commands:
|
|
||||||
- eval `ssh-agent`
|
|
||||||
- ssh-add
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
|
||||||
- export RUST_LOG=trace
|
|
||||||
- cuddle-rust-service-plan main
|
|
||||||
environment:
|
|
||||||
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
|
|
||||||
DOCKER_USERNAME:
|
|
||||||
from_secret: docker_username
|
|
||||||
CUDDLE_SECRETS_PROVIDER: 1password
|
|
||||||
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
|
|
||||||
CUDDLE_SSH_AGENT: "true"
|
|
||||||
GIT_PASSWORD:
|
|
||||||
from_secret: git_password
|
|
||||||
DOCKER_HOST: "tcp://192.168.1.233:2376"
|
|
||||||
CUDDLE_PLEASE_TOKEN:
|
|
||||||
from_secret: cuddle_please_token
|
|
||||||
OP_SERVICE_ACCOUNT_TOKEN:
|
|
||||||
from_secret: op_service_account_token
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
- master
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
||||||
depends_on:
|
|
||||||
- "load_secret"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: ssh
|
|
||||||
temp: {}
|
|
||||||
|
@ -166,7 +166,7 @@ metadata:
|
|||||||
name: {service}
|
name: {service}
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
interval: 1h
|
interval: 1m
|
||||||
retryInterval: 30s
|
retryInterval: 30s
|
||||||
path: ./deployments/{cluster}/{namespace}/{service}
|
path: ./deployments/{cluster}/{namespace}/{service}
|
||||||
prune: true
|
prune: true
|
||||||
|
22
cuddle.yaml
22
cuddle.yaml
@ -5,19 +5,17 @@ base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-service-plan.git"
|
|||||||
vars:
|
vars:
|
||||||
service: "flux-releaser"
|
service: "flux-releaser"
|
||||||
registry: kasperhermansen
|
registry: kasperhermansen
|
||||||
|
database:
|
||||||
|
crdb: "true"
|
||||||
|
ingress:
|
||||||
|
- external: "true"
|
||||||
|
- internal: "true"
|
||||||
|
|
||||||
clusters:
|
|
||||||
clank-prod:
|
|
||||||
replicas: "3"
|
|
||||||
namespace: prod
|
|
||||||
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
registry: git@git.front.kjuulh.io:kjuulh/clank-clusters
|
|
||||||
env:
|
|
||||||
prod:
|
|
||||||
clusters:
|
|
||||||
- clank-prod
|
|
||||||
|
|
||||||
cuddle/clusters:
|
cuddle/clusters:
|
||||||
dev:
|
dev:
|
||||||
|
env:
|
||||||
|
service.host: "0.0.0.0:3000"
|
||||||
|
prod:
|
||||||
|
env:
|
||||||
|
service.host: "0.0.0.0:3000"
|
||||||
|
Loading…
Reference in New Issue
Block a user