before_script:
  - "source ~gitlab-runner/cicd_support/cicd_support.shinc" 

after_script:
  - "source ~gitlab-runner/cicd_support/cicd_support.shinc" 

stages:
  - clean
  - build
  - test
  - deploy




#
# Building
#

.do-build: &do-build
  stage: build
  script:
    - ./cicd_testing/do-clean.sh 
    - ./cicd_testing/do-build.sh 
    - ./cicd_testing/do-test.sh 

do-build-ubuntu18:
  <<: *do-build
  tags:
    - ubuntu22

#
# testing docker container, plus weekly deployment
#

.do-deploy: &do-deploy
  stage: deploy
  script:
    - ./cicd_testing/do-deploy.sh 

do-deploy-ubuntu18:
  <<: *do-deploy
  tags:
    - ubuntu22

pages:
  tags:
  - ubuntu22
  stage: deploy
  script:
  - ./cicd_testing/do-deploy-web.sh
  artifacts:
    paths:
    - public
  only:
  - master
