Обновлены Jenkins credentials под ssh-gitea-key и остальные Global ID.
This commit is contained in:
Vendored
+7
-6
@@ -3,10 +3,11 @@
|
|||||||
// Триггер: push в main (webhook Gitea → Jenkins Multibranch).
|
// Триггер: push в main (webhook Gitea → Jenkins Multibranch).
|
||||||
// Коммиты с [skip ci] в сообщении — без повторного bump (анти-цикл после version commit).
|
// Коммиты с [skip ci] в сообщении — без повторного bump (анти-цикл после version commit).
|
||||||
//
|
//
|
||||||
// Credentials:
|
// Credentials (Manage Jenkins → Credentials → Global):
|
||||||
// harbor-devops-tools-push-pull-access — Harbor devops-tools
|
// harbor-devops-tools-push-pull-access — Harbor devops-tools (robot)
|
||||||
// docker-hub — Docker Hub
|
// docker-hub — Docker Hub (inecs)
|
||||||
// gitea-ssh (или GIT_SSH_CREDENTIALS_ID) — SSH для push bump-коммита
|
// ssh-gitea-key — SSH к Gitea (push bump VERSION)
|
||||||
|
// gitea-jenkins-token — token Gitea (если нужен API; SCM обычно ssh-gitea-key)
|
||||||
//
|
//
|
||||||
// Версия: файл VERSION (+ pyproject / Helm). Теги образа: :<semver>, :<sha>, :latest
|
// Версия: файл VERSION (+ pyproject / Helm). Теги образа: :<semver>, :<sha>, :latest
|
||||||
// Deploy: devops-tools/wrapped/wrapped-deploy/main
|
// Deploy: devops-tools/wrapped/wrapped-deploy/main
|
||||||
@@ -28,8 +29,8 @@ pipeline {
|
|||||||
RELEASE_TAG = "${env.GIT_COMMIT?.take(7) ?: 'dev'}"
|
RELEASE_TAG = "${env.GIT_COMMIT?.take(7) ?: 'dev'}"
|
||||||
BUILDX_BUILDER = "jenkins-wrapped-${env.BUILD_NUMBER}"
|
BUILDX_BUILDER = "jenkins-wrapped-${env.BUILD_NUMBER}"
|
||||||
DEPLOY_JOB = 'devops-tools/wrapped/wrapped-deploy/main'
|
DEPLOY_JOB = 'devops-tools/wrapped/wrapped-deploy/main'
|
||||||
// SSH credential для git push bump (тот же ключ, что SCM Gitea)
|
// SSH «Доступ к Gitea по SSH» — push bump-коммита VERSION
|
||||||
GIT_SSH_CREDENTIALS_ID = 'gitea-ssh'
|
GIT_SSH_CREDENTIALS_ID = 'ssh-gitea-key'
|
||||||
TZ = 'Europe/Moscow'
|
TZ = 'Europe/Moscow'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@
|
|||||||
// Job: отдельный Multibranch Pipeline, Script Path = Jenkinsfile.deploy
|
// Job: отдельный Multibranch Pipeline, Script Path = Jenkinsfile.deploy
|
||||||
// Имя по умолчанию (см. DEPLOY_JOB в Jenkinsfile): «Devops Tools/Wrapped Deploy»
|
// Имя по умолчанию (см. DEPLOY_JOB в Jenkinsfile): «Devops Tools/Wrapped Deploy»
|
||||||
// Триггер: вручную (Build with Parameters) или автоматически из Jenkinsfile после Build & push
|
// Триггер: вручную (Build with Parameters) или автоматически из Jenkinsfile после Build & push
|
||||||
// Credentials:
|
// Credentials (Global):
|
||||||
// k3s-kubeconfig — Secret file (kubeconfig), как у devops.org.ru
|
// k3s-kubeconfig — Secret file (kubeconfig к K3S)
|
||||||
//
|
//
|
||||||
// Agent: cloud kubernetes, label docker (pod template с container docker)
|
// Agent: cloud kubernetes, label docker (pod template с container docker)
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -445,14 +445,17 @@ docker buildx build \
|
|||||||
| `make push` | автоматически `bump-patch`, затем commit/push |
|
| `make push` | автоматически `bump-patch`, затем commit/push |
|
||||||
| Jenkins (`Jenkinsfile`) | на `main` автоматически `bump-patch`, образ с новым тегом, commit `Bump version to X.Y.Z [skip ci].`, затем Deploy |
|
| Jenkins (`Jenkinsfile`) | на `main` автоматически `bump-patch`, образ с новым тегом, commit `Bump version to X.Y.Z [skip ci].`, затем Deploy |
|
||||||
|
|
||||||
Коммиты с `[skip ci]` не бампят версию снова (анти-цикл). Credential для push bump: `GIT_SSH_CREDENTIALS_ID` (по умолчанию `gitea-ssh`) — тот же SSH-ключ, что для SCM.
|
Коммиты с `[skip ci]` не бампят версию снова (анти-цикл). Push bump VERSION — credential `ssh-gitea-key` (Доступ к Gitea по SSH).
|
||||||
|
|
||||||
Credentials (как в актуальном `Jenkinsfile`):
|
Credentials (Global, как в job’ах):
|
||||||
|
|
||||||
| ID | Тип | Назначение |
|
| ID | Тип | Назначение |
|
||||||
|----|-----|------------|
|
|----|-----|------------|
|
||||||
| `harbor-devops-tools-push-pull-access` | Username/password | Harbor `devops-tools` |
|
| `ssh-gitea-key` | SSH Username with private key | SCM + push bump VERSION |
|
||||||
| `docker-hub` | Username/password | Docker Hub |
|
| `gitea-jenkins-token` | Secret text / token | API Gitea (webhook/API при необходимости) |
|
||||||
|
| `harbor-devops-tools-push-pull-access` | Username/password | Harbor `devops-tools` (robot) |
|
||||||
|
| `docker-hub` | Username/password | Docker Hub `inecs` |
|
||||||
|
| `k3s-kubeconfig` | Secret file | Helm/kubectl deploy в K3S |
|
||||||
|
|
||||||
Agent: label `docker` (pod template с container `docker` / DinD).
|
Agent: label `docker` (pod template с container `docker` / DinD).
|
||||||
|
|
||||||
@@ -487,9 +490,9 @@ kubectl -n wrapped rollout status deployment/wrapped
|
|||||||
| `IMAGE_TAG` | из `VERSION` / CI | SemVer образа (`Always` подтянет новый) |
|
| `IMAGE_TAG` | из `VERSION` / CI | SemVer образа (`Always` подтянет новый) |
|
||||||
| `IMAGE_PULL_POLICY` | `Always` | как в addon |
|
| `IMAGE_PULL_POLICY` | `Always` | как в addon |
|
||||||
|
|
||||||
Credential: `k3s-kubeconfig` (Secret file) — тот же, что у devops.org.ru.
|
Credential: `k3s-kubeconfig` (Secret file) — kubeconfig к K3S.
|
||||||
|
|
||||||
Рекомендуемая связка job’ов уже в [`Jenkinsfile`](Jenkinsfile): после **Version** + **Build & push** стадия **Trigger deploy** вызывает `devops-tools/wrapped/wrapped-deploy/main` с актуальным SemVer (`wait: true`). Credential SSH для version-commit: `gitea-ssh` (или поменяй `GIT_SSH_CREDENTIALS_ID`).
|
Рекомендуемая связка job’ов уже в [`Jenkinsfile`](Jenkinsfile): после **Version** + **Build & push** стадия **Trigger deploy** вызывает `devops-tools/wrapped/wrapped-deploy/main` с актуальным SemVer (`wait: true`). Push VERSION: `ssh-gitea-key`.
|
||||||
|
|
||||||
Ручной запуск Deploy: **Build with Parameters** (пустой `IMAGE_TAG` → `cat VERSION`).
|
Ручной запуск Deploy: **Build with Parameters** (пустой `IMAGE_TAG` → `cat VERSION`).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user