Outils pour utilisateurs

Outils du site


tech:notes_gitlab-ci_pipeline

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_gitlab-ci_pipeline [2025/11/12 11:12] Jean-Baptistetech:notes_gitlab-ci_pipeline [2026/06/18 09:33] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon}}
 +
 +# Notes gitlab-ci pipeline
 +
 +Voir :
 +  * [[Notes Gitlab]]
 +
 +
 +Bases Gitlab-CI
 +  * https://docs.gitlab.com/ci/
 +  * https://docs.gitlab.com/ci/yaml/
 +  * https://docs.gitlab.com/ee/ci/quick_start/
 +  * https://gitlab.com/gitlab-org/gitlab/-/blob/d86d1d09aa5bfd97ce76ad13cbe3aacf4be785ad/doc/ci/pipelines/settings.md#change-which-users-can-view-your-pipelines
 +  * https://blog.stephane-robert.info/post/introduction-gitlab-ci/
 +  * https://blog.stephane-robert.info/docs/pipeline-cicd/gitlab/
 +  * https://blog.stephane-robert.info/docs/pipeline-cicd/gitlab/fondamentaux/concepts-base/
 +  * https://blog.stephane-robert.info/docs/pipeline-cicd/gitlab/fondamentaux/premier-pipeline/
 +  * https://blog.stephane-robert.info/docs/pipeline-cicd/gitlab/fondamentaux/validation-pipeline/
 +  * https://blog.stephane-robert.info/docs/pipeline-cicd/gitlab/fondamentaux/declencheurs/
 +  * https://docs.alcf.anl.gov/services/gitlab-ci/#on-boarding-with-cicd
 +  * https://formationsig.gitlab.io/gitbook/pages/Config_gitlab-ci-yml.html
 +  * https://www.younup.fr/blog/demystifier-gitlab-ci-cd
 +
 +Voir aussi :
 +  * [Continuous integration vs. continuous delivery vs. continuous deployment](https://about.gitlab.com/topics/ci-cd/cicd-pipeline/)
 +  * https://blog.drone.io/drone-adapter-gitlab-pipelines/
 +
 +Voir aussi les concurrents :
 +  * Voir https://gitea.com/gitea/awesome-gitea/src/branch/main/README.md
 +  * Drone CI
 +  * Woodpecker CI (fork of Drone)
 +  * tea-runner
 +  * Travis CI
 +  * Abstruse CI
 +  * Gitea Action
 +  * Agola: CI/CD
 +  * Metroline
 +  * mvoCI 
 +  * Jaypore CI
 +  * Tekton
 +  * Argo CD (CD for Kubernetes)
 +
 +
 +
 +
 +### Exemples
 +
 +~~~yaml
 +configure:
 +  stage: configure
 +  image: $BUILDER
 +  needs:
 +    - build
 +  script:
 +    - echo Starting
 +    - plop.sh
 +  when: manual
 +~~~
 +
 +
 +### Test CI/DI
 +
 +Créons un projet avec à la racine un fichier `.gitlab-ci.yml`
 +
 +`.gitlab-ci.yml`
 +~~~yaml
 +job1:
 +  stage: test
 +  script: echo 'my first job'
 +~~~
 +
 +NOTE : **stages** available are :
 +* .pre
 +* build
 +* test
 +* deploy
 +* .post
 +
 +Voir : https://docs.gitlab.com/ee/ci/yaml/README.html
 +
 +Ou nous pouvons le redéfinir :
 +~~~yaml
 +stages:
 +  build
 +  test
 +  deploy
 +~~~
 +
 +Pour tester en local
 +~~~bash
 +gitlab-runner exec shell job1
 +~~~
 +
 +
 +## Secure file
 +
 +~~~bash
 +# CI_API_V4_URL='https://gitlab.acme.fr/api/v4'
 +# CI_PROJECT_ID=58
 +# TOKEN_PLOP=plop
 +curl --request GET --header "PRIVATE-TOKEN: ${TOKEN_PLOP}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/secure_files/1/download" --output key'
 +~~~
 +
 +
 +## Skip CI
 +
 +Commit message : \
 +`[ci skip]` or `[skip ci]`
 +
 +Alternatively, one can pass the ci.skip Git push option if using Git 2.10 or newer:
 +~~~bash
 +git push -o ci.skip
 +~~~
 +
 +
 +## Autres
 +
 +Voir 
 +* https://github.com/telamonian/theme-darcula/blob/master/.ci_funcs.sh
 +* https://gitlab.version.fz-juelich.de/vis/jusense-cicd/-/blob/master/ci/ci_funcs.sh
 +* https://gitlab.qmagico.com.br/qmagico/qmparser/-/blob/6c56ef00f37d95abba803ae596ede610194298b3/ci/funcs.sh
 +
 +`requirements.txt`
 +~~~
 +Jinja2==2.11.2
 +j2cli-3==0.0.1
 +anybadge==1.7.0
 +~~~
 +
 +
 +
 +
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki