12 Commits

Author SHA1 Message Date
7f38e567d9 curl test
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-03 17:41:42 -07:00
57958bd383 Update golang and drone-kaniko
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2021-11-08 13:31:27 -08:00
3abd4c1519 debug kaniko image
Some checks failed
continuous-integration/drone/push Build is failing
2021-11-08 11:47:17 -08:00
67ac0b03a5 Use specific kaniko image
Some checks failed
continuous-integration/drone/push Build is failing
2021-11-08 11:38:03 -08:00
c3824dc377 Fix .drone.yml signature 2021-11-08 11:28:28 -08:00
a6d44cf54a Stop using drone-builds namespace
Some checks failed
continuous-integration/drone/push Build is failing
2021-11-08 10:25:01 -08:00
b7f30d3436 volume test
Some checks failed
continuous-integration/drone/push Build is failing
2021-10-31 00:41:27 -07:00
ccd503b0e7 Try sample from github
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-31 00:33:52 -07:00
4dd5054000 set privileged to get volume mount
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2021-10-31 00:30:25 -07:00
989a491429 More volume testing
Some checks failed
continuous-integration/drone/push Build is failing
2021-10-31 00:08:30 -07:00
1b8d1d0725 Sign drone file
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-30 23:32:11 -07:00
1d9e4c71d3 Test volume mount
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2021-10-30 23:30:34 -07:00
2 changed files with 97 additions and 25 deletions

View File

@@ -1,13 +1,20 @@
---
kind: pipeline
type: kubernetes
name: default
steps:
- name: test
image: golang:1.16.3
- name: test
image: golang:1.20.4
commands:
- pwd
- go test -v
- go build
- echo "hello" > /shared/greetings.txt
- hostname >> /shared/greetings.txt
volumes:
- name: shared
path: /shared
resources:
limits:
cpu: 1000
@@ -16,11 +23,35 @@ steps:
cpu: 500
memory: 200MiB
- name: docker
image: harbor.ntppool.org/ntppool/drone-kaniko:latest
- name: download
image: fedora:38
commands:
- ls; pwd
- ./scripts/download-release test/187 dist/
resources:
requests:
cpu: 250
memory: 64MiB
limits:
cpu: 250
memory: 256MiB
- name: read
pull: if-not-exists
image: alpine
volumes:
- name: shared
path: /shared
commands:
- pwd
- ls /shared
- cat /shared/greetings.txt
- name: docker
image: harbor.ntppool.org/ntppool/drone-kaniko:main
pull: always
settings:
repo: drone-builds/drone-test
repo: ask/drone-test
registry: harbor.ntppool.org
auto_tag: true
tags: SHA7,${DRONE_SOURCE_BRANCH}
@@ -29,3 +60,14 @@ steps:
from_secret: harbor_username
password:
from_secret: harbor_password
volumes:
- name: shared
claim:
name: go-pkg
---
kind: signature
hmac: 94513b436eb1b0ef9f1d1b0f128328f23bb343f1b9d9d6e7a0e80dacc22d3c48
...

30
scripts/download-release Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
BUILD=$1
DIR=$2
set -euo pipefail
if [ -z "$DIR" ]; then
echo run with $0 BUILD_NUMBER DIR
exit 2
fi
mkdir -p $DIR
BASE=https://geodns.bitnames.com/monitor/builds/$BUILD
files=`curl -sSf $BASE/checksums.txt | awk '{print $2}'`
metafiles="checksums.txt metadata.json CHANGELOG.md artifacts.json"
for f in $metafiles; do
url=$BASE/$f
echo downloading $url
curl --remove-on-error -sSfRo $DIR/$f $url || true
done
for f in $files; do
url=$BASE/$f
echo downloading $url
curl --remove-on-error -sSfRo $DIR/$f $url
done