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 # Étape 1: Nettoyage du projet
- name: clean_project - name: clean_project
image: *git_image image: *git_image
commands: | commands:
ls -als / - rm -rf dist
touch /shared/build.txt - rm -f $CI_WORKSPACE/build/version.env
echo "1 $CI_WORKSPACE" - echo "✅ Nettoyage terminé"
rm -rf dist
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"
@@ -141,12 +136,7 @@ steps:
from_secret: gitea_token from_secret: gitea_token
commands: | commands: |
source $CI_WORKSPACE/version.env 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 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 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" git config user.email "woodpecker@exygen.fr"
@@ -172,7 +162,6 @@ steps:
else else
echo "⚠️ Aucun changement à commiter" echo "⚠️ Aucun changement à commiter"
fi fi
ls -alsR /shared/builds/
depends_on: [ publish ] depends_on: [ publish ]
- name: share-data - name: share-data

View File

@@ -4,13 +4,19 @@ when:
- event: [ deployment,manual ] - event: [ deployment,manual ]
steps: 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 - name: get-artifact
image: curlimages/curl:latest image: curlimages/curl:latest
commands: | commands: |
env source .buildinfo
BUILD=/shared/builds/$CI_REPO_REMOTE_ID/$CI_PIPELINE_PARENT
ls -alsR /shared/builds/
source $BUILD
echo new version: ${NEW_VERSION} echo new version: ${NEW_VERSION}
curl -o /tmp/${CI_REPO_NAME}-${NEW_VERSION}.tar \ 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" "https://nexus.cicd.exygen.fr/repository/domaine-passignat/apps/${CI_REPO_NAME}/${NEW_VERSION}/${CI_REPO_NAME}-${VERSION}.tar"