You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
3.9KB

  1. SHELL:=/bin/bash
  2. apt-ubuntu1804:
  3. wget $$SECRET_URL 1>/dev/null 2>/dev/null
  4. tar -zxvf *secret.tar.gz
  5. make prepare-packages-ubuntu1804
  6. make update-packages-ubuntu1804
  7. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  8. apt-ubuntu2004:
  9. wget $$SECRET_URL 1>/dev/null 2>/dev/null
  10. tar -zxvf *secret.tar.gz
  11. make prepare-packages-ubuntu2004
  12. make update-packages-ubuntu2004
  13. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  14. prepare-packages-ubuntu1804:
  15. mkdir -p packages
  16. cp -prv ffmpeg/pkg/*.deb \
  17. v8pp/pkg/*.deb \
  18. crtmpserver/pkg/*.deb \
  19. allegro5/pkg/*.deb \
  20. sfml/pkg/*.deb \
  21. caf/pkg/*.deb \
  22. boost/pkg/*.deb \
  23. benchmarklib/pkg/*.deb \
  24. fastpfor/pkg/*.deb \
  25. seasocks/pkg/*.deb \
  26. fmt/pkg/*.deb \
  27. pngpp/pkg/*.deb \
  28. \
  29. msxsaver/pkg/*.deb \
  30. \
  31. packages/
  32. prepare-packages-ubuntu2004:
  33. mkdir -p packages
  34. cp -prv ffmpeg/pkg/*.deb \
  35. v8pp/pkg/*.deb \
  36. allegro5/pkg/*.deb \
  37. sfml/pkg/*.deb \
  38. boost/pkg/*.deb \
  39. fastpfor/pkg/*.deb \
  40. seasocks/pkg/*.deb \
  41. fmt/pkg/*.deb \
  42. pngpp/pkg/*.deb \
  43. msxsaver/pkg/*.deb \
  44. packages/
  45. docker-ubuntu1804:
  46. docker build . -t rayburgemeestre/apt-ubuntu:18.04 -f Dockerfile-ubuntu1804
  47. docker-ubuntu2004:
  48. docker build . -t rayburgemeestre/apt-ubuntu:20.04 -f Dockerfile-ubuntu2004
  49. run-initialize-once:
  50. echo Please refer to README. Initial steps were done once manually and tar of artifacts was zipped.
  51. # mkdir -p repo gnupg keys
  52. # ssh-keygen -f keys/ssh < <(echo "\n\n")
  53. # tar -czf secret.tar.gz keys gnupg
  54. # -> Hide secret.tar.gz somewhere with a very hard to guess URL
  55. update-packages-ubuntu1804:
  56. docker pull rayburgemeestre/apt-ubuntu:18.04
  57. docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:18.04 /bin/sh -c "reprepro -b /repo includedeb bionic packages/*.deb"
  58. docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:18.04 /bin/sh -c "reprepro -b /repo list bionic"
  59. # echo produce artifact for debugging
  60. tar -czf repo.tar.gz repo
  61. # rsync to host
  62. echo if the rsync fails, then double check if the ssh key is accepted in authorized_hosts
  63. rsync --delete -raPv -e "$$SYNC_CMD_SSH" repo $$SYNC_CMD_DEST
  64. update-packages-ubuntu2004:
  65. docker pull rayburgemeestre/apt-ubuntu:20.04
  66. docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:20.04 /bin/sh -c "reprepro -b /repo includedeb focal packages/*.deb"
  67. docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:20.04 /bin/sh -c "reprepro -b /repo list focal"
  68. # echo produce artifact for debugging
  69. tar -czf repo.tar.gz repo
  70. # rsync to host
  71. echo if the rsync fails, then double check if the ssh key is accepted in authorized_hosts
  72. echo check https://ci.cppse.nl/go/admin/pipelines/apt-publisher-ubuntu2004/stages/publisher/job/make/environment_variables
  73. echo then probably you need to rm -rf /mnt2/NAS/kube/cppse.nl/cppse.nl/repo
  74. echo then probably you need to rm -rf /var/lib/go-agent/pipelines/apt-publisher-ubuntu2004
  75. rsync --delete -raPv -e "$$SYNC_CMD_SSH" repo $$SYNC_CMD_DEST
  76. # NOTE: troubles with this shizzle? remove /mnt2/NAS/kube/cppse.nl/cppse.nl/repo
  77. # and also remove work dir in go-agent: rm -rf /var/lib/go-agent/pipelines/apt-publisher-ubuntu2004
  78. shell-ubuntu1804:
  79. docker pull rayburgemeestre/apt-ubuntu:18.04
  80. docker run -i -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:18.04 /bin/bash
  81. shell-ubuntu2004:
  82. docker pull rayburgemeestre/apt-ubuntu:20.04
  83. docker run -i -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:20.04 /bin/bash
  84. clean-all:
  85. rm -rf repo gnupg keys