Merge pull request #7382 from backstage/techdocs/on-lock

[TechDocs] Lock default container version for generation
This commit is contained in:
Eric Peterson
2021-09-29 16:26:42 +02:00
committed by GitHub
3 changed files with 14 additions and 3 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/techdocs-common': patch
---
Locks the version of the default docker image used to generate TechDocs. As of
this changelog entry, it is v0.3.2!
+1
View File
@@ -256,6 +256,7 @@ export class TechdocsGenerator implements GeneratorBase {
config: Config;
scmIntegrations: ScmIntegrationRegistry;
});
static readonly defaultDockerImage = 'spotify/techdocs:v0.3.2';
// (undocumented)
static fromConfig(
config: Config,
@@ -37,9 +37,12 @@ import {
GeneratorRunOptions,
} from './types';
const defaultDockerImage = 'spotify/techdocs';
export class TechdocsGenerator implements GeneratorBase {
/**
* The default docker image (and version) used to generate content. Public
* and static so that techdocs-common consumers can use the same version.
*/
public static readonly defaultDockerImage = 'spotify/techdocs:v0.3.2';
private readonly logger: Logger;
private readonly containerRunner: ContainerRunner;
private readonly options: GeneratorConfig;
@@ -124,7 +127,8 @@ export class TechdocsGenerator implements GeneratorBase {
break;
case 'docker':
await this.containerRunner.runContainer({
imageName: this.options.dockerImage ?? defaultDockerImage,
imageName:
this.options.dockerImage ?? TechdocsGenerator.defaultDockerImage,
args: ['build', '-d', '/output'],
logStream,
mountDirs,