Commit 1000ef55 authored by Clement Bois's avatar Clement Bois
Browse files

Merge branch 'fix/no-nested-if-var' into 'master'

fix: remove nested variable in rules:if

Closes #151

See merge request to-be-continuous/docker!176
parents 452d2bad 0dc62b38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ The Docker template uses some global configuration used throughout all jobs.

| Input / Variable                         | Description                                                                                                                                    | Default value                                                                       |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `build-tool` / `DOCKER_BUILD_TOOL`       | The build tool to use for building container image, possible values are `kaniko`, `buildah`, `dind` or `external`                              | `$TBC_DEFAULT_DOCKER_BUILD_TOOL` (defaults to `buildah`)                            |
| `build-tool` / `DOCKER_BUILD_TOOL`       | The build tool to use for building container image, possible values are `kaniko`, `buildah`, `dind`, `external` or `default`                   | `default` uses `$TBC_DEFAULT_DOCKER_BUILD_TOOL` value (`buildah` by default)        |
| `kaniko-image` / `DOCKER_KANIKO_IMAGE`   | The image used to run `kaniko` - _for kaniko build only_                                                                                       | `gcr.io/kaniko-project/executor:debug` (use `debug` images for GitLab)<br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-DOCKER_KANIKO_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-DOCKER_KANIKO_IMAGE)|
| `buildah-image` / `DOCKER_BUILDAH_IMAGE` | The image used to run `buildah` - _for buildah build only_                                                                                     | `quay.io/containers/buildah:latest`<br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-DOCKER_BUILDAH_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-DOCKER_BUILDAH_IMAGE)|
| `image` / `DOCKER_IMAGE`                 | The Docker image used to run the docker client (see [full list](https://hub.docker.com/r/library/docker/)) - _for Docker-in-Docker build only_ | `docker.io/library/docker:latest`<br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-DOCKER_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-DOCKER_IMAGE) |
+3 −3
Original line number Diff line number Diff line
@@ -9,9 +9,9 @@
    {
      "name": "DOCKER_BUILD_TOOL",
      "type": "enum",
      "values": ["buildah", "dind", "kaniko", "external", "$TBC_DEFAULT_DOCKER_BUILD_TOOL"],
      "description": "The build tool to use for building container image\n\n_`$TBC_DEFAULT_DOCKER_BUILD_TOOL` defaults to `buildah`_",
      "default": "$TBC_DEFAULT_DOCKER_BUILD_TOOL"
      "values": ["buildah", "dind", "kaniko", "external", "default"],
      "description": "The build tool to use for building container image\n\n_`default` uses `$TBC_DEFAULT_DOCKER_BUILD_TOOL` value (`buildah` by default)_",
      "default": "default"
    },
    {
      "name": "DOCKER_KANIKO_IMAGE",
+5 −5
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@ spec:
      - dind
      - kaniko
      - external
      - $TBC_DEFAULT_DOCKER_BUILD_TOOL
      default: $TBC_DEFAULT_DOCKER_BUILD_TOOL
      - default
      default: default
    kaniko-image:
      description: |-
        The image used to run kaniko
@@ -1089,7 +1089,7 @@ docker-kaniko-build:
      dotenv:
        - docker.env
  rules:
    - if: '$DOCKER_BUILD_TOOL == "kaniko"'
    - if: '$DOCKER_BUILD_TOOL == "kaniko" || ($DOCKER_BUILD_TOOL == "default" && $TBC_DEFAULT_DOCKER_BUILD_TOOL == "kaniko")'

docker-dind-build:
  extends: .docker-dind-base
@@ -1131,7 +1131,7 @@ docker-dind-build:
      dotenv:
        - docker.env
  rules:
    - if: '$DOCKER_BUILD_TOOL == "dind"'
    - if: '$DOCKER_BUILD_TOOL == "dind" || ($DOCKER_BUILD_TOOL == "default" && $TBC_DEFAULT_DOCKER_BUILD_TOOL == "dind")'

docker-buildah-build:
  extends: .docker-base
@@ -1189,7 +1189,7 @@ docker-buildah-build:
      dotenv:
        - docker.env
  rules:
    - if: '$DOCKER_BUILD_TOOL == "buildah"'
    - if: '$DOCKER_BUILD_TOOL == "buildah" || ($DOCKER_BUILD_TOOL == "default" && $TBC_DEFAULT_DOCKER_BUILD_TOOL == "buildah")'

# ==================================================
# Stage: package-test