Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
symfony5:divers_integration_continue_gitlab [2021/03/30 20:05] marclebrun [Pipeline d'intégration continue] |
— (Version actuelle) | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Intégration Continue / GitLab ====== | ||
- | |||
- | Source: [[https://www.youtube.com/watch?v=YX_8oAL6EcY&list=PLxEJ5uJLOPDwPMziG3TY0UIZorId4fIpX&index=1|Intégration continue d’un projet Symfony 5 avec GitLab CI]] | ||
- | |||
- | ====== Compte GitLab ====== | ||
- | |||
- | [[https://gitlab.com/users/sign_up]] | ||
- | |||
- | ====== Création d'un projet Symfony ====== | ||
- | |||
- | <code bash> | ||
- | cd /home/marc/web | ||
- | symfony new monprojet --full | ||
- | cd monprojet | ||
- | </code> | ||
- | |||
- | ====== Création du dépôt GitLab ====== | ||
- | |||
- | * **GitLab** > **New** > **Create Blank Project** | ||
- | |||
- | <code bash> | ||
- | git init | ||
- | git remote add origin https://gitlab.com/marclebrun/monprojet.git | ||
- | git add . | ||
- | git commit -m "Initial commit" | ||
- | git push -u origin master | ||
- | </code> | ||
- | |||
- | ====== Pipeline d'intégration continue ====== | ||
- | |||
- | Créer un fichier **.gitlab-ci.yml** à la racine du projet. | ||
- | |||
- | <code yml .gitlab-ci.yml> | ||
- | </code> | ||
- | |||
- | ====== Base de données ====== | ||
- | |||
- | Éditer le **.env** pour spécifier une DB locale. | ||
- | |||
- | <code ini .env> | ||
- | DATABASE_URL="mysql://root:password@localhost:3306/db_name?serverVersion=5.7" | ||
- | </code> | ||
- | |||
- | Créer la base de données. | ||
- | |||
- | <code bash> | ||
- | php bin/console doctrine:database:create | ||
- | </code> | ||
- | |||
- | //... à suivre ...// | ||