Commit 63a3f8ef authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch...

Merge branch '2-be-able-to-update-component-with-ci_server_fqdn-variable-in-component-path' into 'master'

Resolve "be able to update component with CI_SERVER_FQDN variable in component path"

Closes #2

See merge request to-be-continuous/renovate!10
parents fbeae357 37f1acad
Loading
Loading
Loading
Loading
+29 −14
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@ Add the following to your `.gitlab-ci.yml`:
```yaml
include:
  # include the template
  - project: 'to-be-continuous/renovate'
    ref: '1.2.2'
    file: '/templates/gitlab-ci-renovate.yml'
  - project: "to-be-continuous/renovate"
    ref: "1.2.2"
    file: "/templates/gitlab-ci-renovate.yml"
```

## Configuration
@@ -34,9 +34,8 @@ include:
The Renovate template uses some global configuration used throughout all jobs.

| Input / Variable           | Description                                                                                                                                               | Default value                                      |
|------------------------|---------------------------------------------------------------------------------|-------------------|
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| `image` / `RENOVATE_IMAGE` | The Docker image used to run Renovate                                                                                                                     | `registry.hub.docker.com/renovate/renovate:latest` |
| `platform` / `RENOVATE_PLATFORM` | The Platform type of repository [See doc](https://docs.renovatebot.com/self-hosted-configuration/#platform)  | `gitlab` |
| :lock: `RENOVATE_TOKEN`    | A GitLab access token to allow Renovate crawl your projects. [See doc](https://docs.renovatebot.com/modules/platform/gitlab/#authentication)              | _none_                                             |
| :lock: `GITHUB_COM_TOKEN`  | A GitHub access token to allow Renovate fetch changelogs. [See doc](https://docs.renovatebot.com/getting-started/running/#githubcom-token-for-changelogs) | _none_                                             |

@@ -48,13 +47,29 @@ will be in charge of crawling all your other projects.
Upon including the template, carefuly follow [Renovate's documentation](https://docs.renovatebot.com/) to
configure the bot accordingly. Pay attention to the following:

* ~~Remember to set the [platform](https://docs.renovatebot.com/self-hosted-configuration/#platform) parameter
- ~~Remember to set the [platform](https://docs.renovatebot.com/self-hosted-configuration/#platform) parameter
  to `gitlab` in your configuration.~~
* [GitLab platform integration](https://docs.renovatebot.com/modules/platform/gitlab/) requires that you
- [GitLab platform integration](https://docs.renovatebot.com/modules/platform/gitlab/) requires that you
  declare a `RENOVATE_TOKEN` variable with an access token.
* You'll also probaly need to declare a `GITHUB_COM_TOKEN` variable, holding a GitHub access token
- You'll also probaly need to declare a `GITHUB_COM_TOKEN` variable, holding a GitHub access token
  (for [fetching changelogs](https://docs.renovatebot.com/getting-started/running/#githubcom-token-for-changelogs))

### Default Renovate configuration

This template is designed to be run on GitLab.

Defaults values are set to manage GitLab features :

| Renovate variable                                                                                            | Value                                     |
| ------------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| [`RENOVATE_PLATFORM`](https://docs.renovatebot.com/self-hosted-configuration/#platform)                      | `gitlab`                                  |
| [`RENOVATE_ENDPOINT`](https://docs.renovatebot.com/self-hosted-configuration/#endpoint)                      | `$CI_API_V4_URL`                          |
| [`RENOVATE_AUTODISCOVER_FILTER`](https://docs.renovatebot.com/self-hosted-configuration/#autodiscoverfilter) | `${CI_PROJECT_ROOT_NAMESPACE}/**`         |
| [`RENOVATE_REGISTRY_ALIASES`](https://docs.renovatebot.com/configuration-options/#registryaliases)           | `{"$$CI_SERVER_FQDN": "$CI_SERVER_FQDN"}` |
| [`RENOVATE_BINARY_SOURCE`](https://docs.renovatebot.com/self-hosted-configuration/#binarysource)             | `install`                                 |
| [`RENOVATE_LOG_FILE`](https://docs.renovatebot.com/config-overview/#logging-variables)                       | `renovate-log.ndjson`                     |
| [`RENOVATE_LOG_FILE_LEVEL`](https://docs.renovatebot.com/config-overview/#logging-variables)                 | `debug`                                   |

### Dry-run implementation details

Depending on the source of a pipeline, the template will either perform your dependency updates (create/update/delete branches and MRs)
+0 −5
Original line number Diff line number Diff line
@@ -20,11 +20,6 @@
      "name": "GITHUB_COM_TOKEN",
      "description": "A GitHub access token to allow Renovate fetch changelogs. [See doc](https://docs.renovatebot.com/getting-started/running/#githubcom-token-for-changelogs)",
      "secret": true
    },
    {
      "name": "RENOVATE_PLATFORM",
      "description": "The Platform type of repository",
      "default": "gitlab"
    }
  ]
}
+4 −5
Original line number Diff line number Diff line
@@ -19,9 +19,6 @@ spec:
    image:
      description: The Docker image used to run Renovate
      default: registry.hub.docker.com/renovate/renovate:latest
    platform:
      description: The Platform type of repository
      default: gitlab
---
workflow:
  rules:
@@ -53,14 +50,16 @@ variables:
  TBC_TRACKING_IMAGE: registry.gitlab.com/to-be-continuous/tools/tracking:master

  RENOVATE_IMAGE: $[[ inputs.image ]]
  RENOVATE_PLATFORM: $[[ inputs.platform ]]

  # those are native Renovate configuration variables
  # see: https://docs.renovatebot.com/self-hosted-configuration
  RENOVATE_PLATFORM: gitlab
  RENOVATE_ENDPOINT: $CI_API_V4_URL
  RENOVATE_LOG_FILE: renovate-log.ndjson
  RENOVATE_AUTODISCOVER_FILTER: ${CI_PROJECT_ROOT_NAMESPACE}/**
  RENOVATE_REGISTRY_ALIASES: "{\"$$CI_SERVER_FQDN\": \"$CI_SERVER_FQDN\"}"
  RENOVATE_BINARY_SOURCE: install
  # see: https://docs.renovatebot.com/config-overview/#logging-variables
  RENOVATE_LOG_FILE: renovate-log.ndjson
  RENOVATE_LOG_FILE_LEVEL: debug
  LOG_LEVEL: info