18 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
23f8755c95 always pull kaniko image
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-29 19:26:39 -07:00
c24b9e4cdc Update go
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone Build is passing
2021-05-25 00:00:53 -07:00
2733d4f567 Upgrade Go and Alpine
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-06 02:24:24 -07:00
7cc5c91dce Upgrade Go, Kaniko and Alpine 2020-06-25 21:59:45 -07:00
a4cb903627 push test
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-25 03:33:05 -07:00
9849cb8b19 push test
All checks were successful
continuous-integration/drone/push Build is passing
2020-05-25 03:30:48 -07:00
5 changed files with 104 additions and 29 deletions

View File

@@ -1,13 +1,20 @@
---
kind: pipeline
type: kubernetes
name: default
steps:
- name: test
image: golang:1.14.3
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,16 +23,51 @@ steps:
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
volumes:
- name: shared
path: /shared
commands:
- pwd
- ls /shared
- cat /shared/greetings.txt
- name: docker
image: askbjoernhansen/drone-kaniko:0.22-4
#image: banzaicloud/drone-kaniko
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: ${DRONE_SOURCE_BRANCH},SHA7
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
...

View File

@@ -1,8 +1,8 @@
FROM golang:1.14.3 as builder
FROM golang:1.16.4-alpine3.13 as builder
WORKDIR /go/src/gitea.develooper.com/ask/drone-test
ADD . .
RUN CGO_ENABLED=0 GOOS=linux go build -o demo
RUN CGO_ENABLED=1 GOOS=linux go build -o demo
FROM alpine:3.11 as production
FROM alpine:3.13 as production
COPY --from=builder /go/src/gitea.develooper.com/ask/drone-test/demo .
CMD ["./demo"]

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module gitea.develooper.com/ask/drone-test
go 1.16

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

View File

@@ -1 +1 @@
Mon May 25 03:28:16 PDT 2020
Mon May 25 03:33:05 PDT 2020