mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-15 18:38:23 +01:00
Merge branch 'ml/mirror-to-github' into 'main'
Ml/mirror to github See merge request naaice/tug!40
This commit is contained in:
commit
b6ce5a32f4
@ -5,8 +5,8 @@ before_script:
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- release
|
||||||
- static_analyze
|
- static_analyze
|
||||||
- doc
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
@ -22,8 +22,8 @@ test:
|
|||||||
reports:
|
reports:
|
||||||
junit: build/test_results.xml
|
junit: build/test_results.xml
|
||||||
|
|
||||||
pages:
|
doc:
|
||||||
stage: doc
|
stage: release
|
||||||
image: python:slim
|
image: python:slim
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update && apt-get install --no-install-recommends -y graphviz imagemagick doxygen make
|
- apt-get update && apt-get install --no-install-recommends -y graphviz imagemagick doxygen make
|
||||||
@ -39,6 +39,22 @@ pages:
|
|||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||||
|
|
||||||
|
push:
|
||||||
|
stage: release
|
||||||
|
variables:
|
||||||
|
GITHUB_REPOSITORY: 'git@github.com:POET-Simulator/tug.git'
|
||||||
|
ORIGINAL_REPO_URL: 'https://git.gfz-potsdam.de/naaice/tug.git'
|
||||||
|
ORIGINAL_REPO_NAME: 'tug'
|
||||||
|
before_script:
|
||||||
|
# I know that there is this file env variable in gitlab, but somehow it does not work for me (still complaining about white spaces ...)
|
||||||
|
# Therefore, the ssh key is stored as a base64 encoded string
|
||||||
|
- mkdir -p ~/.ssh && echo $GITHUB_SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_ed25519 && chmod 0600 ~/.ssh/id_ed25519
|
||||||
|
- ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
- rm -rf $ORIGINAL_REPO_NAME.git
|
||||||
|
- git clone --mirror $ORIGINAL_REPO_URL "$ORIGINAL_REPO_NAME.git" && cd $ORIGINAL_REPO_NAME.git
|
||||||
|
- git push --mirror $GITHUB_REPOSITORY
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
stage: static_analyze
|
stage: static_analyze
|
||||||
before_script:
|
before_script:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user