aboutsummaryrefslogtreecommitdiff
path: root/scripts/laminar
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-01-21 07:42:10 +0300
committerFrederick Muriuki Muriithi2022-01-24 10:25:27 +0300
commit4c909d6748ef1f0e7348f7aec42a903f83c6f564 (patch)
tree13b817bfa030e1b58b4b0b5fe0d3eddcdd604edf /scripts/laminar
parent2c3e163cc69fd391ecda4e3b7a27078626a3f1b4 (diff)
downloadgenenetwork3-4c909d6748ef1f0e7348f7aec42a903f83c6f564.tar.gz
Add script to run laminar pipeline
Diffstat (limited to 'scripts/laminar')
-rwxr-xr-xscripts/laminar/genenetwork3.init6
-rwxr-xr-xscripts/laminar/genenetwork3.run29
2 files changed, 35 insertions, 0 deletions
diff --git a/scripts/laminar/genenetwork3.init b/scripts/laminar/genenetwork3.init
new file mode 100755
index 0000000..97379f5
--- /dev/null
+++ b/scripts/laminar/genenetwork3.init
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -ex
+
+# Clone repository if it doesn't already exist
+git clone "${GIT_REPO_URL}" .
diff --git a/scripts/laminar/genenetwork3.run b/scripts/laminar/genenetwork3.run
new file mode 100755
index 0000000..8b1e3d4
--- /dev/null
+++ b/scripts/laminar/genenetwork3.run
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+
+(
+ # Lock directory
+ flock 9
+
+ # pull in latest changes
+ cd "${WORKSPACE}"
+ git fetch
+ git checkout "${GIT_COMMIT_REF}"
+ cd -
+
+ for filename in "${WORKSPACE}"/*
+ do
+ if [ "${filename}" != ".git" ]
+ then
+ cp -vR "${filename}" .
+ fi
+ done
+) 9>"${WORKSPACE}/lock"
+
+# Simultaneously trigger common checks
+GN3_CI_DIR="$(pwd)"
+laminarc run gn3-lint GN3_CI_DIR="${GN3_CI_DIR}" \
+ gn3-mypy GN3_CI_DIR="${GN3_CI_DIR}" \
+ gn3-unittest GN3_CI_DIR="${GN3_CI_DIR}"