I run a self hosted Linux Shell BitBucket Runner and my pipeline's script is a bash script.
It has lots of phases but I'll show a part of it and I'll use short placeholders.
1. Build the project
2. ssh USER@SERVER "@cleanup"
3. scp OUTPUT_ZIP_FILE USER@SERVER:
4. ssh USER@SERVER "unzip ZIP_FILE ; cd FOLDER ; @Build ; zip OUTPUT_ZIP [.FOLDER...]*.*"
5. ssh USER@SERVER "copy [.FOLDER...]*.* [.NEW_FOLDER...]*.* ; @cleanup_foler, zip NEW_PACKAGE.zip [.NEW_FOLDER...]*.*"
The important thing I want is that these steps should run sequentially, the pipeline should wait for each command to finish and then execute the next command.
In the log of the pipeline I see quick dump of these steps and then Success, on remote machine I see CPU usage goes up and it continues doing its job for few minutes, even thought the pipeline is done already.
The bash script does what it should do when run on Linux machine, in a bash shell.
I tried to make each ssh->scp->ssh->ssh phase a step in bitbucket-pipeline.yml file. Step ran sequentially, but, again, each SSH command exits immediately without waiting for the command to finish.
What could be the problem of this "async" run of SSH commands?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.