Commit 9d552828 authored by Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason

Add DOCKERFILE_PATH to Auto DevOps workflow rules

In https://gitlab.com/gitlab-org/gitlab/-/issues/212211 we added
support for custom Dockerfile paths for Auto DevOps via the
DOCKERFILE_PATH CI variable, but the workflow rule detection only
looks for a Dockerfile at the project root.
parent 9d64b959
---
title: Add DOCKERFILE_PATH to Auto DevOps workflow:rules
merge_request: 36475
author:
type: fixed
......@@ -74,7 +74,7 @@ stages:
workflow:
rules:
- if: '$BUILDPACK_URL || $AUTO_DEVOPS_EXPLICITLY_ENABLED == "1"'
- if: '$BUILDPACK_URL || $AUTO_DEVOPS_EXPLICITLY_ENABLED == "1" || $DOCKERFILE_PATH'
- exists:
- Dockerfile
......
......@@ -205,6 +205,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
'Buildpack' | { 'README.md' => '' } | { 'BUILDPACK_URL' => 'http://example.com' } | %w(build test) | %w()
'Explicit set' | { 'README.md' => '' } | { 'AUTO_DEVOPS_EXPLICITLY_ENABLED' => '1' } | %w(build test) | %w()
'Explicit unset' | { 'README.md' => '' } | { 'AUTO_DEVOPS_EXPLICITLY_ENABLED' => '0' } | %w() | %w(build test)
'DOCKERFILE_PATH' | { 'README.md' => '' } | { 'DOCKERFILE_PATH' => 'Docker.file' } | %w(build test) | %w()
'Dockerfile' | { 'Dockerfile' => '' } | {} | %w(build test) | %w()
'Clojure' | { 'project.clj' => '' } | {} | %w(build test) | %w()
'Go modules' | { 'go.mod' => '' } | {} | %w(build test) | %w()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment