Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ applicationsDirectory=/home/Octopus/Applications
if [[ -n "$TentacleApplications" ]]; then
applicationsDirectory="$TentacleApplications"
fi

echo "Creating config directory"
echo "Permissions for $configurationDirectory:"
ls -lan / | grep etc
mkdir -p $configurationDirectory
mkdir -p $applicationsDirectory

Expand Down Expand Up @@ -414,7 +416,7 @@ function setPollingProxy() {

function markAsInitialised() {
# There is a startupProbe which checks for this file
mkdir -p /etc/octopus && touch /etc/octopus/initialized
mkdir -p "$configurationDirectory" && touch "$configurationDirectory/initialized"
}

setupVariablesForRegistrationCheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ public async Task<KubernetesScriptStatusResponseV1> CancelScriptAsync(CancelKube
public async Task CompleteScriptAsync(CompleteKubernetesScriptCommandV1 command, CancellationToken cancellationToken)
{
var workspace = workspaceFactory.GetWorkspace(command.ScriptTicket, WorkspaceReadinessCheck.Skip);
await workspace.Delete(cancellationToken);

var podExitCode = podStatusProvider.TryGetTrackedScriptPod(command.ScriptTicket)?.State.ExitCode ?? 0;

// Preserve the workspace when the script pod failed so the files are available for debugging.
if (!KubernetesConfig.DisableAutomaticPodCleanup && podExitCode != 0)
await workspace.Delete(cancellationToken);

scriptLogProvider.Delete(command.ScriptTicket);
scriptPodSinceTimeStore.Delete(command.ScriptTicket);
Expand Down