Run Gitlab pipeline job on multiple runners - template

.deploy: 		# template to run
  tags:
    - $HOST_TAG
    - prod
  script:
    - ...
deploy-nodes:
  stage: deploy
  only: 		# execute only on main branch
    - main
  needs: 		# run only if test-nodes passed
    - test-nodes
  extends: .deploy 	# exetue script from
  parallel: 		# run jobs in parrallel
    matrix: 		# specify tags to run on
      - HOST_TAG:
        - hostname01
        - hostname02
        - ...

Share: