stages:
  - steve
  - build_webservice
  - test_maxima

variables:
  GIT_SUBMODULE_STRATEGY: recursive
  REGISTRY: "mathinstitut"

# gitlab ci script taken from https://gist.github.com/danielneis/5c6140ec8150c6151a54bccd26950278

steve_jobs:
  stage: steve
  image: golang
  tags:
    - docker
  script:
    - ./buildweb.sh
  artifacts:
    paths:
    - bin/web
    expire_in: 1 week

build_webservice:
  image: "docker:latest"
  stage: build_webservice
  tags:
    - docker
  before_script:
    - docker login -u mathinstitut -p "$DOCKERHUB_PASS"
  script:
    - ./build.sh "$REGISTRY" "$CI_COMMIT_TAG"
