Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0718c74966 | ||
|
|
e180afb2e3 | ||
|
|
fb305b72b3 | ||
|
|
a7bcffac98 | ||
|
|
62b401b5a1 | ||
|
|
11b254dff0 | ||
|
|
d5a0aa55d5 | ||
|
|
4b5add7403 | ||
|
|
c862b55393 | ||
|
|
bb5aebdc83 | ||
|
|
d169289cb9 | ||
|
|
ca1b8933a6 | ||
|
|
0f10a62426 | ||
|
|
ebcf40efb0 | ||
|
|
066e5565c5 | ||
|
|
91149183a2 | ||
|
|
42ce3769cd | ||
|
|
33ab64f609 | ||
|
|
e63b6c4e3f | ||
|
|
9f5f919ff9 | ||
|
|
bae02f80e2 | ||
|
|
0aa601d144 |
@@ -8,7 +8,6 @@ variables:
|
||||
- &node_image node:18-alpine
|
||||
- &git_image alpine/git
|
||||
- &curl_image curlimages/curl:latest
|
||||
- &repository domaine-passignat
|
||||
|
||||
steps:
|
||||
# Étape 1: Nettoyage du projet
|
||||
@@ -20,7 +19,6 @@ steps:
|
||||
rm -rf dist
|
||||
rm -f $CI_WORKSPACE/build/version.env
|
||||
echo "✅ Nettoyage terminé"
|
||||
|
||||
depends_on: [ ]
|
||||
|
||||
# Étape 2: Analyser le message du commit
|
||||
@@ -67,15 +65,14 @@ steps:
|
||||
echo "ARTIFACT=no-artifact" >> $CI_WORKSPACE/version.env
|
||||
echo "⏭️ Pas de mise à jour de version"
|
||||
fi
|
||||
ls -als
|
||||
depends_on: [ prepare ]
|
||||
|
||||
# Étape 4: Build de l'application
|
||||
- name: build
|
||||
image: *node_image
|
||||
commands: |
|
||||
npm ci --cache .npm --prefer-offline
|
||||
npm run build
|
||||
commands:
|
||||
- npm ci --cache .npm --prefer-offline
|
||||
- npm run build
|
||||
depends_on: [ update_version ]
|
||||
|
||||
# Étape 5: Package des artefacts
|
||||
@@ -113,10 +110,9 @@ steps:
|
||||
from_secret: nexus_username
|
||||
NEXUS_PASSWORD:
|
||||
from_secret: nexus_password
|
||||
NEXUS_REPOSITORY: domaine-passignat
|
||||
commands: |
|
||||
source $CI_WORKSPACE/version.env
|
||||
echo $CI_REPO_OWNER
|
||||
echo $CI_REPO_NAME
|
||||
|
||||
if [ "$version_type" != "none" ]; then
|
||||
echo "📦 Publication de la version $NEW_VERSION : $ARTIFACT"
|
||||
@@ -126,17 +122,17 @@ steps:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -v \
|
||||
curl -v --fail \
|
||||
-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=*repository
|
||||
http://nexus.cicd.exygen.fr/service/rest/v1/components?repository=$NEXUS_REPOSITORY
|
||||
echo "✅ Artefact publié"
|
||||
else
|
||||
echo "⏭️ Pas de publication (version_type=none)"
|
||||
fi
|
||||
ls -als
|
||||
|
||||
depends_on: [ package ]
|
||||
|
||||
# Étape 7: Commit et tag (après publication)
|
||||
@@ -184,9 +180,9 @@ steps:
|
||||
source $CI_WORKSPACE/version.env
|
||||
|
||||
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 "http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines"
|
||||
curl -X POST \
|
||||
curl --fail -X POST \
|
||||
"http://woodpecker.cicd.exygen.fr/api/repos/$CI_REPO_OWNER/$CI_REPO_NAME/pipelines" \
|
||||
-H "Authorization: Bearer $WOODPECKER_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
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.7-0.0.8.sql
Normal file
1
database/src/sql/version-0.0.7-0.0.8.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- none
|
||||
1
database/src/sql/version-0.0.8-0.0.9.sql
Normal file
1
database/src/sql/version-0.0.8-0.0.9.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- none
|
||||
1
database/src/sql/version-0.0.9-0.0.10.sql
Normal file
1
database/src/sql/version-0.0.9-0.0.10.sql
Normal file
@@ -0,0 +1 @@
|
||||
-- none
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cicd",
|
||||
"private": true,
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.12",
|
||||
"description": "Node.js Rest Apis with Express, Sequelize & PostgreSQL",
|
||||
"scripts": {
|
||||
"update:patch": "node scripts/update-version.js -patch",
|
||||
|
||||
Reference in New Issue
Block a user