I am trying to optimise below gitlabci file
stages:
- lint
- publish
lint:example1
stage: lint
script:
- command1
- command2
- command3
- command4
publish:docker-image
stage: publish
script:
- command1 # same command from lint stage
- command2 # same command from lint stage
- command3 # same command from lint stage
- command5
Now, how do I carve out common part from both stages so that my ci file look cleaner? Is there anything like functions in gitlab-ci.yml?