diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b924a7431d02ddd74e88341077a90a639bf793f4..e7bb25ee9b871b2745da628b2c6cfd96a481b857 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,10 +23,6 @@ stages: build_badges: stage: badges - only: - - master - - develop - - tags before_script: - module load singularity/3.5.3 - chmod +x ./workflow/scripts/get_updated_badge_info.sh @@ -39,14 +35,11 @@ build_badges: pages: stage: deploy - only: - - master - - develop - - tags dependencies: - build_badges script: - - mv badges/ public/ + - mkdir -p public/badges + - mv badges/ public/badges/ artifacts: paths: - public diff --git a/workflow/scripts/get_updated_badge_info.sh b/workflow/scripts/get_updated_badge_info.sh index 05a08dc7a6056498f73d26f4dc8cdedd3db58f84..fb230c4a2fc47c64340cc42fafc4c5e032e06a41 100644 --- a/workflow/scripts/get_updated_badge_info.sh +++ b/workflow/scripts/get_updated_badge_info.sh @@ -2,22 +2,30 @@ echo "collecting stats for badges" latest_release_tag=$(git tag --sort=-committerdate -l *.*.* | head -1) -echo "latest_release_tag =" ${latest_release_tag} current_pipeline_version=$(git show ${latest_release_tag}:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')") -echo "current_pipeline_version =" ${current_pipeline_version} current_nextflow_version=$(git show ${latest_release_tag}:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')") -echo "current_nextflow_version =" ${current_nextflow_version} master_pipeline_version=$(git show origin/master:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')") -echo "master_pipeline_version =" ${master_pipeline_version} master_nextflow_version=$(git show origin/master:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')") -echo "master_nextflow_version =" ${master_nextflow_version} develop_pipeline_version=$(git show origin/develop:workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')") -echo "develop_pipeline_version =" ${develop_pipeline_version} develop_nextflow_version=$(git show origin/develop:workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')") -echo "develop_nextflow_version =" ${develop_nextflow_version} + +echo "collecting tool version for badges" +python_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o Python.* | grep -oP "(?<=d>).*(?=\<)") +deriva_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o DERIVA.* | grep -oP "(?<=d>).*(?=\<)") +bdbag_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o BDBag.* | grep -oP "(?<=d>).*(?=\<)") +rseqc_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o RSeQC.* | grep -oP "(?<=d>).*(?=\<)") +trimgalore_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o 'Trim Galore!'.* | grep -oP "(?<=d>).*(?=\<)") +hisat2_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o HISAT2.* | grep -oP "(?<=d>).*(?=\<)") +samtools_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o Samtools.* | grep -oP "(?<=d>).*(?=\<)") +picard_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o 'picard (MarkDuplicates)'.* | grep -oP "(?<=d>).*(?=\<)") +featurecounts_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o featureCounts.* | grep -oP "(?<=d>).*(?=\<)") +r_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o R.* | grep -oP "(?<=d>).*(?=\<)") +deeptools_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o deepTools.* | grep -oP "(?<=d>).*(?=\<)") +fastqc_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o FastQC.* | grep -oP "(?<=d>).*(?=\<)") +multiqc_version=$(git show ${latest_release_tag}:docs/software_versions_mqc.yaml | grep -o MultiQC.* | grep -oP "(?<=d>).*(?=\<)") echo "collecting badges" -mkdir badges +mkdir -p ./badges/tools curl --request GET https://img.shields.io/badge/Latest%20Release-${latest_release_tag}-informational?style=flat > ./badges/release.svg curl --request GET https://img.shields.io/badge/Pipeline%20Version-${current_pipeline_version}-informational?style=flat > ./badges/releasePipeline.svg curl --request GET https://img.shields.io/badge/Nextflow%20Version-${current_nextflow_version}-informational?style=flat > ./badges/releaseNextflow.svg @@ -25,3 +33,17 @@ curl --request GET https://img.shields.io/badge/Pipeline%20Version-${master_pipe curl --request GET https://img.shields.io/badge/Nextflow%20Version-${master_nextflow_version}-informational?style=flat > ./badges/masterNextflow.svg curl --request GET https://img.shields.io/badge/Pipeline%20Version-${develop_pipeline_version}-informational?style=flat > ./badges/developPipeline.svg curl --request GET https://img.shields.io/badge/Nextflow%20Version-${develop_nextflow_version}-informational?style=flat > ./badges/developNextflow.svg + +curl --request GET https://img.shields.io/badge/Python%20Version-${python_version}-informational?style=flat > ./badges/tools/python.svg +curl --request GET https://img.shields.io/badge/DERIVA%20Version-${deriva_version}-informational?style=flat > ./badges/tools/deriva.svg +curl --request GET https://img.shields.io/badge/BDBag%20Version-${bdbag_version}-informational?style=flat > ./badges/tools/bdbag.svg +curl --request GET https://img.shields.io/badge/RSeQC%20Version-${rseqc_version}-informational?style=flat > ./badges/tools/rseqc.svg +curl --request GET https://img.shields.io/badge/Trim%20Galore%20Version-${trimgalore_version}-informational?style=flat > ./badges/tools/trimgalore.svg +curl --request GET https://img.shields.io/badge/HISAT2%20Version-${hisat2_version}-informational?style=flat > ./badges/tools/hisat2.svg +curl --request GET https://img.shields.io/badge/Samtools%20Version-${samtools_version}-informational?style=flat > ./badges/tools/samtools.svg +curl --request GET https://img.shields.io/badge/picard%20Version-${picard_version}-informational?style=flat > ./badges/tools/picard.svg +curl --request GET https://img.shields.io/badge/featureCounts%20Version-${featurecounts_version}-informational?style=flat > ./badges/tools/featurecounts.svg +curl --request GET https://img.shields.io/badge/R%20Version-${r_version}-informational?style=flat > ./badges/tools/r.svg +curl --request GET https://img.shields.io/badge/deepTools%20Version-${deeptools_version}-informational?style=flat > ./badges/tools/deeptools.svg +curl --request GET https://img.shields.io/badge/FastQC%20Version-${fastqc_version}-informational?style=flat > ./badges/tools/fastqc.svg +curl --request GET https://img.shields.io/badge/MultiQC%20Version-${multiqc_version}-informational?style=flat > ./badges/tools/multiqc.svg \ No newline at end of file