Kromek Radangel gamma spectrometer USB HID daemon and WebUI. https://git.unino.de/pvivell/radangel
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

drone.yml 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. kind: pipeline
  2. name: clone-prepare-build-sign-release
  3. # https://github.com/drone/drone
  4. platform:
  5. os: linux
  6. arch: amd64
  7. clone:
  8. disable: false
  9. depth: 50
  10. steps:
  11. - name: prepare
  12. image: plugins/docker
  13. # http://plugins.drone.io/drone-plugins/drone-docker/
  14. # https://github.com/drone-plugins/drone-docker
  15. when:
  16. event: [ tag ] # [ push, tag ]
  17. settings:
  18. dry_run: false
  19. registry: reg.unino.de
  20. insecure: false
  21. #auth: authtoken for registry
  22. username: { from_secret: reg-user }
  23. password: { from_secret: reg-pass }
  24. repo: reg.unino.de/develop/debian-${DRONE_REPO_NAMESPACE}-${DRONE_REPO_NAME}
  25. #mirror: registry-1.docker.io
  26. bip: 172.17.0.1/16 # set bridge if non-existent
  27. context: /drone/src # defaults to root of git repo
  28. #custom_dns: 127.0.0.11 # defaults to 8.8.8.8 and 8.8.4.4
  29. storage_driver: overlay2 # aufs, overlay or vfs
  30. #debug: true
  31. #launch_debug: true
  32. target: builder # Dockerfile build target e.g. builder, debug, production
  33. dockerfile: Dockerfile
  34. auto_tag: false
  35. auto_tag_suffix: linux-amd64
  36. force_tag: true
  37. tags: [ latest, builder ]
  38. build_args: # custom args for docker build, e.g. additional BUILD_DEPS etc.
  39. - DEB_RELEASE=stretch
  40. - BUILD_DEPS=libhidapi-dev libssl-dev zip
  41. - BUILD_ARCH=i386 amd64 armhf armel # amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64el s390x
  42. - name: build
  43. image: reg.unino.de/develop/debian-${DRONE_REPO_NAMESPACE}-${DRONE_REPO_NAME}:latest
  44. # https://readme.drone.io/user-guide/pipeline/
  45. # https://docs.drone.io/reference/environ/
  46. when:
  47. event: [ push, tag ]
  48. depends_on: [ clone, prepare ]
  49. environment:
  50. MAKEFLAGS: -j 1
  51. # https://wiki.debian.org/CrossCompiling#Building_with_dpkg-buildpackage
  52. BUILD_ARCH: amd64 armhf # amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64el s390x
  53. commands:
  54. - PKG_NAME="${DRONE_REPO_NAME}" &&
  55. PKG_VERSION="$(git describe --always)" &&
  56. PKG_SRC_ROOT="$(pwd)" &&
  57. PKG_RELEASE_DIR="$${PKG_SRC_ROOT}/release" &&
  58. PKG_DIST_DIR="dist" &&
  59. mkdir -p "$${PKG_RELEASE_DIR}" &&
  60. PKG_DEB_ARCHIVE="$${PKG_NAME}_$${PKG_VERSION}.orig.tar.xz" &&
  61. PKG_DEB_ARCHIVE_ROOT="${PKG_NAME}-${PKG_VERSION}" &&
  62. tar --exclude='./.*' --exclude='debian' --exclude="$${PKG_RELEASE_DIR}"
  63. --exclude="$${PKG_DEB_ARCHIVE}"
  64. --transform "s/\./$${PKG_DEB_ARCHIVE_ROOT}/"
  65. -cJvf "$${PKG_RELEASE_DIR}/$${PKG_DEB_ARCHIVE}" . &&
  66. tar -tvf "$${PKG_RELEASE_DIR}/$${PKG_DEB_ARCHIVE}" &&
  67. PKG_BUILDHOST_ARCH="amd64" &&
  68. for PKG_ARCH in $${BUILD_ARCH} ; do cd "$${PKG_SRC_ROOT}" && echo "Building for $${PKG_ARCH}" &&
  69. PKG_RELEASE_ARCHIVE="$${PKG_NAME}_$${PKG_VERSION}_$${PKG_ARCH}.tar.xz" &&
  70. PKG_RELEASE_ARCHIVE_ROOT="$${PKG_NAME}-$${PKG_VERSION}" &&
  71. PKG_BUILD_DIR="$${PKG_SRC_ROOT}/build/$${PKG_ARCH}/$${PKG_ARCHIVE_ROOT}" &&
  72. mkdir -p "$${PKG_BUILD_DIR}" &&
  73. tar -xf "$${PKG_RELEASE_DIR}/$${PKG_DEB_ARCHIVE}" -C "$${PKG_BUILD_DIR}" --strip 1 &&
  74. cd "$${PKG_BUILD_DIR}" &&
  75. export MAKEFLAGS="$${MAKEFLAGS}" &&
  76. make &&
  77. tar --exclude='./.*'
  78. --transform "s/\./$${PKG_RELEASE_ARCHIVE_ROOT}/"
  79. -C "$${PKG_DIST_DIR}"
  80. -cJvf "$${PKG_RELEASE_DIR}/$${PKG_RELEASE_ARCHIVE}" . &&
  81. tar -tvf "$${PKG_RELEASE_DIR}/$${PKG_RELEASE_ARCHIVE}"
  82. make clean ;
  83. done &&
  84. ls -la "$${PKG_RELEASE_DIR}" &&
  85. find "$${PKG_RELEASE_DIR}" -type f -exec md5sum '{}' \;
  86. # tar --exclude='./.*'
  87. # --transform "s/$${PKG_DIST_DIR}/$${PKG_RELEASE_ARCHIVE_ROOT}/"
  88. # -cJvf "$${PKG_RELEASE_DIR}/$${PKG_RELEASE_ARCHIVE}" "${PKG_DIST_DIR}" &&
  89. # - export MAKEFLAGS && make
  90. # - CONTENT=${DRONE_REPO_NAME} ;
  91. # test -n "${DRONE_TAG}" &&
  92. # RELEASE=${DRONE_REPO_NAME}-${DRONE_TAG}-bin ||
  93. # RELEASE=${DRONE_REPO_NAME}-bin
  94. # - cp -rp dist/. $CONTENT/ ;
  95. # ls -la $CONTENT
  96. # - find $CONTENT -type f -exec md5sum '{}' \;
  97. # - rm -rf release ;
  98. # mkdir release
  99. # # - zip -rpq release/$RELEASE.zip $CONTENT
  100. # - tar -czf release/$RELEASE.tar.gz $CONTENT
  101. # # - tar -cJf release/$RELEASE.tar.xz $CONTENT
  102. # - make clean ; rm -rf $CONTENT ;
  103. # ls -la release
  104. # - find release -type f -exec md5sum '{}' \;
  105. # - for ARCH in ${BUILD_ARCH} ; do
  106. # apt-get build-dep -a $ARCH . ;
  107. # done
  108. # - for ARCH in ${BUILD_ARCH} ; do
  109. # CONFIG_SITE=/etc/dpkg-cross/cross-config.$ARCH
  110. # DEB_BUILD_OPTIONS=nocheck
  111. # dpkg-buildpackage -us -uc -a $ARCH ;
  112. # done
  113. - exit 0 ; ░▒▓█ BUILD END █▓▒░
  114. - name: sign
  115. image: plugins/gpgsign
  116. # http://plugins.drone.io/drone-plugins/drone-gpgsign/
  117. # https://github.com/drone-plugins/drone-gpgsign
  118. when:
  119. event: [ push, tag ]
  120. depends_on: [ build ]
  121. settings:
  122. key: { from_secret: gpg-key }
  123. passphrase: { from_secret: gpg-pass }
  124. detach_sign: true
  125. clear_sign: false
  126. files:
  127. - release/*
  128. excludes:
  129. - release/*.asc
  130. # http://plugins.drone.io/drone-plugins/drone-gitea-release/
  131. # https://github.com/drone-plugins/drone-gitea-release
  132. - name: release
  133. image: plugins/gitea-release
  134. # http://plugins.drone.io/drone-plugins/drone-gitea-release/
  135. # https://github.com/drone-plugins/drone-gitea-release
  136. when:
  137. event: [ tag ]
  138. depends_on: [ sign ]
  139. settings:
  140. title: Release ${DRONE_REPO_NAME}-${DRONE_TAG} # file or string
  141. note: RELEASE.md # file or string
  142. draft: false
  143. prerelease: false
  144. base_url: https://git.unino.de
  145. insecure: false
  146. api_key: { from_secret: gitea-release }
  147. checksum: [ md5 ] # [ md5, sha1, sha256, sha512, adler32, crc32 ]
  148. file_exists: overwrite # overwrite, skip, fail
  149. files: # wildcard * matching files with prefix supported
  150. - release/*