test.sh in slosilo-3.0.1 vs test.sh in slosilo-3.0.2.pre.2
- old
+ new
@@ -1,27 +1,8 @@
#!/bin/bash -xe
-iid=slosilo-test-$(date +%s)
-docker build -t $iid -f - . << EOF
- FROM ruby:3.0
- WORKDIR /app
- COPY Gemfile slosilo.gemspec ./
- RUN bundle
- COPY . ./
- RUN bundle
-EOF
+echo "==> Docker Run"
+docker run --rm --volume $PWD:/app --workdir /app cyberark/ubuntu-ruby-builder bash -c 'git config --global --add safe.directory /app && bundle && ls -ltra && bundle exec rake jenkins' || :
-cidfile=$(mktemp -u)
-docker run --cidfile $cidfile -v /app/spec/reports $iid bundle exec rake jenkins || :
-
-cid=$(cat $cidfile)
-
-docker cp $cid:/app/spec/reports spec/
-docker cp $cid:/app/coverage spec
-
-docker rm $cid
-
-# untag, will use cache next time if available but no junk will be left
-docker rmi $iid
-
-rm $cidfile
+echo "==> CP Coverage to Spec"
+cp -r coverage spec