Fix: set default k8s working directory/build directory
Fix: k8s working directory must be absolute pathpull/273/head
parent
a6371af293
commit
267abc7b12
|
|
@ -1475,7 +1475,7 @@ class Kubernetes {
|
|||
name: 'main',
|
||||
image,
|
||||
command,
|
||||
workingDir: workingDirectory,
|
||||
workingDir: `/${workingDirectory}`,
|
||||
resources: {
|
||||
requests: {
|
||||
memory: this.buildParameters.remoteBuildMemory,
|
||||
|
|
@ -1596,7 +1596,7 @@ class Kubernetes {
|
|||
git checkout $GITHUB_SHA;
|
||||
ls
|
||||
echo "end"`,
|
||||
], '', '', [], []);
|
||||
], 'data', 'data', [], []);
|
||||
});
|
||||
}
|
||||
runBuildJob() {
|
||||
|
|
@ -1616,7 +1616,7 @@ class Kubernetes {
|
|||
chmod -R +x /steps
|
||||
/entrypoint.sh
|
||||
`,
|
||||
], '', '', [], []);
|
||||
], 'data', 'data', [], []);
|
||||
});
|
||||
}
|
||||
watchUntilPodRunning() {
|
||||
|
|
@ -1664,7 +1664,7 @@ class Kubernetes {
|
|||
}
|
||||
if (!didStreamAnyLogs) {
|
||||
throw new Error(JSON.stringify({
|
||||
message: 'Failed to stream any logs, listing namespace events',
|
||||
message: 'Failed to stream any logs, listing namespace events, check for an error with the container',
|
||||
events: (yield this.kubeClient.listNamespacedEvent(this.namespace)).body.items
|
||||
.filter((x) => {
|
||||
return x.involvedObject.name === this.podName || x.involvedObject.name === this.jobName;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -255,7 +255,7 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
|||
name: 'main',
|
||||
image,
|
||||
command,
|
||||
workingDir: workingDirectory,
|
||||
workingDir: `/${workingDirectory}`,
|
||||
resources: {
|
||||
requests: {
|
||||
memory: this.buildParameters.remoteBuildMemory,
|
||||
|
|
@ -387,8 +387,8 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
|||
ls
|
||||
echo "end"`,
|
||||
],
|
||||
'',
|
||||
'',
|
||||
'data',
|
||||
'data',
|
||||
[],
|
||||
[],
|
||||
);
|
||||
|
|
@ -415,8 +415,8 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
|||
/entrypoint.sh
|
||||
`,
|
||||
],
|
||||
'',
|
||||
'',
|
||||
'data',
|
||||
'data',
|
||||
[],
|
||||
[],
|
||||
);
|
||||
|
|
@ -470,7 +470,7 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
|||
throw new Error(
|
||||
JSON.stringify(
|
||||
{
|
||||
message: 'Failed to stream any logs, listing namespace events',
|
||||
message: 'Failed to stream any logs, listing namespace events, check for an error with the container',
|
||||
events: (await this.kubeClient.listNamespacedEvent(this.namespace)).body.items
|
||||
.filter((x) => {
|
||||
return x.involvedObject.name === this.podName || x.involvedObject.name === this.jobName;
|
||||
|
|
|
|||
Loading…
Reference in New Issue