Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
7f38e567d9 |
19
.drone.yml
19
.drone.yml
@ -5,7 +5,7 @@ name: default
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.24
|
||||
image: golang:1.20.4
|
||||
commands:
|
||||
- pwd
|
||||
- go test -v
|
||||
@ -18,11 +18,24 @@ steps:
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000
|
||||
memory: 512MiB
|
||||
memory: 300MiB
|
||||
requests:
|
||||
cpu: 500
|
||||
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
|
||||
pull: if-not-exists
|
||||
image: alpine
|
||||
@ -55,6 +68,6 @@ volumes:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 2b21527432d95cf52636c65e091d9129c198299a425d12b2860d468262234d62
|
||||
hmac: 94513b436eb1b0ef9f1d1b0f128328f23bb343f1b9d9d6e7a0e80dacc22d3c48
|
||||
|
||||
...
|
||||
|
@ -1,11 +1,8 @@
|
||||
FROM golang:1.24-alpine3.21 as builder
|
||||
FROM golang:1.16.4-alpine3.13 as builder
|
||||
WORKDIR /go/src/gitea.develooper.com/ask/drone-test
|
||||
ADD . .
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o demo
|
||||
|
||||
FROM alpine:3.21 as production
|
||||
|
||||
USER root
|
||||
|
||||
FROM alpine:3.13 as production
|
||||
COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo .
|
||||
CMD ["./demo"]
|
||||
|
2
go.mod
2
go.mod
@ -1,3 +1,3 @@
|
||||
module gitea.develooper.com/ask/drone-test
|
||||
|
||||
go 1.23
|
||||
go 1.16
|
||||
|
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…
x
Reference in New Issue
Block a user