-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_stage.sh
More file actions
29 lines (22 loc) · 782 Bytes
/
Copy pathdocker_stage.sh
File metadata and controls
29 lines (22 loc) · 782 Bytes
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
#!/bin/sh
# Example non-Linux platforms for rhub:
# "macos-elcapitan-release"
# "windows-x86_64-devel"
set -e
dir_script=$(dirname $(readlink -f "$0"))
dir_root=$dir_script/../
dir_package=$(basename $(dirname $dir_script))
image_name=index.docker.io/jozefhajnala/rhub:latest
container_name=${dir_package}_check
docker login --username jozefhajnala --password $DOCKER_LOGIN_TOKEN
docker pull $image_name
docker run -id --name $container_name $image_name bash
docker cp $dir_root $container_name:/root
docker exec \
--workdir /root/$dir_package \
--env LANGSERVERSETUP_RUN_DEPLOY=$LANGSERVERSETUP_RUN_DEPLOY \
--env LANGSERVERSETUP_TOKEN_CODECOV=$LANGSERVERSETUP_TOKEN_CODECOV \
$container_name \
Rscript "$@"
docker stop $container_name
docker rm $container_name