File: .gitlab-ci.yml

package info (click to toggle)
ldapjdk 5.3.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,756 kB
  • sloc: ansic: 44,727; java: 39,706; xml: 7,623; sh: 4,497; perl: 3,774; makefile: 1,680; cpp: 979
file content (22 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
image: fedora

sync:

  script:
    - echo "Synchronizing $CI_COMMIT_BRANCH branch from $UPSTREAM_URL to $CI_PROJECT_URL"
    - dnf install -y git
    - git remote set-url origin https://sync:$ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
    - git remote remove upstream || true
    - git remote add upstream $UPSTREAM_URL
    - git remote -v
    - git fetch upstream $CI_COMMIT_BRANCH
    - git checkout upstream/$CI_COMMIT_BRANCH
    - git log origin/$CI_COMMIT_BRANCH..upstream/$CI_COMMIT_BRANCH --oneline
    - GIT_SSL_NO_VERIFY=true git push origin HEAD:$CI_COMMIT_BRANCH

  rules:
    - if: $SYNC == "true"

  tags:
    # Use shared runners.
    - shared