Compare commits
16 Commits
v0.0.10
...
8bf8e5448a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bf8e5448a | ||
|
|
564b5e9f3c | ||
|
|
ed31bcc0e3 | ||
|
|
bd17026643 | ||
|
|
68b3b81273 | ||
|
|
7eedd9549d | ||
|
|
e91c809d23 | ||
|
|
1de56405c4 | ||
|
|
0718c74966 | ||
|
|
e180afb2e3 | ||
|
|
fb305b72b3 | ||
|
|
a7bcffac98 | ||
|
|
62b401b5a1 | ||
|
|
11b254dff0 | ||
|
|
d5a0aa55d5 | ||
|
|
4b5add7403 |
@@ -178,11 +178,12 @@ steps:
|
|||||||
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_NAME"
|
||||||
echo "http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines"
|
echo "http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines"
|
||||||
curl -X POST \
|
curl -v --fail -X POST \
|
||||||
"http://woodpecker.cicd.exygen.fr/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" \
|
||||||
@@ -193,9 +194,30 @@ 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 ]
|
||||||
|
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
token:
|
||||||
|
from_secret: woodpecker_token
|
||||||
|
# Le dépôt cible, avec la branche optionnelle (format propriétaire/répertoire[@branche])
|
||||||
|
repositories:
|
||||||
|
- domaine-passignat/gestion@main
|
||||||
|
# Paramètre CLÉ : active l'événement 'deployment' et spécifie l'environnement cible
|
||||||
|
deploy: 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 ]
|
depends_on: [ commit_tag ]
|
||||||
1
database/src/sql/version-0.0.10-0.0.11.sql
Normal file
1
database/src/sql/version-0.0.10-0.0.11.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
1
database/src/sql/version-0.0.11-0.0.12.sql
Normal file
1
database/src/sql/version-0.0.11-0.0.12.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
1
database/src/sql/version-0.0.12-0.0.13.sql
Normal file
1
database/src/sql/version-0.0.12-0.0.13.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
1
database/src/sql/version-0.0.13-0.0.14.sql
Normal file
1
database/src/sql/version-0.0.13-0.0.14.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
-- none
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cicd",
|
"name": "cicd",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.10",
|
"version": "0.0.14",
|
||||||
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user