diff --git a/changelogs/unreleased/update-auto-build-image-to-0-3-0.yml b/changelogs/unreleased/update-auto-build-image-to-0-3-0.yml new file mode 100644 index 0000000000000000000000000000000000000000..a8f5534f043adf7d4607a2e6114c42faecf57adc --- /dev/null +++ b/changelogs/unreleased/update-auto-build-image-to-0-3-0.yml @@ -0,0 +1,5 @@ +--- +title: Add custom Dockerfile paths to Auto DevOps Build stage with DOCKERFILE_PATH +merge_request: 35662 +author: thklein +type: added diff --git a/doc/topics/autodevops/customize.md b/doc/topics/autodevops/customize.md index 253d5e5646361bde9483e048e0bc445187c71c90..679edbdfe40b7f1f2a5d04c146919ce9f1080ed1 100644 --- a/doc/topics/autodevops/customize.md +++ b/doc/topics/autodevops/customize.md @@ -41,11 +41,16 @@ If your goal is to use only a single custom buildpack, you should provide the pr ## Custom `Dockerfile` +> Support for `DOCKERFILE_PATH` was [added in GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35662) + If your project has a `Dockerfile` in the root of the project repository, Auto DevOps builds a Docker image based on the Dockerfile, rather than using buildpacks. This can be much faster and result in smaller images, especially if your Dockerfile is based on [Alpine](https://hub.docker.com/_/alpine/). +If you set the `DOCKERFILE_PATH` CI variable, Auto Build looks for a Dockerfile there +instead. + ## Passing arguments to `docker build` Arguments can be passed to the `docker build` command using the @@ -311,6 +316,7 @@ applications. | `CANARY_ENABLED` | From GitLab 11.0, used to define a [deploy policy for canary environments](#deploy-policy-for-canary-environments-premium). | | `CANARY_PRODUCTION_REPLICAS` | Number of canary replicas to deploy for [Canary Deployments](../../user/project/canary_deployments.md) in the production environment. Takes precedence over `CANARY_REPLICAS`. Defaults to 1. | | `CANARY_REPLICAS` | Number of canary replicas to deploy for [Canary Deployments](../../user/project/canary_deployments.md). Defaults to 1. | +| `DOCKERFILE_PATH` | From GitLab 13.2, allows overriding the [default Dockerfile path for the build stage](#custom-dockerfile) | | `HELM_RELEASE_NAME` | From GitLab 12.1, allows the `helm` release name to be overridden. Can be used to assign unique release names when deploying multiple projects to a single namespace. | | `HELM_UPGRADE_VALUES_FILE` | From GitLab 12.6, allows the `helm upgrade` values file to be overridden. Defaults to `.gitlab/auto-deploy-values.yaml`. | | `HELM_UPGRADE_EXTRA_ARGS` | From GitLab 11.11, allows extra arguments in `helm` commands when deploying the application. Note that using quotes won't prevent word splitting. | diff --git a/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml index b55504614824a078cbcb7dfcaf4636c8705e2ad3..8bbe1047179d6a649f9a63beca6ccbf9079b1795 100644 --- a/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml @@ -1,6 +1,6 @@ build: stage: build - image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v0.2.3" + image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image:v0.3.0" variables: DOCKER_TLS_CERTDIR: "" services: