Refactore drone-plugins to JonasFranzDEV

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-03-02 23:21:25 +01:00
parent a68b10861f
commit 5dc2f523f3
No known key found for this signature in database
GPG Key ID: 506AEEBE80BEDECD
7 changed files with 34 additions and 117 deletions

View File

@ -1,6 +1,6 @@
workspace: workspace:
base: /go base: /go
path: src/github.com/drone-plugins/drone-github-release path: src/github.com/JonasFranzDEV/drone-gitea-release
pipeline: pipeline:
test: test:
@ -19,7 +19,7 @@ pipeline:
- GOARCH=amd64 - GOARCH=amd64
- CGO_ENABLED=0 - CGO_ENABLED=0
commands: commands:
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-github-release - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/amd64/drone-gitea-release
build_linux_arm64: build_linux_arm64:
image: golang:1.9 image: golang:1.9
@ -30,7 +30,7 @@ pipeline:
- GOARCH=arm64 - GOARCH=arm64
- CGO_ENABLED=0 - CGO_ENABLED=0
commands: commands:
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-github-release - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm64/drone-gitea-release
build_linux_arm: build_linux_arm:
image: golang:1.9 image: golang:1.9
@ -42,7 +42,7 @@ pipeline:
- CGO_ENABLED=0 - CGO_ENABLED=0
- GOARM=7 - GOARM=7
commands: commands:
- go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-github-release - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-gitea-release
# build_windows_amd64: # build_windows_amd64:
# image: golang:1.9-nanoserver # image: golang:1.9-nanoserver
@ -53,56 +53,4 @@ pipeline:
# - GOARCH=amd64 # - GOARCH=amd64
# - CGO_ENABLED=0 # - CGO_ENABLED=0
# commands: # commands:
# - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-github-release # - go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-gitea-release
publish_linux_amd64:
image: plugins/docker:17.05
pull: true
repo: plugins/github-release
tags: [ latest, 1.0.0, 1.0, 1 ]
secrets: [ docker_username, docker_password ]
when:
branch: master
event: push
publish_linux_arm64:
image: plugins/docker:17.05
pull: true
repo: plugins/github-release
tags: [ linux-arm64 ]
secrets: [ docker_username, docker_password ]
dockerfile: Dockerfile.arm64
when:
branch: master
event: push
publish_linux_arm:
image: plugins/docker:17.05
pull: true
repo: plugins/github-release
tags: [ linux-arm ]
secrets: [ docker_username, docker_password ]
dockerfile: Dockerfile.arm
when:
branch: master
event: push
# publish_windows_amd64:
# image: plugins/docker:17.05
# pull: true
# repo: plugins/github-release
# tags: [ windows-amd64 ]
# secrets: [ docker_username, docker_password ]
# dockerfile: Dockerfile.windows
# when:
# branch: master
# event: push
microbadger:
image: plugins/webhook:1
pull: true
secrets: [ webhook_url ]
when:
branch: master
event: push
status: [ success ]

View File

@ -1,11 +1,11 @@
FROM plugins/base:multiarch FROM plugins/base:multiarch
MAINTAINER Drone.IO Community <drone-dev@googlegroups.com> MAINTAINER Jonas Franz <info@jonasfranz.software>
LABEL org.label-schema.version=latest LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/drone-plugins/drone-github-release.git" LABEL org.label-schema.vcs-url="https://github.com/JonasFranzDEV/drone-gitea-release.git"
LABEL org.label-schema.name="Drone GitHub Release" LABEL org.label-schema.name="Drone Gitea Release"
LABEL org.label-schema.vendor="Drone.IO Community" LABEL org.label-schema.vendor="Jonas Franz"
LABEL org.label-schema.schema-version="1.0" LABEL org.label-schema.schema-version="1.0"
ADD release/linux/amd64/drone-github-release /bin/ ADD release/linux/amd64/drone-gitea-release /bin/
ENTRYPOINT [ "/bin/drone-github-release" ] ENTRYPOINT [ "/bin/drone-gitea-release" ]

View File

@ -1,11 +1,11 @@
FROM plugins/base:multiarch FROM plugins/base:multiarch
MAINTAINER Drone.IO Community <drone-dev@googlegroups.com> MAINTAINER Jonas Franz <info@jonasfranz.software>
LABEL org.label-schema.version=latest LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/drone-plugins/drone-github-release.git" LABEL org.label-schema.vcs-url="https://gitea.com/JonasFranzDEV/drone-gitea-release.git"
LABEL org.label-schema.name="Drone GitHub Release" LABEL org.label-schema.name="Drone Gitea Release"
LABEL org.label-schema.vendor="Drone.IO Community" LABEL org.label-schema.vendor="Jonas Franz"
LABEL org.label-schema.schema-version="1.0" LABEL org.label-schema.schema-version="1.0"
ADD release/linux/arm/drone-github-release /bin/ ADD release/linux/arm/drone-gitea-release /bin/
ENTRYPOINT [ "/bin/drone-github-release" ] ENTRYPOINT [ "/bin/drone-gitea-release" ]

View File

@ -1,11 +1,11 @@
FROM plugins/base:multiarch FROM plugins/base:multiarch
MAINTAINER Drone.IO Community <drone-dev@googlegroups.com> MAINTAINER Jonas Franz <info@jonasfranz.software>
LABEL org.label-schema.version=latest LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/drone-plugins/drone-github-release.git" LABEL org.label-schema.vcs-url="https://github.com/JonasFranzDEV/drone-gitea-release.git"
LABEL org.label-schema.name="Drone GitHub Release" LABEL org.label-schema.name="Drone Gitea Release"
LABEL org.label-schema.vendor="Drone.IO Community" LABEL org.label-schema.vendor="Jonas Franz"
LABEL org.label-schema.schema-version="1.0" LABEL org.label-schema.schema-version="1.0"
ADD release/linux/arm64/drone-github-release /bin/ ADD release/linux/arm64/drone-gitea-release /bin/
ENTRYPOINT [ "/bin/drone-github-release" ] ENTRYPOINT [ "/bin/drone-gitea-release" ]

View File

@ -1,11 +1,11 @@
FROM microsoft/nanoserver:latest FROM microsoft/nanoserver:latest
MAINTAINER Drone.IO Community <drone-dev@googlegroups.com> MAINTAINER Jonas Franz <info@jonasfranz.software>
LABEL org.label-schema.version=latest LABEL org.label-schema.version=latest
LABEL org.label-schema.vcs-url="https://github.com/drone-plugins/drone-github-release.git" LABEL org.label-schema.vcs-url="https://github.com/JonasFranzDEV/drone-gitea-release.git"
LABEL org.label-schema.name="Drone GitHub Release" LABEL org.label-schema.name="Drone Gitea Release"
LABEL org.label-schema.vendor="Drone.IO Community" LABEL org.label-schema.vendor="Jonas Franz"
LABEL org.label-schema.schema-version="1.0" LABEL org.label-schema.schema-version="1.0"
ADD release/windows/amd64/drone-github-release /bin/ ADD release/windows/amd64/drone-gitea-release /bin/
ENTRYPOINT [ "/bin/drone-github-release" ] ENTRYPOINT [ "/bin/drone-gitea-release" ]

View File

@ -1,12 +1,7 @@
# drone-github-release # drone-gitea-release
This project is "work in progress" and **not** ready for production use.
[![Build Status](http://beta.drone.io/api/badges/drone-plugins/drone-github-release/status.svg)](http://beta.drone.io/drone-plugins/drone-github-release) Drone plugin to publish files and artifacts to Gitea Release.
[![Join the chat at https://gitter.im/drone/drone](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/drone/drone)
[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-github-release?status.svg)](http://godoc.org/github.com/drone-plugins/drone-github-release)
[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-github-release)](https://goreportcard.com/report/github.com/drone-plugins/drone-github-release)
[![](https://images.microbadger.com/badges/image/plugins/github-release.svg)](https://microbadger.com/images/plugins/github-release "Get your own image badge on microbadger.com")
Drone plugin to publish files and artifacts to GitHub Release. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-github-release/).
## Build ## Build
@ -15,29 +10,3 @@ Build the binary with the following commands:
``` ```
go build go build
``` ```
## Docker
Build the Docker image with the following commands:
```
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -o release/linux/amd64/drone-github-release
docker build --rm -t plugins/github-release .
```
## Usage
Execute from the working directory:
```sh
docker run --rm \
-e DRONE_BUILD_EVENT=tag \
-e DRONE_REPO_OWNER=octocat \
-e DRONE_REPO_NAME=foo \
-e DRONE_COMMIT_REF=refs/heads/master \
-e PLUGIN_API_KEY=${HOME}/.ssh/id_rsa \
-e PLUGIN_FILES=master \
-v $(pwd):$(pwd) \
-w $(pwd) \
plugins/github-release
```

2
vendor/vendor.json vendored
View File

@ -99,5 +99,5 @@
"revisionTime": "2015-11-19T04:43:11Z" "revisionTime": "2015-11-19T04:43:11Z"
} }
], ],
"rootPath": "github.com/drone-plugins/drone-github-release" "rootPath": "github.com/JonasFranzDEV/drone-gitea-release"
} }