generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
30 lines (21 loc) · 936 Bytes
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
set dotenv-load := true
# list available commands
default:
@"{{ just_executable() }}" --list
build:
#!/usr/bin/env bash
set -euo pipefail
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
export GITREF=$(git rev-parse --short HEAD)
docker build . --build-arg BUILD_DATE="$BUILD_DATE" --build-arg GITREF="$GITREF" -t research-template
check-image-exists:
# Extra brackets are for Just escaping.
docker image inspect --format='{{{{.Id}}}}' research-template
test-packages: check-image-exists
tests/packages.sh
test-python-install: check-image-exists
docker run -i --rm --entrypoint /bin/bash research-template < ./tests/python.sh
test-rstudio-install: check-image-exists
docker run -i --rm --entrypoint /bin/bash research-template < ./tests/r_studio.sh
test-postcreate-script: check-image-exists
docker run -i --rm --entrypoint /bin/bash research-template < ./tests/postCreate.sh