44 push :
55 paths :
66 - ' .github/workflows/build_genome_nexus_annotator.yml'
7+
78env :
89 # versions for dependencies used in annotator.jar build
910 MAVEN_VERSION : ' 3.9.9'
1011 COMMIT_HASH : " 2e67ebd08cf7c26bf1f55f2baf4b73ac36531119"
1112 JAVA_VERSION : " 21"
1213 JAVA_DISTRIBUTION : " corretto"
13- # synapse id of the Genome Nexus folder
14- OUTPUT_FOLDER_SYNAPSE_ID : syn22105656
14+ # synapse id of the Genome Nexus Testing folder
15+ OUTPUT_FOLDER_SYNAPSE_ID : syn70781006
1516 # env vars related to testing the annotator.jar
1617 PROD_DOCKER : ghcr.io/sage-bionetworks/genie:main
1718 SYNAPSE_AUTH_TOKEN : ${{ secrets.SYNAPSE_AUTH_TOKEN }}
@@ -47,36 +48,40 @@ jobs:
4748 cd genome-nexus-annotation-pipeline
4849 git checkout ${{ env.COMMIT_HASH }}
4950
50- - name : Configure application.properties and log4j.properties to be genie specific
51+ - name : Configure application.properties and log4j.properties to be GENIE- specific
5152 run : |
52- cd genome-nexus-annotation-pipeline
53- CONFIG_PATH="annotationPipeline/src/main/resources"
54- mkdir -p $CONFIG_PATH
55-
56- # Create or overwrite application.properties
57- cat <<'EOF' > "${CONFIG_PATH}/application.properties"
58- spring.batch.job.enabled=false
59- spring.jmx.enabled=false
60- chunk=100
61- genomenexus.enrichment_fields=annotation_summary,sift,polyphen,my_variant_info
62- genomenexus.isoform_query_parameter=isoformOverrideSource
63- genomenexus.base=https://genie.genomenexus.org/
64- EOF
65-
66- # Create or overwrite log4j.properties
67- cat <<'EOF' > "${CONFIG_PATH}/log4j.properties"
68- log4j.appender.a.File=/tmp/genomenexus-logfile.log
69- EOF
70-
71- echo "[INFO] Application and log configs written."
53+ cd genome-nexus-annotation-pipeline
54+ CONFIG_PATH="annotationPipeline/src/main/resources"
55+ mkdir -p "$CONFIG_PATH"
56+
57+ # Copy example configs first
58+ cp "${CONFIG_PATH}/application.properties.EXAMPLE" "${CONFIG_PATH}/application.properties"
59+ cp "${CONFIG_PATH}/log4j.properties.EXAMPLE" "${CONFIG_PATH}/log4j.properties"
60+
61+ # Modify application.properties lines in place
62+ sed -i \
63+ -e 's|^spring.batch.job.enabled=.*|spring.batch.job.enabled=false|' \
64+ -e 's|^spring.jmx.enabled=.*|spring.jmx.enabled=false|' \
65+ -e 's|^chunk=.*|chunk=100|' \
66+ -e 's|^genomenexus.enrichment_fields=.*|genomenexus.enrichment_fields=annotation_summary,sift,polyphen,my_variant_info|' \
67+ -e 's|^genomenexus.isoform_query_parameter=.*|genomenexus.isoform_query_parameter=isoformOverrideSource|' \
68+ -e 's|^genomenexus.base=.*|genomenexus.base=https://genie.genomenexus.org/|' \
69+ "${CONFIG_PATH}/application.properties"
70+
71+ # Modify log4j.properties line
72+ sed -i \
73+ -e 's|^log4j.appender.a.File.*|log4j.appender.a.File=/tmp/genomenexus-logfile.log|' \
74+ "${CONFIG_PATH}/log4j.properties"
75+
76+ echo "[INFO] Application and log configs updated from EXAMPLE files."
7277
7378 - name : Build annotator.jar (skips tests)
7479 run : |
7580 cd genome-nexus-annotation-pipeline
7681 mvn clean install -DskipTests
7782 find . -name annotator.jar
7883
79- - name : Upload annotator.jar to Synapse
84+ - name : Upload annotator.jar, application.properties and log4j.properties to Synapse
8085 run : |
8186 cd genome-nexus-annotation-pipeline
8287 # Locate the built JAR dynamically
@@ -102,8 +107,14 @@ jobs:
102107
103108 synapse login
104109
105- # Upload!
110+ # Upload annotator.jar file !
106111 synapse store "$TARGET_PATH" --parentid ${{ env.OUTPUT_FOLDER_SYNAPSE_ID }}
112+
113+ # Upload application and log4j files
114+ CONFIG_PATH="annotationPipeline/src/main/resources"
115+ synapse store "${CONFIG_PATH}/application.properties" --parentid ${{ env.OUTPUT_FOLDER_SYNAPSE_ID }}
116+ synapse store "${CONFIG_PATH}/log4j.properties" --parentid ${{ env.OUTPUT_FOLDER_SYNAPSE_ID }}
117+
107118 check-annotator-build :
108119 needs : build-annotator
109120 runs-on : ubuntu-latest
0 commit comments