.gitlab-ci.yml 946 Bytes
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
Laurent Heirendt committed
9
    - if: $CI_COMMIT_BRANCH == "build-ci"
Laurent Heirendt's avatar
Laurent Heirendt committed
10
11
12
13
14
    - if: $CI_COMMIT_BRANCH == "master"
  before_script:
    - pip install casq
  script:
    - python .ci/convertCASQ.py
Laurent Heirendt's avatar
Laurent Heirendt committed
15
16
17
  artifacts:
    expire_in: 1 day
    paths:
Laurent Heirendt's avatar
Laurent Heirendt committed
18
      - "Executable Modules"/SBML_Qual_build/
Laurent Heirendt's avatar
Laurent Heirendt committed
19
20

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