-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
version: v1.0 | ||
name: build | ||
jobs: | ||
- job: all-binary | ||
steps: | ||
- checkout: '{{.cds.workspace}}/go/src/github.com/richardlt/matrix' | ||
- script: | ||
- export GO111MODULE=on | ||
- export GOPROXY=https://gocenter.io | ||
- export EXT_GOPATH={{.cds.workspace}}/go | ||
- export OUT=matrix | ||
- export FLAG_V='false' | ||
- export TARGETS='linux/arm-7 linux/amd64 darwin/amd64 windows/amd64' | ||
- cd {{.cds.workspace}}/go/src/github.com/richardlt/matrix | ||
- /build.sh . | ||
- artifactUpload: | ||
path: /build/matrix-* | ||
tag: '{{.cds.version}}' | ||
requirements: | ||
- binary: git | ||
- model: xgo-1.12 | ||
- job: all-binary-test | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- script: | ||
- go get -u github.com/jstemmer/go-junit-report | ||
- export GO111MODULE=on | ||
- export GOPROXY=https://gocenter.io | ||
- make test-with-report | ||
- jUnitReport: report.xml | ||
requirements: | ||
- binary: git | ||
- model: go-1.12 | ||
- job: emulator-ui | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- script: | ||
- (cd emulator && make install) | ||
- (cd emulator && make build) | ||
- apt-get update && apt-get install -y zip | ||
- zip -r emulator-ui.zip emulator/client/public | ||
- artifactUpload: | ||
path: '{{.cds.workspace}}/emulator-ui.zip' | ||
tag: '{{.cds.version}}' | ||
requirements: | ||
- binary: git | ||
- model: node-10.15 | ||
- job: gamepad-ui | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- script: | ||
- (cd gamepad && make install) | ||
- (cd gamepad && make build) | ||
- apt-get update && apt-get install -y zip | ||
- zip -r gamepad-ui.zip gamepad/build/default | ||
- artifactUpload: | ||
path: '{{.cds.workspace}}/gamepad-ui.zip' | ||
tag: '{{.cds.version}}' | ||
requirements: | ||
- binary: git | ||
- model: node-10.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1.0 | ||
name: matrix | ||
vcs_server: github | ||
repo: richardlt/matrix | ||
keys: | ||
app-matrix-git: | ||
type: ssh | ||
value: b8bf25fa2e854c0e94873162c5d418b5 | ||
vcs_connection_type: ssh | ||
vcs_ssh_key: app-matrix-git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: matrix | ||
version: v1.0 | ||
workflow: | ||
build: | ||
pipeline: build | ||
application: matrix | ||
deploy: | ||
depends_on: | ||
- package | ||
when: | ||
- success | ||
- manual | ||
pipeline: deploy | ||
application: matrix | ||
package: | ||
depends_on: | ||
- build | ||
when: | ||
- success | ||
pipeline: package | ||
application: matrix | ||
release: | ||
depends_on: | ||
- package | ||
conditions: | ||
check: | ||
- variable: git.branch | ||
operator: eq | ||
value: master | ||
- variable: git.repository | ||
operator: eq | ||
value: richardlt/matrix | ||
when: | ||
- success | ||
- manual | ||
pipeline: release | ||
application: matrix | ||
metadata: | ||
default_tags: git.branch,git.author,git.hash | ||
history_length: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
version: v1.0 | ||
name: package | ||
stages: | ||
- zip | ||
- deb | ||
jobs: | ||
- job: zip | ||
stage: zip | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- artifactDownload: | ||
path: '{{.cds.workspace}}' | ||
tag: '{{.cds.version}}' | ||
- script: | ||
- unzip emulator-ui.zip | ||
- unzip gamepad-ui.zip | ||
- mkdir -p build | ||
- cp matrix-linux* build/ | ||
- cp matrix-darwin* build/ | ||
- cp matrix-windows* build/ | ||
- make package | ||
- artifactUpload: | ||
path: '{{.cds.workspace}}/matrix.zip' | ||
tag: '{{.cds.version}}' | ||
requirements: | ||
- binary: git | ||
- binary: make | ||
- binary: unzip | ||
- binary: zip | ||
- job: deb | ||
stage: deb | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- artifactDownload: | ||
path: '{{.cds.workspace}}' | ||
pattern: matrix.zip | ||
tag: '{{.cds.version}}' | ||
- script: | ||
- unzip matrix.zip | ||
- debpacker make | ||
- artifactUpload: | ||
path: '{{.cds.workspace}}/target/matrix.deb' | ||
tag: '{{.cds.version}}' | ||
requirements: | ||
- model: debpacker-0.0.1 | ||
- binary: git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: v1.0 | ||
name: release | ||
parameters: | ||
tagLevel: | ||
type: list | ||
default: major;minor;patch | ||
jobs: | ||
- job: release | ||
steps: | ||
- checkout: '{{.cds.workspace}}' | ||
- gitTag: | ||
path: '{{.cds.workspace}}' | ||
tagLevel: '{{.cds.pip.tagLevel}}' | ||
tagMessage: Matrix release | ||
- artifactDownload: | ||
path: '{{.cds.workspace}}' | ||
pattern: matrix.deb|matrix.zip | ||
tag: '{{.cds.version}}' | ||
- script: | ||
- TAG=`git describe --abbrev=0 --tags` | ||
- worker export tag $TAG | ||
- release: | ||
artifacts: matrix.deb,matrix.zip | ||
releaseNote: Matrix release {{.cds.build.tag}} | ||
tag: '{{.cds.build.tag}}' | ||
title: '{{.cds.build.tag}}' | ||
requirements: | ||
- binary: git | ||
- binary: gpg |