Files
go-away/.drone.yml
2025-04-07 21:28:48 +02:00

124 lines
2.6 KiB
YAML

---
kind: pipeline
type: docker
name: build-amd64-go1.22
platform:
os: linux
arch: amd64
environment:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: amd64
steps:
- name: build
image: golang:1.22-alpine3.20
commands:
- apk update
- apk add --no-cache git
- mkdir .bin
- go build -v -o ./.bin/go-away ./cmd/go-away
- go build -v -o ./.bin/test-wasm-runtime ./cmd/test-wasm-runtime
- name: test-wasm-success
image: golang:1.22-alpine3.20
depends_on:
- build
commands:
- >
./.bin/test-wasm-runtime -wasm ./embed/challenge/js-pow-sha256/runtime/runtime.wasm
-make-challenge ./embed/challenge/js-pow-sha256/test/make-challenge.json
-make-challenge-out ./embed/challenge/js-pow-sha256/test/make-challenge-out.json
-verify-challenge ./embed/challenge/js-pow-sha256/test/verify-challenge.json
-verify-challenge-out 0
- name: test-wasm-fail
image: golang:1.22-alpine3.20
depends_on:
- build
commands:
- >
./.bin/test-wasm-runtime -wasm ./embed/challenge/js-pow-sha256/runtime/runtime.wasm
-make-challenge ./embed/challenge/js-pow-sha256/test/make-challenge.json
-make-challenge-out ./embed/challenge/js-pow-sha256/test/make-challenge-out.json
-verify-challenge ./embed/challenge/js-pow-sha256/test/verify-challenge-fail.json
-verify-challenge-out 1
---
kind: pipeline
type: docker
name: build-amd64-go1.24
platform:
os: linux
arch: amd64
environment:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: amd64
steps:
- name: build
image: golang:1.24-alpine3.21
commands:
- apk update
- apk add --no-cache git
- go build -v ./cmd/go-away
---
kind: pipeline
type: docker
name: build-arm64-go1.24
platform:
os: linux
arch: arm64
environment:
CGO_ENABLED: "0"
GOOS: linux
GOARCH: arm64
steps:
- name: build
image: golang:1.24-alpine3.21
commands:
- apk update
- apk add --no-cache git
- go build -v ./cmd/go-away
---
kind: pipeline
type: docker
name: publish-docker
steps:
- name: docker
privileged: true
image: plugins/buildx
settings:
registry: git.gammaspectra.live
repo: git.gammaspectra.live/git/go-away
squash: true
compress: true
platform:
- linux/amd64
- linux/arm64
builder_driver: docker-container
auto_tag: true
username:
from_secret: git_username
password:
from_secret: git_password
trigger:
event:
- promote
target:
- production
---
kind: signature
hmac: cf87c046c0a84f6311cef12fcbfc10a2419b27f8d3319df69baad7f77bd7c77d
...