.gitlab-ci.yml 1.15 KB
Newer Older
Laurent Heirendt's avatar
Laurent Heirendt committed
1
stages:
Laurent Heirendt's avatar
Laurent Heirendt committed
2
3
  - convert
  - deploy
Laurent Heirendt's avatar
Laurent Heirendt committed
4

Laurent Heirendt's avatar
Laurent Heirendt committed
5
convert:
Laurent Heirendt's avatar
Laurent Heirendt committed
6
  image: python
Laurent Heirendt's avatar
Laurent Heirendt committed
7
  stage: convert
Laurent Heirendt's avatar
Laurent Heirendt committed
8
  rules:
Laurent Heirendt's avatar
only MR    
Laurent Heirendt committed
9
    - if: $CI_MERGE_REQUEST_ID
Laurent Heirendt's avatar
Laurent Heirendt committed
10
11
    - if: $CI_COMMIT_MESSAGE != "Merge branch 'tmpBranch' into build-ci"
    - if: $CI_COMMIT_MESSAGE != "Update models"
Laurent Heirendt's avatar
Laurent Heirendt committed
12
13
14
15
  before_script:
    - pip install casq
  script:
    - python .ci/convertCASQ.py
Laurent Heirendt's avatar
Laurent Heirendt committed
16
17
18
  artifacts:
    expire_in: 1 day
    paths:
Laurent Heirendt's avatar
Laurent Heirendt committed
19
      - "Executable Modules"
Laurent Heirendt's avatar
Laurent Heirendt committed
20
21

commit:
Laurent Heirendt's avatar
Laurent Heirendt committed
22
23
24
  image:
    name: alpine/git:latest
    entrypoint: [""]
Laurent Heirendt's avatar
Laurent Heirendt committed
25
26
  stage: deploy
  rules:
Laurent Heirendt's avatar
Laurent Heirendt committed
27
28
    - if: $CI_COMMIT_MESSAGE != "Merge branch 'tmpBranch' into build-ci"
    - if: $CI_COMMIT_MESSAGE != "Update models"
29
  before_script:
Laurent Heirendt's avatar
Laurent Heirendt committed
30
    - env
31
    - url_host=`git remote get-url origin | sed -e "s/https:\/\/gitlab-ci-token:.*@//g"`
Laurent Heirendt's avatar
Laurent Heirendt committed
32
    - git remote set-url origin "https://$GIT_ACCESS_USER:$GIT_ACCESS_TOKEN@${url_host}"
33
34
    - git config user.name $GIT_ACCESS_USER
    - git config user.email $GIT_ACCESS_EMAIL
Laurent Heirendt's avatar
Laurent Heirendt committed
35
  script:
Laurent Heirendt's avatar
Laurent Heirendt committed
36
    - git checkout -b tmpBranch
Laurent Heirendt's avatar
Laurent Heirendt committed
37
38
    - git add --all
    - git commit -m "Update models"
Laurent Heirendt's avatar
Laurent Heirendt committed
39
    - git checkout $CI_COMMIT_REF_NAME
Laurent Heirendt's avatar
Laurent Heirendt committed
40
    - git pull origin $CI_COMMIT_REF_NAME
41
    - git merge tmpBranch --ff
Laurent Heirendt's avatar
Laurent Heirendt committed
42
    - git push origin $CI_COMMIT_REF_NAME
43
    - git branch -D tmpBranch