{{tag>Brouillon}}
= Notes gitlab-ci pipeline
Voir :
* https://docs.gitlab.com/ee/ci/quick_start/
* https://blog.stephane-robert.info/post/introduction-gitlab-ci/
* https://blog.drone.io/drone-adapter-gitlab-pipelines/
Voir aussi:
* 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
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''
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 :
stages:
build
test
deploy
Pour tester en local
gitlab-runner exec shell job1
== Secure file
# 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:
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