Guest User

Untitled

a guest
Mar 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #!docker build -f Dockerfile.travis-local -t travis-local .
  2.  
  3. FROM travisci/ci-amethyst:packer-1512508255-986baf0
  4. USER travis
  5.  
  6. WORKDIR /home/travis
  7. RUN git clone https://github.com/travis-ci/travis-build.git
  8.  
  9. WORKDIR travis-build
  10. RUN bash -lc "gem install travis"
  11. RUN bash -lc travis # to create ~/.travis
  12. RUN ln -s $(pwd) ~/.travis/travis-build
  13. RUN bash -lc "bundle install"
  14. #RUN bash -lc "bundler add travis"
  15. RUN bash -lc "bundler binstubs travis"
  16. RUN echo alias travis="~/.travis/travis-build/bin/travis" >> ~/.bashrc
  17.  
  18. #!docker build -f Dockerfile.travis-local-build -t travis-local-build . && docker run -ti travis-local-build
  19.  
  20. FROM travis-local
  21. USER travis
  22.  
  23. WORKDIR /home/travis/build
  24. ADD --chown=travis . org/repo
  25.  
  26. WORKDIR org/repo
  27. RUN chmod +x gradlew
  28. # Alias not recognized, but in interactive mode `travis compile` works without path.
  29. RUN bash -lc "~/.travis/travis-build/bin/travis compile --no-interactive > build.sh"
  30. RUN sed -re 's/^.*travis_wait_for_network '''.*$/echo DISABLED &/mg' build.sh --in-place
  31. RUN sed -re 's/^.*apt-get update.*$/echo DISABLED &/mg' build.sh --in-place
  32. RUN sed -re 's/^.*travis_cmd git.*(fetch|reset|checkout).*$/echo DISABLED &/mg' build.sh --in-place
  33. RUN chmod +x build.sh
  34.  
  35. WORKDIR /home/travis/build
  36. RUN sudo ln -s org/repo/build.sh build.sh
  37. CMD ["bash"]
Add Comment
Please, Sign In to add comment