Pipeline not created when only/excepts omits all builds
As seen in gitlab-development-kit#615 (closed), using the only keyword may accidentally cause no jobs to be created for a pipeline, but the pipeline is not persisted. This leads to confusion because it's not clear why no pipeline was created. We worked around the problem by removing the only block in gitlab-development-kit!802 (diffs).
This is similar to the issue we saw in https://gitlab.com/gitlab-org/gitlab-ce/issues/66983 and gitlab-foss!32648 (merged).
@ayufan Do we need to add config_error: true to this error call as well? Does this need to be conditional with only being present?
if pipeline.stages.none?
return error('No stages / jobs for this pipeline.')
end
Edited by Stan Hu