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