Kromek Radangel gamma spectrometer USB HID daemon and WebUI. https://git.unino.de/pvivell/radangel
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

drone.yml 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. BUILD_ARCH: amd64 armhf # amd64 arm64 armel armhf i386 mips mips64el mipsel powerpc ppc64el s390x
  52. commands:
  53. - PKG_NAME="${DRONE_REPO_NAME}" &&
  54. PKG_VERSION="$(git describe)" &&
  55. PKG_DEB_ARCHIVE="$${PKG_NAME}_$${PKG_VERSION}.orig.tar.xz" &&
  56. PKG_DEB_ARCHIVE_ROOT="${PKG_NAME}-${PKG_VERSION}" &&
  57. tar --exclude='./.*' --exclude='debian'
  58. --exclude="$${PKG_DEB_ARCHIVE}"
  59. --transform "s/\./$${PKG_DEB_ARCHIVE_ROOT}/"
  60. -cJvf "$${PKG_DEB_ARCHIVE}" .
  61. - PKG_RELEASE_DIR="release" &&
  62. PKG_DIST_DIR="dist" &&
  63. PKG_BUILDHOST_ARCH="${DRONE_RUNNER_ARCH}" &&
  64. PKG_SRC_ROOT="$(pwd)" &&
  65. mkdir -p "$${PKG_RELEASE_DIR}" &&
  66. for PKG_ARCH in ${BUILD_ARCH} ; do cd "$${PKG_SRC_ROOT}" &&
  67. PKG_RELEASE_ARCHIVE="$${PKG_NAME}_$${PKG_VERSION}_$${PKG_ARCH}.tar.xz" &&
  68. PKG_RELEASE_ARCHIVE_ROOT="$${PKG_NAME}-$${PKG_VERSION}" &&
  69. PKG_BUILD_DIR="build/$${PKG_ARCH}/$${PKG_ARCHIVE_ROOT}" &&
  70. tar -xf "$${PKG_ARCHIVE}" -C "$${PKG_ARCHIVE_ROOT}" --strip 1 &&
  71. cd "$${PKG_BUILD_DIR}" &&
  72. export MAKEFLAGS="${MAKEFLAGS}" &&
  73. make &&
  74. tar --exclude='./.*'
  75. --transform "s/$${PKG_DIST_DIR}/$${PKG_RELEASE_ARCHIVE_ROOT}/"
  76. -cJvf "$${PKG_RELEASE_DIR}/$${PKG_RELEASE_ARCHIVE}" "${PKG_DIST_DIR}" &&
  77. make clean ;
  78. done
  79. # - export MAKEFLAGS && make
  80. # - CONTENT=${DRONE_REPO_NAME} ;
  81. # test -n "${DRONE_TAG}" &&
  82. # RELEASE=${DRONE_REPO_NAME}-${DRONE_TAG}-bin ||
  83. # RELEASE=${DRONE_REPO_NAME}-bin
  84. # - cp -rp dist/. $CONTENT/ ;
  85. # ls -la $CONTENT
  86. # - find $CONTENT -type f -exec md5sum '{}' \;
  87. # - rm -rf release ;
  88. # mkdir release
  89. # # - zip -rpq release/$RELEASE.zip $CONTENT
  90. # - tar -czf release/$RELEASE.tar.gz $CONTENT
  91. # # - tar -cJf release/$RELEASE.tar.xz $CONTENT
  92. # - make clean ; rm -rf $CONTENT ;
  93. # ls -la release
  94. # - find release -type f -exec md5sum '{}' \;
  95. # - for ARCH in ${BUILD_ARCH} ; do
  96. # apt-get build-dep -a $ARCH . ;
  97. # done
  98. # - for ARCH in ${BUILD_ARCH} ; do
  99. # CONFIG_SITE=/etc/dpkg-cross/cross-config.$ARCH
  100. # DEB_BUILD_OPTIONS=nocheck
  101. # dpkg-buildpackage -us -uc -a $ARCH ;
  102. # done
  103. - exit 0 ; ░▒▓█ BUILD END █▓▒░
  104. - name: sign
  105. image: plugins/gpgsign
  106. # http://plugins.drone.io/drone-plugins/drone-gpgsign/
  107. # https://github.com/drone-plugins/drone-gpgsign
  108. when:
  109. event: [ push, tag ]
  110. depends_on: [ build ]
  111. settings:
  112. key: { from_secret: gpg-key }
  113. passphrase: { from_secret: gpg-pass }
  114. detach_sign: true
  115. clear_sign: false
  116. files:
  117. - release/*
  118. excludes:
  119. - release/*.asc
  120. # http://plugins.drone.io/drone-plugins/drone-gitea-release/
  121. # https://github.com/drone-plugins/drone-gitea-release
  122. - name: release
  123. image: plugins/gitea-release
  124. # http://plugins.drone.io/drone-plugins/drone-gitea-release/
  125. # https://github.com/drone-plugins/drone-gitea-release
  126. when:
  127. event: [ tag ]
  128. depends_on: [ sign ]
  129. settings:
  130. title: Release ${DRONE_REPO_NAME}-${DRONE_TAG} # file or string
  131. note: RELEASE.md # file or string
  132. draft: false
  133. prerelease: false
  134. base_url: https://git.unino.de
  135. insecure: false
  136. api_key: { from_secret: gitea-release }
  137. checksum: [ md5 ] # [ md5, sha1, sha256, sha512, adler32, crc32 ]
  138. file_exists: overwrite # overwrite, skip, fail
  139. files: # wildcard * matching files with prefix supported
  140. - release/*