Compare commits

...

35 Commits

Author SHA1 Message Date
Mikhail Kilin
48c3b33bf4 trigger CI for PR
All checks were successful
ci/woodpecker/pr/check Pipeline was successful
2026-02-16 01:54:19 +03:00
Mikhail Kilin
4cca68e12b Add PR checks pipeline (fmt, clippy, test) and split CI config
- Split .woodpecker.yml into .woodpecker/check.yml (PR checks) and .woodpecker/deploy.yml (deploy on push to main)
- Add basic handler test to src/main.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:45:22 +03:00
Mikhail Kilin
1870889abb fixes 2026-02-15 14:46:39 +03:00
d00e601f16 [CI SKIP] clean pipeline - remove debug lines 2026-02-15 11:44:16 +00:00
Woodpecker CI
dc94b7bcd7 [CI SKIP] deploy fc31b9fd88 2026-02-15 11:30:26 +00:00
fc31b9fd88 use netrc approach for git push
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-15 11:29:07 +00:00
04cbdb70ce use git_push_token secret
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 11:18:23 +00:00
Test
2afc179894 [CI SKIP] test token push 2026-02-15 11:07:27 +00:00
9366b24c5d final pipeline config with new token
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 11:03:36 +00:00
ee22d23220 add token length debug + trigger rebuild
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 10:25:24 +00:00
9bb6f77486 update bcard response text
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 10:06:17 +00:00
3e77e952c7 [CI SKIP] fix yaml quoting in pipeline 2026-02-15 09:52:40 +00:00
9ab5b517f2 [CI SKIP] clean pipeline config 2026-02-15 09:35:36 +00:00
50196bc7e5 debug: check available credentials and env vars
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-15 09:16:42 +00:00
2f10322d49 fix: use CI_NETRC credentials for git push
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 09:00:12 +00:00
39d3fb673e fix: use gitea token for git push auth
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-15 00:10:56 +00:00
61fe2af94a fix: use PLUGIN_ prefix for secrets in update step 2026-02-15 00:06:50 +00:00
c2e1678416 use Gitea API for manifest update
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-15 00:01:08 +00:00
922d25cc9d fix: use .netrc for git push auth
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:54:35 +00:00
a428cf3b92 fix: remove escaped exclamation marks in Rust source
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:46:15 +00:00
1cdc23b650 fix: use short repo path for plugin-kaniko
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:37:20 +00:00
ff0cf5b5c4 use plugin-kaniko for CI build
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:32:21 +00:00
af16420ced minimal kaniko test
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-14 23:17:44 +00:00
06705544db debug kaniko build step
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:16:43 +00:00
fc56ba806b fix kaniko entrypoint for Woodpecker v3
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:15:40 +00:00
a2087d1824 test simple pipeline on v3
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-02-14 23:14:35 +00:00
a7d47be06e fix pipeline yaml quoting for Woodpecker v3
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:10:10 +00:00
c3001198f4 update pipeline for Woodpecker v3 workspace 2026-02-14 23:07:34 +00:00
25ee248c65 trigger rebuild after RBAC fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:03:27 +00:00
98573ad697 trigger rebuild after Woodpecker v3 upgrade
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 23:02:05 +00:00
59c6506f0c [skip ci] trigger rebuild 2026-02-14 23:00:53 +00:00
cddc785ac7 update bcard for Woodpecker v3 test
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-02-14 22:56:58 +00:00
Woodpecker CI
626686e045 [skip ci] deploy bcard:34e3e886 2026-02-14 20:05:56 +00:00
34e3e886ee Merge pull request 'some changes' (#1) from some_changes into main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #1
2026-02-14 20:04:14 +00:00
Mikhail Kilin
4e4f54377b some changes 2026-02-14 23:02:28 +03:00
6 changed files with 67 additions and 42 deletions

View File

@@ -1,38 +0,0 @@
when:
branch: main
event: push
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:debug
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- TAG=${CI_COMMIT_SHA:0:8}
- REGISTRY=git.mikhailkilin.ru
- REPO=killingdruid/bcard
- echo "Building $REGISTRY/$REPO:$TAG"
- AUTH=$(echo -n "$DOCKER_USERNAME:$DOCKER_PASSWORD" | base64)
- mkdir -p /kaniko/.docker
- 'printf "{\"auths\":{\"%s\":{\"auth\":\"%s\"}}}" "$REGISTRY" "$AUTH" > /kaniko/.docker/config.json'
- /kaniko/executor --context=$CI_WORKSPACE --dockerfile=$CI_WORKSPACE/Dockerfile --destination=$REGISTRY/$REPO:$TAG --destination=$REGISTRY/$REPO:latest --insecure --skip-tls-verify --verbosity=info
- name: update-manifests
image: alpine
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- apk add --no-cache git
- 'TAG=${CI_COMMIT_SHA:0:8}'
- 'sed -i "s|image:.*killingdruid/bcard:.*|image: git.mikhailkilin.ru/killingdruid/bcard:$TAG|" k8s/bcard.yaml'
- 'git config user.email "ci@mikhailkilin.ru"'
- 'git config user.name "Woodpecker CI"'
- git add k8s/bcard.yaml
- 'git diff --cached --quiet && echo No_changes || git commit -m "[skip ci] deploy bcard:$TAG"'
- 'git push https://$DOCKER_USERNAME:$DOCKER_PASSWORD@git.mikhailkilin.ru/killingdruid/bcard.git HEAD:main'

20
.woodpecker/check.yml Normal file
View File

@@ -0,0 +1,20 @@
when:
- event: pull_request
steps:
- name: fmt
image: rust:1.84
commands:
- rustup component add rustfmt
- cargo fmt -- --check
- name: clippy
image: rust:1.84
commands:
- rustup component add clippy
- cargo clippy -- -D warnings
- name: test
image: rust:1.84
commands:
- cargo test

33
.woodpecker/deploy.yml Normal file
View File

@@ -0,0 +1,33 @@
when:
- branch: main
event: push
path:
exclude:
- 'k8s/**'
on_empty: true
steps:
- name: build-and-push
image: woodpeckerci/plugin-kaniko
settings:
registry: git.mikhailkilin.ru
repo: killingdruid/bcard
tags: ${CI_COMMIT_SHA}
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: update-manifests
image: alpine/git
environment:
GIT_TOKEN:
from_secret: git_push_token
commands:
- 'printf "machine git.mikhailkilin.ru\nlogin killingdruid\npassword %s\n" "$GIT_TOKEN" > ~/.netrc'
- 'chmod 600 ~/.netrc'
- 'sed -i "s#image: git.mikhailkilin.ru/killingdruid/bcard:.*#image: git.mikhailkilin.ru/killingdruid/bcard:${CI_COMMIT_SHA}#" k8s/bcard.yaml'
- 'git config user.email "woodpecker@ci"'
- 'git config user.name "Woodpecker CI"'
- 'git add k8s/bcard.yaml'
- 'git diff --cached --quiet && echo "No changes" || (git commit -m "[CI SKIP] deploy ${CI_COMMIT_SHA}" && git push origin HEAD:main)'

View File

@@ -2,3 +2,4 @@
Personal site: https://mikhailkilin.ru
# test

View File

@@ -17,7 +17,7 @@ spec:
- name: gitea-registry
containers:
- name: bcard
image: git.mikhailkilin.ru/killingdruid/bcard:91c2fa7c
image: git.mikhailkilin.ru/killingdruid/bcard:fc31b9fd8861debe3aabe473408b1238e858303c
ports:
- containerPort: 3000
---

View File

@@ -4,14 +4,23 @@ use std::net::SocketAddr;
#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(handler));
let addr = SocketAddr::from(([0, 0, 0, 0], 3000));
println!("listening on {}", addr);
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
axum::serve(listener, app).await.unwrap();
}
async fn handler() -> Html<&'static str> {
Html("<h1>Mikhail Kilin</h1><p>Full CI/CD pipeline works!</p>")
Html("<h1>Mikhail Kilin</h1>")
}
#[cfg(test)]
mod tests {
use super::*;
#[tokio::test]
async fn test_handler() {
let response = handler().await;
assert!(response.0.contains("Mikhail Kilin"));
}
}