Compare commits

..

20 Commits

Author SHA1 Message Date
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
8 changed files with 47 additions and 25 deletions

View File

@@ -3,9 +3,11 @@ when:
branch: [ main ]
variables:
- &node_image node:18-alpine
- &git_image alpine/git
- &curl_image curlimages/curl:latest
node_image: &node_image node:18-alpine
git_image: &git_image alpine/git
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:
# Étape 1: Nettoyage du projet
@@ -105,6 +107,7 @@ steps:
NEXUS_PASSWORD:
from_secret: nexus_password
NEXUS_REPOSITORY: domaine-passignat
NEXUS_API: *nexus_api
commands: |
source $CI_WORKSPACE/version.env
@@ -120,8 +123,7 @@ steps:
-u "$NEXUS_USERNAME:$NEXUS_PASSWORD" \
-F "raw.directory=apps/$CI_REPO_NAME/$NEW_VERSION" \
-F "raw.asset1=@$ARTIFACT_FILE" \
-F "raw.asset1.filename=$ARTIFACT" \
http://nexus.cicd.exygen.fr/service/rest/v1/components?repository=$NEXUS_REPOSITORY
-F "raw.asset1.filename=$ARTIFACT" $NEXUS_API/components?repository=$NEXUS_REPOSITORY
echo "✅ Artefact publié"
else
echo "⏭️ Pas de publication (version_type=none)"
@@ -170,14 +172,15 @@ steps:
- echo " Save pipeline info"
- echo NEW_VERSION=$NEW_VERSION > .buildinfo
- mc alias set local http://minio:9000 minioadmin minioadmin123
- mc mb local || true
- mc cp .buildinfo local/repository_$CI_REPO_REMOTE_ID/pipeline_$CI_PIPELINE_NUMBER
- 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
- name: trigger-deployment
image: curlimages/curl:latest
environment:
WOODPECKER_API: *woodpecker_api
WOODPECKER_TOKEN:
from_secret: woodpecker_token
commands: |
@@ -186,9 +189,8 @@ steps:
echo "🚀 Déclenchement du déploiement pour la version $NEW_VERSION"
echo "🚀 $CI_REPO_OWNER"
echo "🚀 $CI_REPO_NAME"
echo "http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines"
curl -v --fail -X POST \
"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 "$WOODPECKER_API/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines" \
-H "Authorization: Bearer $WOODPECKER_TOKEN" \
-H "Content-Type: application/json" \
-d '{

View File

@@ -2,27 +2,42 @@
when:
- 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:
- name: share-data
image: minio/mc
- name: get-share-data
image: *minio_mc
commands:
- echo " Save pipeline info"
- echo NEW_VERSION=$NEW_VERSION > .buildinfo
- echo " Load pipeline info"
- mc alias set local http://minio:9000 minioadmin minioadmin123
- mc get local/repository_$CI_REPO_REMOTE_ID/pipeline_$CI_PIPELINE_PARENT .buildinfo
- mc get local/cicd/repository_$CI_REPO_REMOTE_ID/pipeline_$CI_PIPELINE_PARENT .buildinfo
- ls -als
- name: get-artifact
image: curlimages/curl:latest
image: *curlimages_curl
environment:
NEXUS_USERNAME:
from_secret: nexus_username
NEXUS_PASSWORD:
from_secret: nexus_password
NEXUS_REPOSITORY: domaine-passignat
NEXUS_URL: *nexus_url
commands: |
source .buildinfo
echo new version: ${NEW_VERSION}
curl -o /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar \
"https://nexus.cicd.exygen.fr/repository/domaine-passignat/apps/${CI_REPO_NAME}/${NEW_VERSION}/${CI_REPO_NAME}-${VERSION}.tar"
- ls -als
- source .buildinfo
- echo new version: ${NEW_VERSION}
- curl -o /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar "$NEXUS_URL/${CI_REPO_NAME}/${NEW_VERSION}/${CI_REPO_NAME}-${VERSION}.tar"
depends_on: [ get-share-data ]
# Étape 7: Transfert vers le serveur distant (SCP)
- name: transfert
image: appleboy/drone-scp
image: *appleboy_drone_scp
settings:
host:
from_secret: remote_host
@@ -33,11 +48,11 @@ steps:
port: 22
source: /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar
target: /tmp/
depends_on: [ get-artifact ,share-data]
depends_on: [ get-artifact ]
# Étape 8: Déploiement sur le serveur distant
- name: deploy
image: appleboy/drone-ssh
image: *appleboy_drone_ssh
environment:
SUDO_PASSWORD:
from_secret: remote_password

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",
"private": true,
"version": "0.0.41",
"version": "0.0.46",
"description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL",
"scripts": {
"update:patch": "node scripts/update-version.js -patch",