-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
35 lines (32 loc) · 988 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
include:
- project: enterprise-pipelines/gitlab-ci/includes
file: SAST/sonarqube.yml
stages:
- static-analysis
- sync
sonarqube:
stage: static-analysis
variables:
SONAR_PROJECT_KEY: "t5gfe-dashboard" # only needed if you do not include sonar-project.properties
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH &&
$CI_PIPELINE_SOURCE == "push"
tags:
- docker
- shared
github_sync:
stage: sync
script:
- git config --global user.email "${GL_USER_EMAIL}"
- git config --global user.name "${GL_USER}"
- git clone git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git
- cd t5g-field-support-team-utils
- git remote add upstream https://$GH_USER:[email protected]/RHsyseng/t5g-field-support-team-utils.git
- git fetch upstream
- git checkout main
- git merge upstream/main --allow-unrelated-histories
- git push origin main
- echo "Sync has completed"
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'