Fly execute is not writing to output (shows "cancelled" instead) #8652
-
Hello! I was hoping I can get some help from the community on an issue I'm having running the I'm trying to extract an output from the one-off task, but when the one-off task executes, it never ends up extracting out the Here's the overall setup, if it helps: I'm executing the const commandArgs: Array<string> = [];
commandArgs.push('--target', CONCOURSE_TEAM);
commandArgs.push('execute');
commandArgs.push('--privileged');
commandArgs.push('--config', `${ROOT_FOLDER}/${TASK_CONFIG}`);
commandArgs.push('--output', `output=${ROOT_FOLDER}/output`);
commandArgs.push('-v', `worker-image=<redacted>`);
commandArgs.push('-v', `script-name=<redacted>`);
if (VARS_FROM) {
commandArgs.push('--load-vars-from', `${ROOT_FOLDER}/${VARS_FROM}`);
}
if (INPUTS_FROM) {
commandArgs.push('--inputs-from', INPUTS_FROM);
}
if (INPUTS_FROM && IMAGE) {
commandArgs.push('--image', IMAGE);
}
const childProcess = spawn('fly', commandArgs); The task config has the ---
platform: linux
image_resource:
type: registry-image
source:
repository: <redacted>
tag: latest
inputs:
- name: source
- name: tasks
optional: true
outputs:
- name: output
params:
PROJECTS:
TARGET:
EXTRA_ARGS:
ROOT_FOLDER:
PR_NUMBER:
BRANCH:
BASE:
run:
path: /bin/bash
args:
- -c
- |
((setup-git-access))
((job-setup))
node -r source-map-support/register ci/scripts/out-tsc/((script-name)).js When I ran the If anybody has seen this issue before or knows how to help, it would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Okay, I figured out the issue. The problem is that the process executing the Either way, mystery solved! |
Beta Was this translation helpful? Give feedback.
Okay, I figured out the issue. The problem is that the process executing the
fly execute
command was being prematurely terminated before the one-off task had a chance to complete. Once that was corrected, the files are properly appearing now. Interestingly, the web UI still shows "cancelled" on theput
step, even though the files are indeed being extracted.Either way, mystery solved!