.gitlab-ci.yml 1003 Bytes
Newer Older
Millicent Billette's avatar
Millicent Billette committed
1
stages:
2 3
  - install
  - run
Millicent Billette's avatar
Millicent Billette committed
4 5 6
  - publish
variables:
  PROJECT_NAME: g1.1000i100.fr/wot-wizard
7 8 9
install:
  stage: install
  image: 'inutano/wget'
Millicent Billette's avatar
Millicent Billette committed
10 11 12 13 14
  script:
    - wget https://github.com/duniter/WotWizard/releases/download/v2.0.1/WWServer.exe
    - wget https://www.sqlite.org/2015/sqlite-dll-win32-x86-3081002.zip
    - unzip sqlite*
    - wget https://g1.1000i100.fr/duniter.db
15 16 17 18 19 20 21 22
  artifacts:
    paths:
      - ./
    expire_in: 60 minutes
run:
  stage: run
  image: 'tianon/wine'
  script:
Millicent Billette's avatar
Millicent Billette committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    - wine WWServer.exe
  artifacts:
    paths:
      - ./
    expire_in: 60 minutes
server-1:
  stage: publish
  image: liaohuqiu/rsync
  cache:
    untracked: true
    key: $CI_JOB_NAME
  before_script:
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - mkdir -p ~/.ssh
    - >-
      [[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >
      ~/.ssh/config
  script:
    - >-
      rsync -az -e ssh ./
      gammanu@1000i100.fr:~/${PROJECT_NAME}
  only:
    - master