All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
Thin WS client to l-ai-tasks that drafts short core RunAgent replies on @kaya mentions. Co-authored-by: Cursor <cursoragent@cursor.com>
74 lines
2.0 KiB
YAML
74 lines
2.0 KiB
YAML
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
submodule_recursive: true
|
|
|
|
steps:
|
|
- name: test
|
|
image: golang:1.25-alpine
|
|
commands:
|
|
- apk add --no-cache git build-base
|
|
- go build ./...
|
|
- go vet ./...
|
|
- go test ./...
|
|
when:
|
|
- event: [push, pull_request, manual]
|
|
|
|
- name: build-and-push
|
|
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
|
environment:
|
|
ZOT_USERNAME:
|
|
from_secret: ZOT_USERNAME
|
|
ZOT_PASSWORD:
|
|
from_secret: ZOT_PASSWORD
|
|
commands:
|
|
- mkdir -p /kaniko/.docker
|
|
- >-
|
|
printf '{"auths":{"registry.be.kaien.ru":{"auth":"%s"}}}'
|
|
"$(printf '%s:%s' "$ZOT_USERNAME" "$ZOT_PASSWORD" | base64 | tr -d '\n')"
|
|
> /kaniko/.docker/config.json
|
|
- >-
|
|
/kaniko/executor
|
|
--context "$CI_WORKSPACE"
|
|
--dockerfile "$CI_WORKSPACE/Dockerfile"
|
|
--destination "registry.be.kaien.ru/l_ai_agent_kaya/agent_kaya:$CI_COMMIT_SHA"
|
|
--destination "registry.be.kaien.ru/l_ai_agent_kaya/agent_kaya:latest"
|
|
depends_on:
|
|
- test
|
|
when:
|
|
- branch: master
|
|
event: [push, manual]
|
|
|
|
- name: deploy
|
|
image: alpine:latest
|
|
environment:
|
|
SSH_PRIVATE_KEY:
|
|
from_secret: SSH_PRIVATE_KEY
|
|
DEPLOY_HOST:
|
|
from_secret: SWARM_DEPLOY_HOST
|
|
DEPLOY_USER:
|
|
from_secret: SWARM_DEPLOY_USER
|
|
commands:
|
|
- apk add --no-cache openssh-client
|
|
- eval $(ssh-agent -s)
|
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- ssh-add ~/.ssh/id_rsa
|
|
- ssh-keyscan -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts
|
|
- chmod 644 ~/.ssh/known_hosts
|
|
- >-
|
|
ssh -n $DEPLOY_USER@$DEPLOY_HOST
|
|
"docker service update
|
|
--image registry.be.kaien.ru/l_ai_agent_kaya/agent_kaya:$CI_COMMIT_SHA
|
|
--with-registry-auth
|
|
--update-order start-first
|
|
--detach=false
|
|
l-ai_agent-kaya"
|
|
depends_on:
|
|
- build-and-push
|
|
when:
|
|
- branch: master
|
|
event: [push, manual]
|