-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work in progress: CircleCI inline orbs #385
Open
aliciaaevans
wants to merge
7
commits into
v1.10.3rc
Choose a base branch
from
circleci-inline-orbs
base: v1.10.3rc
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6e5f326
move deploy to orb
aliciaaevans d41dd48
orbs require version 2.1
aliciaaevans dd5481e
move get-data to orb
aliciaaevans c47e477
params for workflow folder
aliciaaevans aeb804a
use correct operator
aliciaaevans 515b848
fix if statement
aliciaaevans 16663cb
fix if statement
aliciaaevans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,68 @@ | ||
version: 2 | ||
version: 2.1 | ||
|
||
orbs: | ||
lcdb-wf: | ||
commands: | ||
deploy-clone: | ||
parameters: | ||
flavor: | ||
default: "full" | ||
type: string | ||
steps: | ||
- run: | ||
name: Deploy to a new directory, cloning to a temp dir | ||
command: | | ||
source /opt/mambaforge/etc/profile.d/conda.sh | ||
conda activate $LCDBWF_ENV | ||
conda info --envs | ||
conda config --show | ||
|
||
# Copy the deploy script to a different location to simulate the | ||
# suggested deployment method of downloading just the script. | ||
cp deploy.py /tmp/deploy.py | ||
cd /tmp/ | ||
|
||
# Deploy to the new directory, so we are testing the real-world case of post-deployment. | ||
# Note that $DEPLOY is set in the "set-paths" step configured above. | ||
python deploy.py --flavor <<parameters.flavor>> --dest $DEPLOY --branch $CIRCLE_BRANCH --clone | ||
get-data: | ||
parameters: | ||
kind: | ||
default: "all" | ||
type: enum | ||
enum: ["all", "rnaseq", "chipseq"] | ||
workflow: | ||
type: string | ||
steps: | ||
- run: | ||
name: Download example data | ||
command: | | ||
set -x | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
tree $DEPLOY | ||
tree $ORIG | ||
set +x | ||
|
||
# Separately copy over some test-specific files | ||
|
||
cp $ORIG/workflows/<<parameters.workflow>>/run_test.sh $DEPLOY/workflows/<<parameters.workflow>>/run_test.sh | ||
|
||
if [[ "<<parameters.workflow>>" = "rnaseq" ]]; then | ||
cp $ORIG/workflows/rnaseq/run_downstream_test.sh $DEPLOY/workflows/rnaseq/run_downstream_test.sh | ||
fi | ||
|
||
mkdir $DEPLOY/ci | ||
mkdir $DEPLOY/test | ||
cp $ORIG/test/lcdb-wf-test $DEPLOY/test/lcdb-wf-test | ||
cp $ORIG/test/workflow_test_params.yaml $DEPLOY/test/workflow_test_params.yaml | ||
cp $ORIG/ci/get-data.py $DEPLOY/ci/get-data.py | ||
|
||
# the ./run_test.sh scripts run this | ||
cp $ORIG/ci/preprocessor.py $DEPLOY/ci/preprocessor.py | ||
|
||
# download example data | ||
cd $DEPLOY | ||
test/lcdb-wf-test data --kind=<<parameters.kind>> --verbose | ||
|
||
|
||
variables: | ||
|
||
|
@@ -121,51 +185,6 @@ variables: | |
time mamba env create -n $LCDBWF_ENV_R --file env-r.yml | ||
fi | ||
|
||
# -------------------------------------------------------------------------- | ||
# Deploy into a new directory and get the test data. | ||
get-data: &get-data | ||
run: | ||
name: Download example data | ||
command: | | ||
source /opt/mambaforge/etc/profile.d/conda.sh | ||
conda activate $LCDBWF_ENV | ||
conda info --envs | ||
conda config --show | ||
|
||
# Copy the deploy script to a different location to simulate the | ||
# suggested deployment method of downloading just the script. | ||
cp deploy.py /tmp/deploy.py | ||
cd /tmp/ | ||
|
||
# Deploy to the new directory, so we are testing the real-world case of post-deployment. | ||
# Note that $DEPLOY is set in the "set-paths" step configured above. | ||
python deploy.py --flavor full --dest $DEPLOY --branch $CIRCLE_BRANCH --clone | ||
|
||
set -x | ||
tree $DEPLOY | ||
tree $ORIG | ||
set +x | ||
|
||
# Separately copy over some test-specific files | ||
cp $ORIG/workflows/chipseq/run_test.sh $DEPLOY/workflows/chipseq/run_test.sh | ||
cp $ORIG/workflows/rnaseq/run_test.sh $DEPLOY/workflows/rnaseq/run_test.sh | ||
cp $ORIG/workflows/rnaseq/run_downstream_test.sh $DEPLOY/workflows/rnaseq/run_downstream_test.sh | ||
cp $ORIG/workflows/colocalization/run_test.sh $DEPLOY/workflows/references/run_test.sh | ||
cp $ORIG/workflows/colocalization/run_test.sh $DEPLOY/workflows/colocalization/run_test.sh | ||
|
||
mkdir $DEPLOY/ci | ||
mkdir $DEPLOY/test | ||
cp $ORIG/test/lcdb-wf-test $DEPLOY/test/lcdb-wf-test | ||
cp $ORIG/test/workflow_test_params.yaml $DEPLOY/test/workflow_test_params.yaml | ||
cp $ORIG/ci/get-data.py $DEPLOY/ci/get-data.py | ||
|
||
# the ./run_test.sh scripts run this | ||
cp $ORIG/ci/preprocessor.py $DEPLOY/ci/preprocessor.py | ||
|
||
# download example data | ||
cd $DEPLOY | ||
test/lcdb-wf-test data --kind=all --verbose | ||
|
||
# -------------------------------------------------------------------------- | ||
# Run the doctests across the included modules | ||
pytest-step: &pytest-step | ||
|
@@ -362,7 +381,11 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone: | ||
flavor: chipseq | ||
- lcdb-wf/get-data: | ||
kind: chipseq | ||
workflow: chipseq | ||
- *chipseq-step | ||
- store_artifacts: | ||
path: /tmp/lcdb-wf-test/workflows/chipseq/data/chipseq_aggregation/multiqc.html | ||
|
@@ -373,7 +396,11 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone: | ||
flavor: chipseq | ||
- lcdb-wf/get-data: | ||
kind: chipseq | ||
workflow: chipseq | ||
- *chipseq-misc-step | ||
|
||
rnaseq: | ||
|
@@ -382,7 +409,11 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone: | ||
flavor: rnaseq | ||
- lcdb-wf/get-data: | ||
kind: rnaseq | ||
workflow: rnaseq | ||
- *rnaseq-step | ||
- store_artifacts: | ||
path: /tmp/downstream.tar.gz | ||
|
@@ -407,7 +438,11 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone: | ||
flavor: rnaseq | ||
- lcdb-wf/get-data: | ||
kind: rnaseq | ||
workflow: rnaseq | ||
- *rnaseq-misc-step | ||
|
||
colocalization: | ||
|
@@ -416,7 +451,9 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone | ||
- lcdb-wf/get-data: | ||
workflow: colocalization | ||
- *colocalization-step | ||
|
||
references: | ||
|
@@ -425,7 +462,9 @@ jobs: | |
- checkout | ||
- *restore_cache | ||
- *set-path | ||
- *get-data | ||
- lcdb-wf/deploy-clone | ||
- lcdb-wf/get-data: | ||
workflow: references | ||
- *references-step | ||
|
||
build-docs: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.