mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(datasource/docker): add cache decorator to getDockerHubTags
(#26546)
This commit is contained in:
parent
085ef7c038
commit
b33d09cbc7
1 changed files with 9 additions and 5 deletions
|
@ -176,7 +176,7 @@ export class DockerDatasource extends Datasource {
|
|||
) => `${registryHost}:${dockerRepository}@${configDigest}`,
|
||||
ttlMinutes: 1440 * 28,
|
||||
})
|
||||
public async getImageConfig(
|
||||
async getImageConfig(
|
||||
registryHost: string,
|
||||
dockerRepository: string,
|
||||
configDigest: string,
|
||||
|
@ -221,7 +221,7 @@ export class DockerDatasource extends Datasource {
|
|||
) => `${registryHost}:${dockerRepository}@${configDigest}`,
|
||||
ttlMinutes: 1440 * 28,
|
||||
})
|
||||
public async getHelmConfig(
|
||||
async getHelmConfig(
|
||||
registryHost: string,
|
||||
dockerRepository: string,
|
||||
configDigest: string,
|
||||
|
@ -336,7 +336,7 @@ export class DockerDatasource extends Datasource {
|
|||
) => `${registryHost}:${dockerRepository}@${currentDigest}`,
|
||||
ttlMinutes: 1440 * 28,
|
||||
})
|
||||
public async getImageArchitecture(
|
||||
async getImageArchitecture(
|
||||
registryHost: string,
|
||||
dockerRepository: string,
|
||||
currentDigest: string,
|
||||
|
@ -434,7 +434,7 @@ export class DockerDatasource extends Datasource {
|
|||
`${registryHost}:${dockerRepository}:${tag}`,
|
||||
ttlMinutes: 24 * 60,
|
||||
})
|
||||
public async getLabels(
|
||||
async getLabels(
|
||||
registryHost: string,
|
||||
dockerRepository: string,
|
||||
tag: string,
|
||||
|
@ -687,7 +687,7 @@ export class DockerDatasource extends Datasource {
|
|||
key: (registryHost: string, dockerRepository: string) =>
|
||||
`${registryHost}:${dockerRepository}`,
|
||||
})
|
||||
public async getTags(
|
||||
async getTags(
|
||||
registryHost: string,
|
||||
dockerRepository: string,
|
||||
): Promise<string[] | null> {
|
||||
|
@ -913,6 +913,10 @@ export class DockerDatasource extends Datasource {
|
|||
return digest;
|
||||
}
|
||||
|
||||
@cache({
|
||||
namespace: 'datasource-docker-hub-tags',
|
||||
key: (dockerRepository: string) => `${dockerRepository}`,
|
||||
})
|
||||
async getDockerHubTags(dockerRepository: string): Promise<Release[] | null> {
|
||||
const result: Release[] = [];
|
||||
let url: null | string =
|
||||
|
|
Loading…
Reference in a new issue