Compare commits

..

121 Commits

Author SHA1 Message Date
Woodpecker CI
ffa32e2e81 chore: release v0.0.51 [skip ci] 2026-05-04 17:36:51 +00:00
spassignat
7ee393b594 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 19:35:54 +02:00
Woodpecker CI
14342999e2 chore: release v0.0.50 [skip ci] 2026-05-04 17:32:02 +00:00
spassignat
0e18715f05 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 19:31:04 +02:00
spassignat
b64fa8fada Merge remote-tracking branch 'origin/main'
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 19:17:39 +02:00
spassignat
932c500c1b patch: pipeline minio 2026-05-04 19:17:28 +02:00
Woodpecker CI
72d52577e3 chore: release v0.0.49 [skip ci] 2026-05-04 17:09:55 +00:00
spassignat
3919254309 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 19:08:55 +02:00
spassignat
b4f2bb4e33 patch: pipeline minio 2026-05-04 19:03:21 +02:00
spassignat
75a3c7febb patch: pipeline minio 2026-05-04 18:54:00 +02:00
Woodpecker CI
735bdfe856 chore: release v0.0.48 [skip ci] 2026-05-04 16:44:58 +00:00
spassignat
f1b0885a30 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 18:43:59 +02:00
Woodpecker CI
7ef43a29cb chore: release v0.0.47 [skip ci] 2026-05-04 16:36:26 +00:00
spassignat
3f6dddcd0a patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 18:35:26 +02:00
spassignat
a2512b1cca Merge remote-tracking branch 'origin/main'
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 18:32:53 +02:00
spassignat
bcee6b5514 patch: pipeline minio 2026-05-04 18:30:52 +02:00
Woodpecker CI
11f0109bc5 chore: release v0.0.46 [skip ci] 2026-05-04 16:27:37 +00:00
spassignat
e25080a87c patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 18:26:39 +02:00
Woodpecker CI
f71058a31a chore: release v0.0.45 [skip ci] 2026-05-04 16:04:26 +00:00
spassignat
bd98d8eb6e patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 18:03:28 +02:00
Woodpecker CI
e684cadb9f chore: release v0.0.44 [skip ci] 2026-05-04 15:58:59 +00:00
spassignat
0c091538e8 patch: pipeline minio
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 17:58:00 +02:00
spassignat
ccda246266 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:54:18 +02:00
spassignat
6a55acd235 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:46:18 +02:00
spassignat
faecd90037 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:44:10 +02:00
spassignat
680ac2fd2b patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:35:57 +02:00
spassignat
3d7f20d2bf patch: pipeline minio 2026-05-04 17:31:08 +02:00
spassignat
7df04c4084 patch: pipeline minio 2026-05-04 17:30:16 +02:00
spassignat
ed5ffdbdc0 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:26:17 +02:00
spassignat
f6e52f7420 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:24:26 +02:00
spassignat
35adae3978 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 17:19:25 +02:00
spassignat
161e2c12cf patch: pipeline minio 2026-05-04 17:10:25 +02:00
Woodpecker CI
d20a29408f chore: release v0.0.43 [skip ci] 2026-05-04 14:59:59 +00:00
spassignat
78e682d10f patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 16:59:01 +02:00
Woodpecker CI
c51709bd26 chore: release v0.0.42 [skip ci] 2026-05-04 14:56:07 +00:00
spassignat
cc96f7f5e2 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 16:55:08 +02:00
Woodpecker CI
fdf11214dd chore: release v0.0.41 [skip ci] 2026-05-04 14:52:34 +00:00
spassignat
e4dbf60a20 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 16:51:37 +02:00
Woodpecker CI
307fb3c325 chore: release v0.0.40 [skip ci] 2026-05-04 14:46:03 +00:00
spassignat
e9162550bb patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 16:45:05 +02:00
Woodpecker CI
9823520d00 chore: release v0.0.39 [skip ci] 2026-05-04 14:44:04 +00:00
spassignat
4e54bed176 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 16:42:58 +02:00
spassignat
3c52e96359 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 16:42:24 +02:00
Woodpecker CI
1444d14a57 chore: release v0.0.38 [skip ci] 2026-05-04 14:40:10 +00:00
spassignat
6a8156bc74 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 16:39:10 +02:00
spassignat
cc0e6db4a7 patch: pipeline minio 2026-05-04 16:38:03 +02:00
spassignat
c49bfa33a8 patch: pipeline minio
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 16:31:44 +02:00
spassignat
f3e9dee594 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 12:34:23 +02:00
Woodpecker CI
268930859e chore: release v0.0.37 [skip ci] 2026-05-04 10:12:07 +00:00
spassignat
02e548f723 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 12:10:34 +02:00
Woodpecker CI
1085ba4502 chore: release v0.0.36 [skip ci] 2026-05-04 09:39:41 +00:00
spassignat
cc65eb1ba9 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 11:38:40 +02:00
Woodpecker CI
9b9df6f9c1 chore: release v0.0.35 [skip ci] 2026-05-04 09:19:45 +00:00
spassignat
9d980e79c1 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 11:18:46 +02:00
Woodpecker CI
5a989e4a58 chore: release v0.0.34 [skip ci] 2026-05-04 09:05:46 +00:00
spassignat
e489c6ef1d patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 11:04:45 +02:00
spassignat
d7bca9f4a5 Merge remote-tracking branch 'origin/main' 2026-05-04 11:04:30 +02:00
spassignat
f4664288a9 patch: pipeline manual 2026-05-04 11:04:25 +02:00
Woodpecker CI
eca0e35935 chore: release v0.0.33 [skip ci] 2026-05-04 08:25:40 +00:00
spassignat
f8037f0d3a patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 10:24:40 +02:00
Woodpecker CI
fc785b1f87 chore: release v0.0.32 [skip ci] 2026-05-04 08:15:36 +00:00
spassignat
49a3eeee60 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 10:14:35 +02:00
Woodpecker CI
ea562a4929 chore: release v0.0.31 [skip ci] 2026-05-04 07:55:45 +00:00
spassignat
5bb81c50b5 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 09:54:44 +02:00
Woodpecker CI
150f415e69 chore: release v0.0.30 [skip ci] 2026-05-04 07:13:27 +00:00
spassignat
92d85fab85 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 09:12:30 +02:00
Woodpecker CI
72073176d2 chore: release v0.0.29 [skip ci] 2026-05-04 07:08:15 +00:00
spassignat
532000fc31 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 09:07:15 +02:00
Woodpecker CI
0a7169ec69 chore: release v0.0.28 [skip ci] 2026-05-04 07:02:06 +00:00
spassignat
b8e748103d patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 09:01:09 +02:00
spassignat
7bd7dc0e62 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 08:59:01 +02:00
Woodpecker CI
68710f91f4 chore: release v0.0.27 [skip ci] 2026-05-04 06:54:28 +00:00
spassignat
fd19361e35 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 08:53:28 +02:00
Woodpecker CI
213d061f0b chore: release v0.0.26 [skip ci] 2026-05-04 06:39:19 +00:00
spassignat
9f43203b94 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 08:38:16 +02:00
Woodpecker CI
021c4ed2d3 chore: release v0.0.25 [skip ci] 2026-05-04 06:35:27 +00:00
spassignat
d06877bd7d patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 08:34:23 +02:00
Woodpecker CI
19625f0c13 chore: release v0.0.24 [skip ci] 2026-05-04 06:31:56 +00:00
spassignat
bcf510b936 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 08:30:54 +02:00
Woodpecker CI
f6139782b4 chore: release v0.0.23 [skip ci] 2026-05-04 06:26:11 +00:00
spassignat
c4297c7c25 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-04 08:25:08 +02:00
spassignat
f89ccb0f63 Merge remote-tracking branch 'origin/main' 2026-05-04 08:24:24 +02:00
spassignat
0ba8dd27f0 patch: pipeline manual 2026-05-04 08:24:13 +02:00
Woodpecker CI
b08a3913e7 chore: release v0.0.22 [skip ci] 2026-05-04 06:22:14 +00:00
spassignat
ac4d180382 patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 08:21:11 +02:00
spassignat
c5da967d34 Merge remote-tracking branch 'origin/main'
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 08:18:12 +02:00
spassignat
e916154e4e patch: pipeline manual 2026-05-04 08:18:02 +02:00
Woodpecker CI
69656f095d chore: release v0.0.21 [skip ci] 2026-05-04 06:16:58 +00:00
spassignat
1cc3d5b5eb patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 08:15:57 +02:00
spassignat
228ad14fa9 Merge remote-tracking branch 'origin/main'
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 08:10:58 +02:00
spassignat
067acd0521 patch: pipeline manual 2026-05-04 08:10:51 +02:00
Woodpecker CI
91af4b5739 chore: release v0.0.20 [skip ci] 2026-05-04 05:53:19 +00:00
spassignat
e267aeb1ca patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-04 07:52:17 +02:00
spassignat
4e5e8f0644 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-04 07:51:18 +02:00
spassignat
a253393f58 patch: pipeline manual
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-03 23:30:19 +02:00
spassignat
0b1308e8f0 Merge remote-tracking branch 'origin/main'
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/deployment/deploy-pipeline Pipeline failed
2026-05-03 21:11:55 +02:00
spassignat
838d7a42eb patch: pipeline manual 2026-05-03 21:11:48 +02:00
Woodpecker CI
55b60e06da chore: release v0.0.19 [skip ci] 2026-05-03 19:08:54 +00:00
spassignat
7ee90cba7c patch: pipeline manual
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 21:07:54 +02:00
spassignat
bbb29459f6 Merge remote-tracking branch 'origin/main'
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 21:06:00 +02:00
spassignat
f564b38987 patch: pipeline manual 2026-05-03 21:05:18 +02:00
Woodpecker CI
78cab3ffe2 chore: release v0.0.18 [skip ci] 2026-05-03 18:52:49 +00:00
spassignat
f8dcae93c5 patch: pipeline manual
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 20:51:41 +02:00
spassignat
244f46418b Merge remote-tracking branch 'origin/main'
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/build-pipeline Pipeline was successful
ci/woodpecker/manual/test Pipeline was successful
2026-05-03 16:59:19 +02:00
spassignat
c334f5ec09 patch: pipeline id 2026-05-03 16:59:13 +02:00
Woodpecker CI
9579676b0c chore: release v0.0.17 [skip ci]
All checks were successful
ci/woodpecker/manual/build-pipeline Pipeline was successful
2026-05-03 14:11:50 +00:00
spassignat
10dd888152 patch: pipeline id
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 16:10:48 +02:00
Woodpecker CI
d13bb14f34 chore: release v0.0.16 [skip ci] 2026-05-03 14:08:26 +00:00
spassignat
350d3881f0 patch: deploy to
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 16:07:25 +02:00
spassignat
69b5c0017f Merge remote-tracking branch 'origin/main'
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 16:05:35 +02:00
spassignat
08d234c8bc patch: deploy to 2026-05-03 16:05:12 +02:00
Woodpecker CI
38a422e305 chore: release v0.0.15 [skip ci] 2026-05-03 14:00:18 +00:00
spassignat
1e2cdf82e6 patch: with evt
All checks were successful
ci/woodpecker/push/build-pipeline Pipeline was successful
2026-05-03 15:59:15 +02:00
spassignat
7c88b67418 Merge remote-tracking branch 'origin/main' 2026-05-03 15:44:59 +02:00
spassignat
06f135a005 patch: with evt 2026-05-03 15:42:13 +02:00
Woodpecker CI
8bf8e5448a chore: release v0.0.14 [skip ci] 2026-05-03 13:31:35 +00:00
spassignat
564b5e9f3c patch: with evt
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-03 15:30:32 +02:00
spassignat
ed31bcc0e3 Merge remote-tracking branch 'origin/main'
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-03 15:29:47 +02:00
spassignat
bd17026643 patch: with evt 2026-05-03 15:29:39 +02:00
Woodpecker CI
68b3b81273 chore: release v0.0.13 [skip ci] 2026-05-02 20:36:23 +00:00
spassignat
7eedd9549d patch: with evt
Some checks failed
ci/woodpecker/push/build-pipeline Pipeline failed
2026-05-02 22:35:22 +02:00
43 changed files with 131 additions and 38 deletions

View File

@@ -1,31 +1,27 @@
when: when:
- event: push - event: push
branch: [ main ] branch: [ main ]
- event: pull_request
- event: manual
variables: variables:
- &node_image node:18-alpine node_image: &node_image node:18-alpine
- &git_image alpine/git git_image: &git_image alpine/git
- &curl_image curlimages/curl:latest curl_image: &curl_image curlimages/curl:latest
nexus_api: &nexus_api http://nexus.cicd.exygen.fr/service/rest/v1
woodpecker_api: &woodpecker_api http://woodpecker.cicd.exygen.fr/api
steps: steps:
# Étape 1: Nettoyage du projet # Étape 1: Nettoyage du projet
- name: clean_project - name: clean_project
image: *git_image image: *git_image
commands: | commands:
- rm -rf dist
echo "1 $CI_WORKSPACE" - rm -f $CI_WORKSPACE/build/version.env
rm -rf dist - echo "✅ Nettoyage terminé"
rm -f $CI_WORKSPACE/build/version.env
echo "✅ Nettoyage terminé"
depends_on: [ ]
# Étape 2: Analyser le message du commit # Étape 2: Analyser le message du commit
- name: prepare - name: prepare
image: *git_image image: *git_image
commands: | commands: |
COMMIT_MSG=$(git log -1 --pretty=%B) COMMIT_MSG=$(git log -1 --pretty=%B)
echo "📝 Message: $COMMIT_MSG" echo "📝 Message: $COMMIT_MSG"
@@ -111,6 +107,7 @@ steps:
NEXUS_PASSWORD: NEXUS_PASSWORD:
from_secret: nexus_password from_secret: nexus_password
NEXUS_REPOSITORY: domaine-passignat NEXUS_REPOSITORY: domaine-passignat
NEXUS_API: *nexus_api
commands: | commands: |
source $CI_WORKSPACE/version.env source $CI_WORKSPACE/version.env
@@ -126,16 +123,14 @@ steps:
-u "$NEXUS_USERNAME:$NEXUS_PASSWORD" \ -u "$NEXUS_USERNAME:$NEXUS_PASSWORD" \
-F "raw.directory=apps/$CI_REPO_NAME/$NEW_VERSION" \ -F "raw.directory=apps/$CI_REPO_NAME/$NEW_VERSION" \
-F "raw.asset1=@$ARTIFACT_FILE" \ -F "raw.asset1=@$ARTIFACT_FILE" \
-F "raw.asset1.filename=$ARTIFACT" \ -F "raw.asset1.filename=$ARTIFACT" $NEXUS_API/components?repository=$NEXUS_REPOSITORY
http://nexus.cicd.exygen.fr/service/rest/v1/components?repository=$NEXUS_REPOSITORY
echo "✅ Artefact publié" echo "✅ Artefact publié"
else else
echo "⏭️ Pas de publication (version_type=none)" echo "⏭️ Pas de publication (version_type=none)"
fi fi
depends_on: [ package ] depends_on: [ package ]
# Étape 7: Commit et tag (après publication) # Étape 7: Commit et tag
- name: commit_tag - name: commit_tag
image: *git_image image: *git_image
environment: environment:
@@ -149,7 +144,9 @@ steps:
git config user.email "woodpecker@exygen.fr" git config user.email "woodpecker@exygen.fr"
git config user.name "Woodpecker CI" git config user.name "Woodpecker CI"
git add package.json ./database/src/sql/*.sql 2>/dev/null || true echo " add generated files (sql)"
git add ./database/src/sql/*.sql 2>/dev/null || true
git add package.json 2>/dev/null || true
# Commiter uniquement s'il y a des changements # Commiter uniquement s'il y a des changements
if ! git diff --cached --quiet; then if ! git diff --cached --quiet; then
@@ -167,25 +164,33 @@ steps:
else else
echo "⚠️ Aucun changement à commiter" echo "⚠️ Aucun changement à commiter"
fi fi
ls -als
depends_on: [ publish ] depends_on: [ publish ]
- name: share-data
image: minio/mc
commands:
- echo " Save pipeline info"
- echo NEW_VERSION=$NEW_VERSION > .buildinfo
- mc alias set local http://minio:9000 minioadmin minioadmin123
- mc mb local/cicd || true
- mc cp .buildinfo local/cicd/repository_$CI_REPO_REMOTE_ID/pipeline_$CI_PIPELINE_NUMBER
depends_on: [ commit_tag ]
# Étape 8: Déclencher le déploiement # Étape 8: Déclencher le déploiement
- name: trigger-deployment - name: trigger-deployment
image: curlimages/curl:latest image: curlimages/curl:latest
environment: environment:
WOODPECKER_API: *woodpecker_api
WOODPECKER_TOKEN: WOODPECKER_TOKEN:
from_secret: woodpecker_token from_secret: woodpecker_token
commands: | commands: |
source $CI_WORKSPACE/version.env source $CI_WORKSPACE/version.env
if [ "$version_type" != "none" ]; then if [ "$version_type" != "none" ]; then
echo "🚀 Déclenchement du déploiement pour la version $NEW_VERSION" echo "🚀 Déclenchement du déploiement pour la version $NEW_VERSION"
echo "🚀 $CI_REPO_OWNER" echo "🚀 $CI_REPO_OWNER"
echo "🚀 $CI_REPO_NAME" echo "🚀 $CI_REPO_NAME"
echo "http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines" echo "$WOODPECKER_API/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines"
curl -v --fail -X POST \ curl -v --fail -X POST "$WOODPECKER_API/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines" \
"http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines" \
-H "Authorization: Bearer $WOODPECKER_TOKEN" \ -H "Authorization: Bearer $WOODPECKER_TOKEN" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
@@ -195,9 +200,34 @@ steps:
"deploy_id": "'$CI_PIPELINE_NUMBER'", "deploy_id": "'$CI_PIPELINE_NUMBER'",
"ref": "refs/tags/v'$NEW_VERSION'" "ref": "refs/tags/v'$NEW_VERSION'"
}' }'
echo "✅ Événement deployment déclenché" echo "✅ Événement deployment déclenché"
else else
echo "⏭️ Pas de déclenchement (version_type=none)" echo "⏭️ Pas de déclenchement (version_type=none)"
fi fi
depends_on: [ commit_tag ] depends_on: [ commit_tag ]
when:
- event: never
- name: trigger-deployment2
image: woodpeckerci/plugin-trigger
settings:
# L'URL de votre serveur Woodpecker
server: https://woodpecker.cicd.exygen.fr
# Le token d'API (doit être stocké comme secret)
branche: main
deploy_pipeline: ${CI_PIPELINE_NUMBER}
token:
from_secret: woodpecker_token
# Le dépôt cible, avec la branche optionnelle (format propriétaire/répertoire[@branche])
repo: domaine-passignat/gestion
# Paramètre CLÉ : active l'événement 'deployment' et spécifie l'environnement cible
deploy_to: production
# (Optionnel) Transmettre des variables au pipeline déclenché (ex: une version)
params:
- VERSION=${NEW_VERSION}
# (Optionnel) Attendre la fin du pipeline déclenché
wait: true
# Déclenche cette étape uniquement après une publication réussie
depends_on: [ commit_tag ]
when:
- event: never

View File

@@ -1,19 +1,42 @@
# Documentation: https://woodpecker-ci.org/docs/usage/workflow-syntax # Documentation: https://woodpecker-ci.org/docs/usage/workflow-syntax
when: when:
- event: deployment - event: [ deployment,manual ]
variables:
minio_mc: &minio_mc minio/mc
appleboy_drone_scp: &appleboy_drone_scp appleboy/drone-scp
appleboy_drone_ssh: &appleboy_drone_ssh appleboy/drone-ssh
curlimages_curl: &curlimages_curl curlimages/curl:latest
nexus_url: &nexus_url http://nexus.cicd.exygen.fr/repository/domaine-passignat/apps
steps: steps:
- name: get-share-data
image: *minio_mc
commands:
- echo " Load pipeline info"
- mc alias set local http://minio:9000 minioadmin minioadmin123
- mc get local/cicd/repository_$CI_REPO_REMOTE_ID/pipeline_$CI_PIPELINE_PARENT .buildinfo
- ls -als
- name: get-artifact - name: get-artifact
image: curlimages/curl:latest image: *curlimages_curl
commands: | environment:
VERSION=${CI_COMMIT_TAG#v} NEXUS_USERNAME:
curl -o /tmp/${CI_REPO_NAME}-${VERSION}.tar \ from_secret: nexus_username
"https://nexus.cicd.exygen.fr/repository/domaine-passignat/apps/${CI_REPO_NAME}/${VERSION}/${CI_REPO_NAME}-${VERSION}.tar" NEXUS_PASSWORD:
from_secret: nexus_password
NEXUS_REPOSITORY: domaine-passignat
NEXUS_URL: *nexus_url
commands:
- ls -als
- source .buildinfo
- curl -o /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar "${NEXUS_URL}/${CI_REPO_NAME}/${NEW_VERSION}/${CI_REPO_NAME}-${NEW_VERSION}.tar"
depends_on: [ get-share-data ]
# Étape 7: Transfert vers le serveur distant (SCP) # Étape 7: Transfert vers le serveur distant (SCP)
- name: transfert - name: transfert
image: appleboy/drone-scp image: *appleboy_drone_scp
settings: settings:
host: host:
from_secret: remote_host from_secret: remote_host
@@ -22,13 +45,13 @@ steps:
password: password:
from_secret: remote_password from_secret: remote_password
port: 22 port: 22
source: /tmp/${CI_REPO_NAME}-${VERSION}.tar source: /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar
target: /tmp/ target: /tmp/
depends_on: [ get-artifact ] depends_on: [ get-artifact ]
# Étape 8: Déploiement sur le serveur distant # Étape 8: Déploiement sur le serveur distant
- name: deploy - name: deploy
image: appleboy/drone-ssh image: *appleboy_drone_ssh
environment: environment:
SUDO_PASSWORD: SUDO_PASSWORD:
from_secret: remote_password from_secret: remote_password
@@ -43,19 +66,20 @@ steps:
envs: envs:
- SUDO_PASSWORD - SUDO_PASSWORD
script: script:
- source .buildinfo
- echo "$${SUDO_PASSWORD}" | sudo -S systemctl stop gestion - echo "$${SUDO_PASSWORD}" | sudo -S systemctl stop gestion
- mkdir -p /srv/volumes/gestion/{front-binaries,back-binaries,tmpdb} - mkdir -p /srv/volumes/gestion/{front-binaries,back-binaries,tmpdb}
- rm -rf /srv/volumes/gestion/front-binaries/* - rm -rf /srv/volumes/gestion/front-binaries/*
- rm -rf /srv/volumes/gestion/back-binaries/* - rm -rf /srv/volumes/gestion/back-binaries/*
- rm -rf /srv/volumes/gestion/tmpdb/* - rm -rf /srv/volumes/gestion/tmpdb/*
- tar -xvf /tmp/${CI_REPO_NAME}-${VERSION}.tar -C /tmp - tar -xvf /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar -C /tmp
- tar -xvf /tmp/front.tar.gz -C /srv/volumes/gestion/front-binaries - tar -xvf /tmp/front.tar.gz -C /srv/volumes/gestion/front-binaries
- tar -xzvf /tmp/back.tar.gz -C /srv/volumes/gestion/back-binaries - tar -xzvf /tmp/back.tar.gz -C /srv/volumes/gestion/back-binaries
- tar -xzvf /tmp/db.tar.gz -C /srv/volumes/gestion/tmpdb - tar -xzvf /tmp/db.tar.gz -C /srv/volumes/gestion/tmpdb
- rm -f /tmp/front.tar.gz - rm -f /tmp/front.tar.gz
- rm -f /tmp/back.tar.gz - rm -f /tmp/back.tar.gz
- rm -f /tmp/db.tar.gz - rm -f /tmp/db.tar.gz
- rm -f /tmp/${CI_REPO_NAME}-${VERSION}.tar - rm -f /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar
- docker-compose up database - docker-compose up database
- cd /srv/volumes/gestion/tmpdb - cd /srv/volumes/gestion/tmpdb
- npm ci --cache .npm --prefer-offline - npm ci --cache .npm --prefer-offline

View File

@@ -1 +1 @@
test 2222222 test 2222222xxxlm

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -0,0 +1 @@
-- none

View File

@@ -1,7 +1,7 @@
{ {
"name": "cicd", "name": "cicd",
"private": true, "private": true,
"version": "0.0.12", "version": "0.0.51",
"description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL", "description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL",
"scripts": { "scripts": {
"update:patch": "node scripts/update-version.js -patch", "update:patch": "node scripts/update-version.js -patch",