Commit b45676a3 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix: replace deprecated Docker Hub registry FQDN

parent 8af0555e
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ include:
  - component: $CI_SERVER_FQDN/to-be-continuous/golang/gitlab-ci-golang@4.13.0
    # 2: set/override component inputs
    inputs:
      image: "registry.hub.docker.com/library/golang:buster" # ⚠ this is only an example
      image: "docker.io/library/golang:buster" # ⚠ this is only an example
```

### Use as a CI/CD template (legacy)
@@ -33,7 +33,7 @@ include:

variables:
  # 2: set/override template variables
  GO_IMAGE: "registry.hub.docker.com/library/golang:buster" # ⚠ this is only an example
  GO_IMAGE: "docker.io/library/golang:buster" # ⚠ this is only an example
```

## Global configuration
@@ -42,7 +42,7 @@ The Go template uses some global configuration used throughout all jobs.

| Input / Variable | Description                                                                                                | Default value   |
|------------------|------------------------------------------------------------------------------------------------------------|-----------------|
| `image` / `GO_IMAGE` | The Docker image used to run Go for `go-build` <br/>:warning: **set the version required by your project** | `registry.hub.docker.com/library/golang:bookworm` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_IMAGE) |
| `image` / `GO_IMAGE` | The Docker image used to run Go for `go-build` <br/>:warning: **set the version required by your project** | `docker.io/library/golang:bookworm` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_IMAGE) |
| `test-image` / `GO_TEST_IMAGE` | The Docker image used to run Go for `go-test` <br/>:warning: **set the version required by your project**  | _none_ |
| `project-dir` / `GO_PROJECT_DIR` | Go project root directory                                                                                  | `.`             |
| `goproxy` / `GOPROXY` | URL of Go module proxy                                                                                     | _none_          |
@@ -116,8 +116,8 @@ Here is a `.gitlab-ci.yml` example that triggers a build on 3 target platforms u

```yaml
variables:
  GO_IMAGE: "registry.hub.docker.com/library/golang:1.17-buster"
  GO_TEST_IMAGE: "registry.hub.docker.com/library/golang:1.17-buster"
  GO_IMAGE: "docker.io/library/golang:1.17-buster"
  GO_TEST_IMAGE: "docker.io/library/golang:1.17-buster"

go-build:
  parallel:
@@ -163,7 +163,7 @@ It is bound to the `build` stage, and uses the following variables:

| Input / Variable | Description                                                                                              | Default value                          |
|-----------------------|----------------------------------------------------------------------------------------------------------|----------------------------------------|
| `ci-lint-image` / `GO_CI_LINT_IMAGE` | The Docker image used to run `golangci-lint`                                                             | `registry.hub.docker.com/golangci/golangci-lint:latest-alpine` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_CI_LINT_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_CI_LINT_IMAGE) |
| `ci-lint-image` / `GO_CI_LINT_IMAGE` | The Docker image used to run `golangci-lint`                                                             | `docker.io/golangci/golangci-lint:latest-alpine` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_CI_LINT_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_CI_LINT_IMAGE) |
| `ci-lint-args` / `GO_CI_LINT_ARGS` | `golangci-lint` [command line arguments](https://github.com/golangci/golangci-lint#command-line-options) | `-E gosec ./...`             |
| `ci-lint-disabled` / `GO_CI_LINT_DISABLED` | Set to `true` to disable this job                                                                        | _none_ (enabled)                        |

@@ -183,7 +183,7 @@ It is bound to the `test` stage, and uses the following variables:
| Input / Variable | Description | Default Value |
| ---------------- | ----------- | ------------- |
| `semgrep-disabled` / `GO_SEMGREP_DISABLED` | Set to `true` to disable this job | _none_ |
| `semgrep-image` / `GO_SEMGREP_IMAGE` | The Docker image used to run [Semgrep](https://semgrep.dev/docs/) | `registry.hub.docker.com/semgrep/semgrep:latest` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_SEMGREP_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_SEMGREP_IMAGE) |
| `semgrep-image` / `GO_SEMGREP_IMAGE` | The Docker image used to run [Semgrep](https://semgrep.dev/docs/) | `docker.io/semgrep/semgrep:latest` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-GO_SEMGREP_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-GO_SEMGREP_IMAGE) |
| `semgrep-args` / `GO_SEMGREP_ARGS` | Semgrep [scan options](https://semgrep.dev/docs/cli-reference#semgrep-scan-command-options) | `--metrics off --disable-version-check` |
| `semgrep-rules` / `GO_SEMGREP_RULES` | Space-separated list of [Semgrep rules](https://semgrep.dev/docs/running-rules).<br/>Can be both local YAML files or remote rules from the [Segmrep Registry](https://semgrep.dev/explore) (denoted by the `p/` prefix). | `p/golang p/gosec` |
| `semgrep-download-rules-enabled` / `GO_SEMGREP_DOWNLOAD_RULES_ENABLED` | Download Semgrep remote rules | `true` |
+3 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
    {
      "name": "GO_IMAGE",
      "description": "The Docker image used to run Go (build+test or build only) - **set the version required by your project**",
      "default": "registry.hub.docker.com/library/golang:bookworm"
      "default": "docker.io/library/golang:bookworm"
    },
    {
      "name": "GO_PROJECT_DIR",
@@ -111,7 +111,7 @@
        {
          "name": "GO_CI_LINT_IMAGE",
          "description": "The Docker image used to run `golangci-lint`",
          "default": "registry.hub.docker.com/golangci/golangci-lint:latest-alpine"
          "default": "docker.io/golangci/golangci-lint:latest-alpine"
        },
        {
          "name": "GO_CI_LINT_ARGS",
@@ -171,7 +171,7 @@
        {
          "name": "GO_SEMGREP_IMAGE",
          "description": "The Docker image used to run [Semgrep](https://semgrep.dev/docs/)",
          "default": "registry.hub.docker.com/semgrep/semgrep:latest"
          "default": "docker.io/semgrep/semgrep:latest"
        },
        {
          "name": "GO_SEMGREP_ARGS",
+3 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ spec:
  inputs:
    image:
      description: The Docker image used to run Go (build+test or build only) - **set the version required by your project**
      default: registry.hub.docker.com/library/golang:bookworm
      default: docker.io/library/golang:bookworm
    project-dir:
      description: Go project root directory
      default: .
@@ -77,13 +77,13 @@ spec:
      default: false
    ci-lint-image:
      description: The Docker image used to run `golangci-lint`
      default: registry.hub.docker.com/golangci/golangci-lint:latest-alpine
      default: docker.io/golangci/golangci-lint:latest-alpine
    ci-lint-args:
      description: '`golangci-lint` [command line arguments](https://github.com/golangci/golangci-lint#command-line-options)'
      default: -E gosec ./...
    semgrep-image:
      description: The Docker image used to run [Semgrep](https://semgrep.dev/docs/)
      default: registry.hub.docker.com/semgrep/semgrep:latest
      default: docker.io/semgrep/semgrep:latest
    semgrep-disabled:
      description: Disable Semgrep
      type: boolean