Clinical-Genomics-Lund / nextflow_wgs

5 stars 5 forks source link

Updated deploy script #208

Closed Jakob37 closed 2 months ago

Jakob37 commented 2 months ago

Description and reviewer info

What is changed? How does this update improve the pipeline? (For reviewers) How to test it?

For reviewers. It would be great to:

A new more verbose (and error safe) deploy script. Here is how it communicates with the deployer:

Checks:

jakob@laptop:~$ bash <home>/src/wgs/scripts/deploy_hopper_new.sh 
> Current working directory: <home>/src/wgs
> You are not on the master branch. Current branch: jw/updated_deploy_script
> Do you want to deploy anyway? (y/n)
y
> Confirm, there are no running jobs for this pipeline? (y/n)
y
> Retrieving current git.hash from <fs1>:<basedir>/wgs_germline38/git.hash, please wait ...
> Showing diff to c07a8c0
 scripts/deploy_hopper_new.sh                     | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 scripts/{ => deprecated}/deploy_hopper.sh        |  0
 scripts/{ => deprecated}/deploy_hopper_dev_38.sh |  0
 scripts/{ => deprecated}/deploy_trannel.sh       |  0
 4 files changed, 61 insertions(+)
> Do you want to view the full diff? (y/n)
n
> Do you want to proceed with deploying? (y/n)
n
Deploy aborted

I also moved the deploy scripts which I think are unused to a "deprecated" subfolder. I think we could remove these if we know they won't be used. I left the "dev" script I think @ViktorHy is using.

Type of change

Checklist

Documentation

Patch

Major / Minor change

Test/review documentation

Review performed by

(Add if missing)

Testing performed by

ViktorHy commented 2 months ago

I guess the dev-deploys really dont need to be a part of the repo. I can just keep those as untracked files in my local folders.

ViktorHy commented 2 months ago

ah good you caught the scp part

ViktorHy commented 2 months ago

Tested it now, works fine!

Jakob37 commented 2 months ago

Thanks for the testing!

A small caveat is that if deploying with uncommited changes, the working directory will be deployed, but the git.hash is from the HEAD. Hopefully people will get this anyway, but if not we could add extra checks in the future.