Stream from k8s main container
parent
b00a0baa34
commit
33896798fd
|
|
@ -19,7 +19,7 @@ echo "Checked out $githubSha"
|
|||
|
||||
git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid
|
||||
md5sum .lfs-assets-guid > .lfs-assets-guid-sum
|
||||
export LFS_ASSETS_HASH="$(cat ${this.repoPathFull}/.lfs-assets-guid)"
|
||||
export LFS_ASSETS_HASH="$(cat ${repoPathFull}/.lfs-assets-guid)"
|
||||
|
||||
echo ' '
|
||||
echo 'Contents of .lfs-assets-guid file:'
|
||||
|
|
|
|||
|
|
@ -402,25 +402,25 @@ class AWSBuildEnvironment {
|
|||
});
|
||||
}
|
||||
getParameterTemplate(p1) {
|
||||
return `
|
||||
${p1}:
|
||||
Type: String
|
||||
Default: ''
|
||||
return `
|
||||
${p1}:
|
||||
Type: String
|
||||
Default: ''
|
||||
`;
|
||||
}
|
||||
getSecretTemplate(p1) {
|
||||
return `
|
||||
${p1}Secret:
|
||||
Type: AWS::SecretsManager::Secret
|
||||
Properties:
|
||||
Name: !Join [ "", [ '${p1}', !Ref BUILDID ] ]
|
||||
SecretString: !Ref ${p1}
|
||||
return `
|
||||
${p1}Secret:
|
||||
Type: AWS::SecretsManager::Secret
|
||||
Properties:
|
||||
Name: !Join [ "", [ '${p1}', !Ref BUILDID ] ]
|
||||
SecretString: !Ref ${p1}
|
||||
`;
|
||||
}
|
||||
getSecretDefinitionTemplate(p1, p2) {
|
||||
return `
|
||||
- Name: '${p1}'
|
||||
ValueFrom: !Ref ${p2}Secret
|
||||
return `
|
||||
- Name: '${p1}'
|
||||
ValueFrom: !Ref ${p2}Secret
|
||||
`;
|
||||
}
|
||||
insertAtTemplate(template, insertionKey, insertion) {
|
||||
|
|
@ -431,8 +431,8 @@ class AWSBuildEnvironment {
|
|||
setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const logGuid = nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 9)();
|
||||
commands[1] += `
|
||||
echo "${logGuid}"
|
||||
commands[1] += `
|
||||
echo "${logGuid}"
|
||||
`;
|
||||
yield this.setupBaseStack(CF);
|
||||
const taskDefStackName = `${this.baseStackName}-${buildGuid}`;
|
||||
|
|
@ -517,6 +517,10 @@ class AWSBuildEnvironment {
|
|||
ParameterKey: 'BUILDID',
|
||||
ParameterValue: buildGuid,
|
||||
},
|
||||
{
|
||||
ParameterKey: 'EnvironmentName',
|
||||
ParameterValue: this.baseStackName,
|
||||
},
|
||||
],
|
||||
}).promise();
|
||||
// Side effect: core.info('Creating cleanup double checker cron job...');
|
||||
|
|
@ -1395,6 +1399,7 @@ class Kubernetes {
|
|||
this.buildGuid = buildGuid;
|
||||
this.secretName = `build-credentials-${buildGuid}`;
|
||||
this.jobName = `unity-builder-job-${buildGuid}`;
|
||||
this.containerName = 'main';
|
||||
yield kubernetes_secret_1.default.createSecret(secrets, this.secretName, this.namespace, this.kubeClient);
|
||||
const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s);
|
||||
//run
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -218,6 +218,10 @@ class AWSBuildEnvironment implements CloudRunnerProviderInterface {
|
|||
ParameterKey: 'BUILDID',
|
||||
ParameterValue: buildGuid,
|
||||
},
|
||||
{
|
||||
ParameterKey: 'EnvironmentName',
|
||||
ParameterValue: this.baseStackName,
|
||||
},
|
||||
],
|
||||
}).promise();
|
||||
// Side effect: core.info('Creating cleanup double checker cron job...');
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ class Kubernetes implements CloudRunnerProviderInterface {
|
|||
this.buildGuid = buildGuid;
|
||||
this.secretName = `build-credentials-${buildGuid}`;
|
||||
this.jobName = `unity-builder-job-${buildGuid}`;
|
||||
this.containerName = 'main';
|
||||
await KubernetesSecret.createSecret(secrets, this.secretName, this.namespace, this.kubeClient);
|
||||
const jobSpec = KubernetesJobSpecFactory.getJobSpec(
|
||||
commands,
|
||||
|
|
|
|||
Loading…
Reference in New Issue