-
Notifications
You must be signed in to change notification settings - Fork 4
/
circle.yml
26 lines (25 loc) · 1.81 KB
/
circle.yml
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
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
environment:
RM_OPT: "" # tells drun not to --rm since CircleCI doesn't like it
test:
override:
- ./drun -x ubuntu:16.04 cat /etc/issue | grep 'Ubuntu 16.04' # should execute command inside container
- ./drun -x docker:1.10.0 docker version # should bind docker.sock
- ./drun -x docker:1.10.0 sh -c './drun -x docker:1.10.0 true' # should do inception in 2 levels
- ./drun -x docker:1.10.0 sh -c './drun -x docker:1.10.0 sh -c "./drun -x docker:1.10.0 true"' # should do inception in 3 levels
- ./drun -x mhart/alpine-node:5.12.0 node --version | grep 'v5.12.0' # should get version of node
# should read version from package.json
- echo '{"engines":{"node":"8.14.1"}}' > package.json && ./drun -xNA node --version | grep 'v8.14.1'
- echo '{"engines":{"node":"~8.14.1"}}' > package.json && ./drun -xNA node --version | grep 'v8.14.1'
- echo '{"engines":{"node":"^8.14.1"}}' > package.json && ./drun -xNA node --version | grep 'v8.14.1'
- echo '{"engines":{"node":">=8.14.1"}}' > package.json && ./drun -xNA node --version | grep 'v8.14.1'
- echo '{"engines":{"node":">= 8.14.1"}}' > package.json && ./drun -xNA node --version | grep 'v8.14.1'
- echo '{"engines":{"node":"8.14.1"}}' > package.json && ./drun -xNM slim node --version | grep 'v8.14.1'
- echo '{"test":"passing"}' | ./drun -x stedolan/jq '.test' | grep '"passing"' # should pipe into command inside container
- echo '{"test":"passing"}' > test.json && ./drun -x stedolan/jq '.test' test.json | grep '"passing"' # should mount current directory
- ./drun alpine sh -c 'apk update && apk add checkbashisms && checkbashisms -f drun && echo "checkbashisms passed."'
- ./drun -?