Skip to content

Commit a349a7b

Browse files
committed
make all build dep as env vars, update docs
1 parent 9c93ce8 commit a349a7b

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/build_genome_nexus_annotator.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Build and Upload Genome Nexus Annotator
22

33
on:
4+
push:
45
workflow_dispatch:
56
inputs:
67
commit_hash:
7-
description: "Genome Nexus pipeline commit hash"
8+
description: "Genome Nexus pipeline commit hash to use for version of annotator.jar"
89
required: true
910
default: "main"
1011

@@ -13,21 +14,27 @@ jobs:
1314
runs-on: ubuntu-latest
1415

1516
env:
16-
MAVEN_VERSION: 3.9.9
17+
# versions for dependencies used in annotator.jar build
18+
MAVEN_VERSION: '3.9.9'
19+
COMMIT_HASH: ${{ github.event.inputs.commit_hash }}
20+
JAVA_VERSION: "21"
21+
JAVA_DISTRIBUTION: "corretto"
22+
# synapse id of the annotator.jar
1723
SYNAPSE_ENTITY_ID: syn22084320
18-
SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }}
24+
# env vars related to testing the annotator.jar
1925
PROD_DOCKER: ghcr.io/sage-bionetworks/genie:main
26+
SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }}
2027
TEST_PROJECT_SYNID: syn7208886
2128

2229
steps:
2330
- name: Checkout workflow repo
2431
uses: actions/checkout@v4
2532

26-
- name: Set up Java (Amazon Corretto 21)
33+
- name: Set up Java
2734
uses: actions/setup-java@v4
2835
with:
29-
java-version: "21"
30-
distribution: "corretto"
36+
java-version: ${{ env.JAVA_VERSION }}
37+
distribution: ${{ env.JAVA_DISTRIBUTION }}
3138

3239
- name: Install Maven
3340
run: |
@@ -40,13 +47,13 @@ jobs:
4047
python3 -m pip install --upgrade pip
4148
pip install synapseclient chardet
4249
43-
- name: Clone Genome Nexus Annotation Pipeline
50+
- name: Clone Genome Nexus Annotation Pipeline and check out commit hash
4451
run: |
4552
git clone genome-nexus-annotation-pipeline
4653
cd genome-nexus-annotation-pipeline
4754
git checkout ${{ github.event.inputs.commit_hash }}
4855
49-
- name: Configure application.properties and log4j.properties
56+
- name: Configure application.properties and log4j.properties to be genie specific
5057
run: |
5158
cd genome-nexus-annotation-pipeline
5259
CONFIG_PATH="annotationPipeline/src/main/resources"
@@ -69,21 +76,19 @@ jobs:
6976
7077
echo "[INFO] Application and log configs written."
7178
72-
- name: Build annotator.jar
79+
- name: Build annotator.jar (skips tests)
7380
run: |
7481
cd genome-nexus-annotation-pipeline
7582
mvn clean install -DskipTests
7683
find . -name annotator.jar
7784
7885
- name: Upload annotator.jar to Synapse
79-
env:
80-
COMMIT_HASH: ${{ github.event.inputs.commit_hash }}
8186
run: |
8287
cd genome-nexus-annotation-pipeline
8388
FILE_PATH=$(find . -name annotator.jar | head -n 1)
8489
echo "Uploading $FILE_PATH to Synapse entity $SYNAPSE_ENTITY_ID..."
8590
86-
synapse login --authToken "$SYNAPSE_AUTH_TOKEN"
91+
synapse login
8792
# Upload with version comment
8893
synapse store "$FILE_PATH" \
8994
--parentid "$SYNAPSE_ENTITY_ID" \

0 commit comments

Comments
 (0)