-
Notifications
You must be signed in to change notification settings - Fork 3
/
justfile
38 lines (26 loc) · 848 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
31
32
33
34
35
36
37
38
set dotenv-load := true
#enable modern docker build features
export DOCKER_BUILDKIT := "1"
export COMPOSE_DOCKER_CLI_BUILD := "1"
# build the R image locally
build:
#!/usr/bin/env bash
set -euo pipefail
# set build args for prod builds
export BUILD_DATE=$(date -u +'%y-%m-%dT%H:%M:%SZ')
export GITREF=$(git rev-parse --short HEAD)
# build the thing
docker-compose build --pull r
# build and add a package and its dependencies to the image
add-package package:
bash ./add-package.sh {{ package }}
# test the locally built image
test image="r": build
bash ./test.sh "{{ image }}"
# lint source code
lint:
docker pull hadolint/hadolint
docker run --rm -i hadolint/hadolint < Dockerfile
publish:
docker tag r ghcr.io/opensafely-core/r:latest
docker push ghcr.io/opensafely-core/r:latest