Skip to content

Update drone to notify arduino-create #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .drone.sec
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.js55JcNOTOEYUK7TvkYbNUbvZvoKkze6nB0ql2b3ZWkMn6LGRdlfo3e7ktMiRf8e9RAffm86SQSEMorTw78h8iFmub7JI0Z8Xwm1A960SmkW-ULLrzE0uT6il7_pYzjOAxboUiH0ToCElvsTYEUBicc7p4a3gIhgZAezd1w52JIYxzbFQ0ca0fws3KH3H4iR6-N0d7Cc5xEXFIzHgH_OhJUXYiaCW-g5GLgbPQPu29Ofv3-_sZzXTJj4VSjvgRNzkudJieM5KjN_5L9KU6wSJyGECVsTd-kaM0yOesl9NbWq-6SMORIK43kBEgu679OWuMzJ6HbbW6Bk5I8XQASp0w.FvNQmCS3b0mq8MGN.uS9nMU1WjTWxIvkOr41zAGp6OY7MzxWQ2KteBaRm9hE3XDSWvOAwVO7i6BJOQNUX--SMCBs6tdhYyaC-x7PSGze0Ki33LU7pPc-yBhbLUdzGrxYLm1JF_IQ5QlVK2YRk5nFRSIimzylsPEkGHCd-nQciHC_m0Wetzldb-d49MNw6wZFsby8MQKVQJoWUVXM7LM-jZ5tmAmzxV1S0Py6LqUT7AAGL2RNax22YsNaOY214KTiSnIrT8eo3zmvzi28CdsapOIYxCFP8Z_JUAkjYAuow5ysxFkVvEGxr9d-W8TCyL36Sa4GgfEVvtzpcKpVmhzMllIXiXVh8ZdLJ_EuWomNSV_9veIy_ULmKo8B8tB6Uv2nlnFqGAxaf5DNYcqqQj4isHpEWFSR0ZIGU5ksoH_bY0pzQsf3wwii3KlzOJg.7WbHe_TOAdzgMW16sBvzIg
eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.pr9ZMRbPGFZ6rTQOAmHQJN4RRE8Hmnl6Sn6ek2DogiLA6qIZCCei6RHLppto2tpM1ApM5pLpW64TjGf_mCLIesk_GtnUF6baxrHodcI8EB3VV3CsXU3EJF3_FOk3uSJUOi7hbtn54ztMBL2QKeccUiO-KBC2BHiD8VVpjnY5C-TLYV-1Td2fUZc3QB4eoqeTlvglu0nSvHHGCL89RQU0ZEW_-h_tXXaDrvXS648g-U2B9uwnVgBgBPhQqOzP02cW2-ojgkAC7xNpO_BOWoYouT56kkeM5MEx1XyJ-tAdP0AU8mG3x6mRBbng2nwTiXt9RqIJ01RKysMdgth17SZQ8A.apeQnLTu98uqD1Xl.se-xrnl2-B63chHdq719TO98hjxVIN6qTkCnTv5y__LM7ku-FBmlUnZLKy6jDZfO3Fz0jUNwSxuU2LGJWuJ5-PEQkqhsjJuDNBbrAKbt9oqFpXUKXOyu5yw8f64GHgG0bmlrZS6X04P4JAx6t9pXE0rKV5yktoYLLcTgoHnWm3C8eX7H1ayewDJ_CD2ricdZ5J-YAe4sz1AR2mRPRiyx-LTheTc2sALqZv39_ctOI9weNIGy013Jc_6MchmERmT2c4QKlIhy2ra9CPZsOgyn6d008qse14Q32IP97VJ3KLCq69P7u3y28KGz6btjfurLFP1EuipKhWxpIsE4YWQcf_l-eXxpd-l2SUPFMMNBI6aXItKpPofgjMAPeJzlIkhkXCtfRRWIgDaHlS_eAk0nWaXSQyUljUnR7qaVyCqh.FAYZK3PkD_9u3cXwsD8WSw
71 changes: 47 additions & 24 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
build:
image: arduino/golang-linux-32
commands:
- apt-get update && apt-get install libgtk-3-dev libappindicator3-dev
- GOOS=linux GOARCH=386 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-386/arduino-create-agent
- cp config.ini artifacts/linux-386
build:
image: arduino/golang-cross
auth_config:
username: $$DOCKER_USERNAME
password: $$DOCKER_PASSWORD
email: $$DOCKER_EMAIL
commands:
- apt-get update && apt-get install libgtk-3-dev libappindicator3-dev zip
# Linux amd64
- GOOS=linux GOARCH=amd64 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-amd64/arduino-create-agent
- cp config.ini artifacts/linux-amd64
# Darwin amd64
- GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang CGO_ENABLED=1 go build -o artifacts/osx/arduino-create-agent
- cp config.ini artifacts/osx
# Windows 386
- GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-gcc CGO_ENABLED=1 go build -o artifacts/windows/arduino-create-agent.exe -ldflags -H=windowsgui
- cp config.ini artifacts/windows
- zip -r arduino-create-agent.zip artifacts/*
crosscompilation:
image: arduino/golang-cross
auth_config:
username: $$DOCKER_USERNAME
password: $$DOCKER_PASSWORD
email: $$DOCKER_EMAIL
commands:
- go get github.com/kardianos/govendor
- govendor vet +local
- govendor test +local
# Linux amd64
- GOOS=linux GOARCH=amd64 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-amd64/arduino-create-agent
- cp config.ini artifacts/linux-amd64
# Darwin amd64
- GOOS=darwin GOARCH=amd64 CC=o64-clang CXX=o64-clang CGO_ENABLED=1 go build -o artifacts/osx/arduino-create-agent
- cp config.ini artifacts/osx
# Windows 386
- GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-gcc CGO_ENABLED=1 go build -o artifacts/windows/arduino-create-agent.exe -ldflags -H=windowsgui
- cp config.ini artifacts/windows
- zip -r arduino-create-agent.zip artifacts/*
linux32:
image: arduino/golang-linux-32
commands:
- GOOS=linux GOARCH=386 CC=gcc CXX=gcc CGO_ENABLED=1 go build -o artifacts/linux-386/arduino-create-agent
- cp config.ini artifacts/linux-386
notify:
slack:
webhook_url: $$SLACK_WEBHOOK
channel: $$SLACK_CHANNEL
username: drone
when:
event: pull_request
template: |
{{#success build.status}}
[{{ repo.name}}] Congrats {{ build.author }}! Your PR works: {{ build.link_url}}
{{else}}
[{{ repo.name}}] Damn {{ build.author }}! Something went wrong with your PR: {{ build.link_url}}
{{/success}}
publish:
github_release:
api_key: $$GITHUB_API_KEY
Expand All @@ -35,4 +45,17 @@ publish:
checksum:
- md5
when:
branch: [master, devel, test]
event: tag
notify:
slack:
webhook_url: $$SLACK_WEBHOOK
channel: $$SLACK_CHANNEL
username: drone
when:
event: tag
template: |
{{#success build.status}}
[{{ repo.name}}/{{ build.branch }}] A new release is available: {{ build.link_url}}
{{else}}
[{{ repo.name}}/{{ build.branch }}] Something went wrong while building a new release: {{ build.link_url}}
{{/success}}