-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
47 lines (44 loc) · 1.35 KB
/
.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
36
37
38
39
40
41
42
43
44
45
46
47
image:
name: python:3.12
stages:
- docs
- update
pages:
stage: docs
before_script:
- pip install -r mkdocs-requirements.txt
script:
- mkdocs build --verbose --site-dir public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
needs: []
update:onprem-runai:
stage: update
tags:
- on-prem
#variables:
# REPO_URL_ONPREM_RUNAI: url-in-settings
# REPO_USERNAME_ONPREM_RUNAI: username-in-settings
# REPO_PASSWORD_ONPREM_RUNAI: password-in-settings
before_script:
- pip install cookiecutter unidiff
- mkdir -p /tmp/kapitan-hull && cd $_
- git config --global user.name "Kapitan Hull Bot"
- git config --global user.email "[email protected]"
script:
- cookiecutter --replay-file $CI_PROJECT_DIR/cookiecutter-onprem-runai.yaml $CI_PROJECT_DIR
- git clone https://$REPO_USERNAME_ONPREM_RUNAI:$REPO_PASSWORD_ONPREM_RUNAI@$REPO_URL_ONPREM_RUNAI git-repo
- cd git-repo
- git checkout -B $CI_COMMIT_BRANCH
- git pull origin $CI_COMMIT_BRANCH || echo "Nothing to pull"
- cd ../kapitan-hull-onprem-runai-test
- cp -rv ../git-repo/.git .
- git add .
- git commit -m "$CI_COMMIT_MESSAGE" || echo "Nothing to commit"
- git push origin $CI_COMMIT_BRANCH || echo "Nothing to push"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
needs: []