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,31 +1,73 @@
---
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: default name: default
steps: steps:
- name: test - name: test
image: golang:1.16.3 image: golang:1.20.4
commands: commands:
- go test -v - pwd
- go build - go test -v
resources: - go build
limits: - echo "hello" > /shared/greetings.txt
cpu: 1000 - hostname >> /shared/greetings.txt
memory: 300MiB volumes:
requests: - name: shared
cpu: 500 path: /shared
memory: 200MiB resources:
limits:
cpu: 1000
memory: 300MiB
requests:
cpu: 500
memory: 200MiB
- name: docker - name: download
image: harbor.ntppool.org/ntppool/drone-kaniko:latest image: fedora:38
pull: always commands:
settings: - ls; pwd
repo: drone-builds/drone-test - ./scripts/download-release test/187 dist/
registry: harbor.ntppool.org resources:
auto_tag: true requests:
tags: SHA7,${DRONE_SOURCE_BRANCH} cpu: 250
cache: true memory: 64MiB
username: limits:
from_secret: harbor_username cpu: 250
password: memory: 256MiB
from_secret: harbor_password
- 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: ask/drone-test
registry: harbor.ntppool.org
auto_tag: true
tags: SHA7,${DRONE_SOURCE_BRANCH}
cache: true
username:
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