diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c25f1f..ac638046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog -## UNRELEASED +## [0.4.3] UNRELEASED + +- Do not publish Quilt package unless workflow succeeds +- [or the metadata specifies &force=true] ## [0.4.2] 2023-07-02 diff --git a/README.md b/README.md index be0b0036..a2ee77a0 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,8 @@ From the command-line, do, e.g.: ```bash # export NXF_VER=23.04.0 -export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.4.2/nf-quilt-0.4.2-meta.json -nextflow run main.nf -plugins nf-quilt@0.4.2 +export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.4.3/nf-quilt-0.4.3-meta.json +nextflow run main.nf -plugins nf-quilt@0.4.3 ``` For Tower, you can use the "Pre-run script" to set the environment variables. @@ -112,7 +112,7 @@ in order to customize the behavior of the plugin: * Query Parameters: also stored as package-level metadata * **msg**: specify the commit message to use when saving the package - * **readme**: specify a string for the package README + * **readme**: specify a string for the package README (will substitute "${variables}") * **_any other key_**: specify any other metadata key to store in the package diff --git a/plugins/nf-quilt/build.gradle b/plugins/nf-quilt/build.gradle index 3e430898..d3083462 100644 --- a/plugins/nf-quilt/build.gradle +++ b/plugins/nf-quilt/build.gradle @@ -67,6 +67,7 @@ dependencies { compileOnly 'org.slf4j:slf4j-simple:2.0.7' compileOnly 'black.ninia:jep:4.1.1' runtime 'black.ninia:jep:4.1.1' + runtimeOnly 'org.junit.platform:junit-platform-launcher:1.9.3' implementation 'black.ninia:jep:4.1.1' testImplementation 'black.ninia:jep:4.1.1' //testImplementation(testFixtures('black.ninia:jep:4.0.3')) diff --git a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy index cd0acd30..426caf5b 100644 --- a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy +++ b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy @@ -97,7 +97,11 @@ class QuiltProduct { this.msg = pkg.toString() this.meta = [pkg: msg, time_start: now()] this.session = session - publish() + if (session.isSuccess() || pkg.is_force()) { + publish() + } else { + log.info("not publishing: ${pkg} [unsuccessful session]") + } } String readme() { diff --git a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF index be29e109..ba1b3dbd 100644 --- a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF +++ b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Plugin-Class: nextflow.quilt.QuiltPlugin Plugin-Id: nf-quilt -Plugin-Version: 0.4.2 +Plugin-Version: 0.4.3 Plugin-Provider: Quilt Data Plugin-Requires: >=22.10.6