Skip to content
Snippets Groups Projects
Commit e1770855 authored by Elias Chetouane's avatar Elias Chetouane
Browse files

Ajout de commentaires au code du pipeline.

parent f99a5370
No related branches found
No related tags found
No related merge requests found
...@@ -3,18 +3,25 @@ image: python:3-alpine ...@@ -3,18 +3,25 @@ image: python:3-alpine
actualisation_dois: actualisation_dois:
only: only:
# restreindre au déclenchement automatique par schedule ou déclenchement manuel pour éviter de tourner en boucle (le commit produit par le pipeline qui déclenche le pipeline à nouveau)
- schedules - schedules
- web - web
before_script: before_script:
# installations permettant de faire tourner git
- apk update - apk update
- apk add git openssh - apk add git openssh
script: script:
# installation des bibliothèques python et exécution du script
- pip install pandas - pip install pandas
- pip install requests - pip install requests
- pip install matplotlib - pip install matplotlib
- python run-all-codes.py - python run-all-codes.py
after_script: after_script:
# commit des changements suite à l'exécution du script
- git config user.name "${GITLAB_USER_NAME}" - git config user.name "${GITLAB_USER_NAME}"
- git config user.email "${GITLAB_USER_EMAIL}" - git config user.email "${GITLAB_USER_EMAIL}"
- git remote set-url --push origin "https://PUSH_TOKEN:${ACCESS_TOKEN}@gricad-gitlab.univ-grenoble-alpes.fr/${CI_PROJECT_PATH}.git" - git remote set-url --push origin "https://PUSH_TOKEN:${ACCESS_TOKEN}@gricad-gitlab.univ-grenoble-alpes.fr/${CI_PROJECT_PATH}.git"
...@@ -22,13 +29,16 @@ actualisation_dois: ...@@ -22,13 +29,16 @@ actualisation_dois:
- git commit -m "Execution du pipeline. Actualisation des dois et des graphes." - git commit -m "Execution du pipeline. Actualisation des dois et des graphes."
- git push origin HEAD:${CI_COMMIT_REF_NAME} - git push origin HEAD:${CI_COMMIT_REF_NAME}
# création d'un espace accueillant le clone du repo du site web
- cd .. - cd ..
- mkdir cloned_repo - mkdir cloned_repo
- cd cloned_repo - cd cloned_repo
- git clone ${LINK_TO_CLONE} - git clone ${LINK_TO_CLONE}
- cd - - cd -
# copier le fichier "nb-dois.txt" pour commit dans le repo du site web
- cp open-research-data-monitor-back/1-enrich-with-datacite/nb-dois.txt cloned_repo/${PATH_TO_PUSH} - cp open-research-data-monitor-back/1-enrich-with-datacite/nb-dois.txt cloned_repo/${PATH_TO_PUSH}
- cd cloned_repo/${PATH_TO_PUSH} - cd cloned_repo/${PATH_TO_PUSH}
# commit du fichier "nb-dois.txt" vers le repo du site web
- git config user.name "${GITLAB_USER_NAME}" - git config user.name "${GITLAB_USER_NAME}"
- git config user.email "${GITLAB_USER_EMAIL}" - git config user.email "${GITLAB_USER_EMAIL}"
- git remote set-url --push origin "https://PUSH_TOKEN2:${ACCESS_TOKEN2}@gricad-gitlab.univ-grenoble-alpes.fr/${PROJECT_PATH2}.git" - git remote set-url --push origin "https://PUSH_TOKEN2:${ACCESS_TOKEN2}@gricad-gitlab.univ-grenoble-alpes.fr/${PROJECT_PATH2}.git"
...@@ -37,6 +47,7 @@ actualisation_dois: ...@@ -37,6 +47,7 @@ actualisation_dois:
- git push origin HEAD:main - git push origin HEAD:main
artifacts: artifacts:
# ajout des fichiers du dépôt qui ont été modifiés, au cas où un problème serait survenu dans "after_script"
paths: paths:
- dois-uga.csv - dois-uga.csv
- 2-produce-graph/hist-evol-datasets-per-repo.png - 2-produce-graph/hist-evol-datasets-per-repo.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment