File: .gitlab-ci.yml

package info (click to toggle)
ldapjdk 5.5.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,664 kB
  • sloc: java: 39,720; sh: 606; xml: 563; makefile: 26
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