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


after_script:
  - "echo Test Complete."

stages:
  - clean
  - build
  - test



#
# Cleaning
#

#template 
.do-clean: &do-nightly-clean
  stage: clean
  script:
    - ./cicd_testing/do-clean.sh

# per os items
do-nightly-clean-ubuntu18:
  <<: *do-nightly-clean
  tags:
    - ubuntu18
  variables:
    OS: 'ubuntu18'  

do-nightly-clean-ubuntu16:
  <<: *do-nightly-clean
  tags:
    - ubuntu16
  variables:
    OS: 'ubuntu16'  

do-nightly-clean-centos76:
  <<: *do-nightly-clean
  tags:
    - centos76
  variables:
    OS: 'centos76'  


#
# building 
#


# template
.do-build: &do-build
  stage: build
  script:
    - ./cicd_testing/do-build.sh


# per os items
do-build-ubuntu18:
  <<: *do-build
  tags:
    - ubuntu18
  variables:
    OS: 'ubuntu18'  


do-build-ubuntu16:
  <<: *do-build
  tags:
    - ubuntu16
  variables:
    OS: 'ubuntu16'  

do-build-centos76:
  <<: *do-build
  tags:
    - centos76
  variables:
    OS: 'centos76'  



#
# $PSZ ls with kill_deads
#

# template
.xform-ls: &xform-ls
  stage: test
  script:
    - ./cicd_testing/xform-ls.sh

#per OS
xform-ls-ubuntu18:
  <<: *xform-ls
  tags:
    - ubuntu18
  variables:
    OS: 'ubuntu18'  

xform-ls-ubuntu16:
  <<: *xform-ls
  tags:
    - ubuntu16
  variables:
    OS: 'ubuntu16'  

xform-ls-centos76:
  <<: *xform-ls
  tags:
    - centos76
  variables:
    OS: 'centos76'  

#
# $PSZ ls with kill_deads
#

# template
.starstest: &starstest
  stage: test
  script:
    - ./cicd_testing/starstest.sh

#per OS
starstest-ubuntu18:
  <<: *starstest
  tags:
    - ubuntu18
  variables:
    OS: 'ubuntu18'  

starstest-ubuntu16:
  <<: *starstest
  tags:
    - ubuntu16
  variables:
    OS: 'ubuntu16'  

starstest-centos76:
  <<: *starstest
  tags:
    - centos76
  variables:
    OS: 'centos76'  

