Outils pour utilisateurs

Outils du site


tech:notes_gitlab-ci_pipeline

Notes gitlab-ci pipeline

Voir :

Voir aussi:

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

tech/notes_gitlab-ci_pipeline.txt · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki