stages:
  - build
  - deploy

build:
  image: ubuntu
  stage: build
  script:
    - apt update
    - apt install -y python3
    - apt install -y python3-venv
    - apt install gcc
    - mkdir -p /opt/strudle2/
    - python3 -m venv /opt/strudel2/tes
    - source /opt/strudel2/tes/bin/activate
    - pip install -r requirements.txt
    - python ./setup.py install
  artifacts:
    paths:
      - /opt/strudel2/tes

deploy_test:
  stage: deploy
  only:
    - testing@hpc-team/strudelv2_spa
  tags: 
    - deploy_test
  script:
    - echo "deploying test"
  dependencies:
    - build

deploy_dev:
  stage: deploy
  only:
    - dev@hpc-team/strudelv2_spa
  tags: 
    - deploy_dev
  script:
    - echo "deploying dev"
    - ls -l
    - ./install.sh
  dependencies:
    - build
