Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 0dd159d8 rédigé par Erwan BOUSSE's avatar Erwan BOUSSE
Parcourir les fichiers

Replace artifacts by push to uncloud instance

parent 40915b36
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
variables:
NO_PROXY: "false"
cache:
paths:
- .m2/repository/
......@@ -9,7 +8,4 @@ cache:
build:
image: maven:3-openjdk-11
script:
- "bash compile.sh"
artifacts:
paths:
- "fr.univnantes.eclipsemde.updatesite/target/products"
\ No newline at end of file
- "bash compile-and-push.sh"
\ No newline at end of file
#!/bin/bash
set -x
set -e
# # Compile eclipse products
# if [[ $NO_PROXY == "true" ]]; then
# mvn package
# else
# mvn --settings ./.gitlab.maven.settings.xml package
# fi
# Setup uncloud remote configuration
WEBDAV_URL="https://uncloud.univ-nantes.fr/remote.php/dav/files/$uncloud_user"
REMOTE_PATH_BASE="Shares/eclipse-mde"
REMOTE_FOLDER_NAME=$(date "+%Y-%m-%d-T%H%M")
REMOTE_PATH=$REMOTE_PATH_BASE/$REMOTE_FOLDER_NAME
# Create new remote folder in which to push the files
curl \
-u "$uncloud_user:$uncloud_password" \
-X MKCOL \
"$WEBDAV_URL/$REMOTE_PATH"
# Upload each produced eclipse variant
for LOCAL_FILE_PATH in fr.univnantes.eclipsemde.updatesite/target/products/*; do
LOCAL_FILE_NAME=$(basename $LOCAL_FILE_PATH)
curl \
--user "$uncloud_user:$uncloud_password" \
-T $LOCAL_FILE_PATH \
$WEBDAV_URL/$REMOTE_PATH/$LOCAL_FILE_NAME
done
#!/bin/bash
if [[ $NO_PROXY == "true" ]]; then
mvn package
else
mvn --settings ./.gitlab.maven.settings.xml package
fi
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter