All checks were successful
continuous-integration/drone/push Build is passing
203 lines
5.2 KiB
YAML
203 lines
5.2 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: ci
|
|
|
|
trigger:
|
|
event:
|
|
- pull_request
|
|
- push
|
|
- tag
|
|
|
|
steps:
|
|
# - name: lint
|
|
# image: cache.coadcorp.com/library/golang:1.26
|
|
# environment:
|
|
# GOFLAGS: -mod=mod
|
|
# GOBIN: /usr/local/bin
|
|
# commands:
|
|
# - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8
|
|
# - golangci-lint version
|
|
# - golangci-lint run --timeout=5m
|
|
|
|
# - name: test
|
|
# image: cache.coadcorp.com/library/golang:1.26
|
|
# environment:
|
|
# GOFLAGS: -mod=mod
|
|
# commands:
|
|
# - go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
- name: build
|
|
image: cache.coadcorp.com/library/golang:1.26
|
|
environment:
|
|
GOFLAGS: -mod=mod
|
|
commands:
|
|
- CGO_ENABLED=0 go build -v ./cmd/invertergui
|
|
|
|
- name: build-linux-binaries
|
|
image: cache.coadcorp.com/library/golang:1.26
|
|
environment:
|
|
GOFLAGS: -mod=mod
|
|
commands:
|
|
- mkdir -p dist
|
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o dist/invertergui-linux-amd64 ./cmd/invertergui
|
|
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -v -o dist/invertergui-linux-arm64 ./cmd/invertergui
|
|
when:
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
- name: docker-build-validate
|
|
image: gcr.io/kaniko-project/executor:v1.24.0
|
|
commands:
|
|
- /kaniko/executor --context "${DRONE_WORKSPACE}" --dockerfile "${DRONE_WORKSPACE}/Dockerfile" --no-push --destination registry.coadcorp.com/nathan/invertergui:pr-${DRONE_BUILD_NUMBER}
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: docker-publish-commit-amd64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.amd64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "${DRONE_COMMIT_SHA}-linux-amd64"
|
|
when:
|
|
event:
|
|
- push
|
|
|
|
- name: docker-publish-commit-arm64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.arm64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "${DRONE_COMMIT_SHA}-linux-arm64"
|
|
when:
|
|
event:
|
|
- push
|
|
|
|
- name: docker-manifest-commit
|
|
image: plugins/manifest
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
target: "registry.coadcorp.com/nathan/invertergui:${DRONE_COMMIT_SHA}"
|
|
template: "registry.coadcorp.com/nathan/invertergui:${DRONE_COMMIT_SHA}-OS-ARCH"
|
|
platforms:
|
|
- "linux/amd64"
|
|
- "linux/arm64"
|
|
when:
|
|
event:
|
|
- push
|
|
|
|
- name: docker-publish-latest-amd64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.amd64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "latest-linux-amd64"
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
- master
|
|
|
|
- name: docker-publish-latest-arm64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.arm64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "latest-linux-arm64"
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
- master
|
|
|
|
- name: docker-manifest-latest
|
|
image: plugins/manifest
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
target: "registry.coadcorp.com/nathan/invertergui:latest"
|
|
template: "registry.coadcorp.com/nathan/invertergui:latest-OS-ARCH"
|
|
platforms:
|
|
- "linux/amd64"
|
|
- "linux/arm64"
|
|
when:
|
|
event:
|
|
- push
|
|
branch:
|
|
- main
|
|
- master
|
|
|
|
- name: docker-publish-release-amd64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.amd64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "${DRONE_TAG}-linux-amd64"
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: docker-publish-release-arm64
|
|
image: plugins/docker
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
repo: "registry.coadcorp.com/nathan/invertergui"
|
|
dockerfile: Dockerfile.publish.arm64
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
tags:
|
|
- "${DRONE_TAG}-linux-arm64"
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: docker-manifest-release
|
|
image: plugins/manifest
|
|
settings:
|
|
registry: registry.coadcorp.com
|
|
username: nathan
|
|
password:
|
|
from_secret: registry_password
|
|
target: "registry.coadcorp.com/nathan/invertergui:${DRONE_TAG}"
|
|
template: "registry.coadcorp.com/nathan/invertergui:${DRONE_TAG}-OS-ARCH"
|
|
platforms:
|
|
- "linux/amd64"
|
|
- "linux/arm64"
|
|
when:
|
|
event:
|
|
- tag
|