Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7f38e567d9 |
20
.drone.yml
20
.drone.yml
@ -5,8 +5,9 @@ name: default
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: golang:1.17.3
|
image: golang:1.20.4
|
||||||
commands:
|
commands:
|
||||||
|
- pwd
|
||||||
- go test -v
|
- go test -v
|
||||||
- go build
|
- go build
|
||||||
- echo "hello" > /shared/greetings.txt
|
- echo "hello" > /shared/greetings.txt
|
||||||
@ -22,6 +23,19 @@ steps:
|
|||||||
cpu: 500
|
cpu: 500
|
||||||
memory: 200MiB
|
memory: 200MiB
|
||||||
|
|
||||||
|
- 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
|
- name: read
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: alpine
|
image: alpine
|
||||||
@ -34,7 +48,7 @@ steps:
|
|||||||
- cat /shared/greetings.txt
|
- cat /shared/greetings.txt
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: harbor.ntppool.org/ntppool/drone-kaniko:1.7.0-1
|
image: harbor.ntppool.org/ntppool/drone-kaniko:main
|
||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
repo: ask/drone-test
|
repo: ask/drone-test
|
||||||
@ -54,6 +68,6 @@ volumes:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 10ad8f183db2d1a7a1062bd1f0aab9e7292c2e87accc080ed2340aa6989e1695
|
hmac: 94513b436eb1b0ef9f1d1b0f128328f23bb343f1b9d9d6e7a0e80dacc22d3c48
|
||||||
|
|
||||||
...
|
...
|
||||||
|
30
scripts/download-release
Executable file
30
scripts/download-release
Executable 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
|
Loading…
Reference in New Issue
Block a user