Only changes do not run after merge.
Summary
We are trying to speed up our CI by leveraging only/changes on prepare/test jobs.
It helps on feature branches but after merge it skips all those jobs which causes bundling and build fail because of missing node_modules
and also skipping the tests on merged code.
Steps to reproduce
(How one can reproduce the issue - this is very important)
Example Project
test-libs:
tags: ['docker']
stage: test
image: node:10-slim
services:
- name: nats-streaming
alias: nats
- name: dwmkerr/dynamodb
alias: dynamodb
script:
- yarn ci:libs
dependencies:
- install
only:
changes:
- lib/**/*
- yarn.lock
install:
tags: ['docker']
stage: prepare
cache:
untracked: true
key: '$CI_BUILD_REF_NAME'
script:
- yarn install
artifacts:
untracked: true
only:
changes:
- lib/**/*
- driver/**/*
- service/**/*
- api/**/*
- yarn.lock
- package.json
What is the current bug behavior?
install
will not run on develop after merge request even if this MR introduced changes in mentioned paths.
test-libs
will not run on develop after merge even if yarn.lock
has changed.
What is the expected correct behavior?
Changes introduced by MR should run those jobs.
Results of GitLab environment info
Latest version of Gitlab.