patch: pipeline minio

This commit is contained in:
spassignat
2026-05-04 16:38:03 +02:00
parent c49bfa33a8
commit cc0e6db4a7
2 changed files with 15 additions and 20 deletions

View File

@@ -11,20 +11,15 @@ steps:
# Étape 1: Nettoyage du projet
- name: clean_project
image: *git_image
commands: |
ls -als /
touch /shared/build.txt
echo "1 $CI_WORKSPACE"
rm -rf dist
rm -f $CI_WORKSPACE/build/version.env
echo "✅ Nettoyage terminé"
depends_on: [ ]
commands:
- rm -rf dist
- rm -f $CI_WORKSPACE/build/version.env
- echo "✅ Nettoyage terminé"
# Étape 2: Analyser le message du commit
- name: prepare
image: *git_image
commands: |
COMMIT_MSG=$(git log -1 --pretty=%B)
echo "📝 Message: $COMMIT_MSG"
@@ -141,12 +136,7 @@ steps:
from_secret: gitea_token
commands: |
source $CI_WORKSPACE/version.env
if [ -d "/shared" ]; then
echo "Le répertoire shared existe"
ls -als /shared/
else
exit -1
fi
if [ "$version_type" != "none" ]; then
git remote set-url origin http://oauth2:$GITEA_TOKEN@gitea.cicd.exygen.fr/$CI_REPO_OWNER/$CI_REPO_NAME.git
git config user.email "woodpecker@exygen.fr"
@@ -172,7 +162,6 @@ steps:
else
echo "⚠️ Aucun changement à commiter"
fi
ls -alsR /shared/builds/
depends_on: [ publish ]
- name: share-data

View File

@@ -4,13 +4,19 @@ when:
- event: [ deployment,manual ]
steps:
- 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 get local/ci/$CI_REPO_REMOTE_ID/$CI_PIPELINE_PARENT .buildinfo
depends_on: [ commit_tag ]
- name: get-artifact
image: curlimages/curl:latest
commands: |
env
BUILD=/shared/builds/$CI_REPO_REMOTE_ID/$CI_PIPELINE_PARENT
ls -alsR /shared/builds/
source $BUILD
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"