Skip to content

Commit

Permalink
Update 18.Schedule-pipeline.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LudovicPatho authored Feb 27, 2024
1 parent 60f4213 commit 8bbc156
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions 18.Schedule-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,26 @@ Sinon, le pipeline n'est pas créé. Aucun message d'erreur ne s'affiche.
## Exercice
- Créer un pipeline planifié, qui s'éxécute tous les jours à 8 du matin.
- Le pipeline ne doit s'éxecuter que s'il est déclenché par un pipeline de type ``schedule`` **ET** si la variable SCAN_ONLY est à true.


---

### Réponse

Cron
```
0 8 * * *
```

```yaml
scan-security:
tags: ["docker"]
rules:
- if: $SCAN_ONLY == true && $CI_PIPELINE_SOURCE == "schedule"
when: always
script:
- echo "Ceci est un pipeleine déclenché periodiquement"

```


0 comments on commit 8bbc156

Please sign in to comment.