New tuto 3 done
This commit is contained in:
parent
5f4880dc50
commit
ba77aca73b
57 changed files with 1026 additions and 137 deletions
50
tutorial/devops/drone-youp0m.yml
Normal file
50
tutorial/devops/drone-youp0m.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: code-analysis
|
||||
image: aosapps/drone-sonar-plugin
|
||||
settings:
|
||||
sonar_host: http://sonarqube:9000
|
||||
sonar_token:
|
||||
from_secret: sonar_token
|
||||
|
||||
- name: build-amd64
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add git go-bindata
|
||||
- go generate -v
|
||||
- go get -v -d
|
||||
- go build -v -o youp0m-linux-amd64
|
||||
environment:
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
|
||||
- name: build-arm64
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -o youp0m-linux-arm64
|
||||
environment:
|
||||
GOOS: linux
|
||||
GOARCH: arm64
|
||||
|
||||
- name: gitea_release
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
base_url: http://gitea:3000
|
||||
files: youp0m-*
|
||||
title: ${DRONE_TAG}
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: publish docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: registry:5000/youp0m
|
||||
registry: registry:5000
|
||||
insecure: true
|
||||
auto_tag: true
|
||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
Loading…
Add table
Add a link
Reference in a new issue