Source files of publiccode.eu, the official website for the "Public Money, Public Code" campaign
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.drone.yml 1.4KB

123456789101112131415161718192021222324252627282930313233
  1. pipeline:
  2. syntaxcheck:
  3. image: monachus/hugo
  4. commands:
  5. - cd site; ./build/build.sh syntax
  6. deploy:
  7. image: docker:dind
  8. commands:
  9. # Get docker-compose
  10. - wget -q -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)
  11. # Make it executable
  12. - chmod 700 /usr/local/bin/docker-compose
  13. # Download and install glibc (Alpine comes with musl libc) because docker-compose relies on it
  14. - wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-2.27-r0.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-bin-2.27-r0.apk
  15. - wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
  16. - apk add -q --update glibc-2.27-r0.apk glibc-bin-2.27-r0.apk
  17. - apk add -q git
  18. # Clone the git remository
  19. # Make the signatures file available to the PMPC website
  20. # Build the docker container
  21. # Clean things up
  22. - git clone https://git.fsfe.org/pmpc/website.git /tmp/pmpc-build && cd /tmp/pmpc-build/ && cp /tmp/signatures/signatures.json site/data/signatures/signatures.json && docker build -t pmpc .
  23. # Run docker compose
  24. - docker-compose up -d
  25. volumes:
  26. - /var/run/docker.sock:/var/run/docker.sock
  27. - /srv/forms/pmpc:/tmp/signatures:ro
  28. when:
  29. event: [push, tag, deployment]
  30. branch: master