Skip to content

Commit

Permalink
Automate github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
cammellos committed Nov 2, 2018
1 parent 0961e10 commit bd4cebf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,18 @@ xgo:
install-os-dependencies:
_assets/scripts/install_deps.sh

setup: install-os-dependencies dep-install lint-install mock-install gen-install update-fleet-config ##@other Prepare project for first build
setup: install-os-dependencies dep-install lint-install mock-install deploy-install gen-install update-fleet-config ##@other Prepare project for first build

generate: ##@other Regenerate assets and other auto-generated stuff
go generate ./static ./static/migrations
$(shell cd ./services/shhext/chat && exec protoc --go_out=. ./*.proto)

deploy-install:
go get -u github.com/c4milo/github-release

deploy:
github-release status-im/status-go $(release_tag) $(release_branch) "" "$(release_directory)"

gen-install:
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/golang/protobuf/protoc-gen-go
Expand Down
24 changes: 1 addition & 23 deletions _assets/ci/Jenkinsfile-manual
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ node('linux') {
stage('Test') {
dir(cloneDir) {
sh 'make setup'
sh 'make ci'
}
}

Expand All @@ -71,32 +70,11 @@ node('linux') {

stage('Deploy') {
dir(cloneDir) {
// For branch builds, replace the old artifact. For develop keep all of them.
def version = sh(
script: "git describe --exact-match --tag 2>/dev/null || git describe --always",
returnStdout: true
).trim()
def server = Artifactory.server 'artifacts'
def uploadSpec = """{
"files": [
{
"pattern": "build/bin/statusgo-android-16.aar",
"target": "libs-release-local/status-im/status-go/${version}/status-go-${version}.aar"
},
{
"pattern": "build/bin/statusgo-ios-9.3-framework/status-go-ios.zip",
"target": "libs-release-local/status-im/status-go-ios-simulator/${version}/status-go-ios-simulator-${version}.zip"
}
]
}"""

def buildInfo = Artifactory.newBuildInfo()
buildInfo.env.capture = false
buildInfo.name = 'status-go (' + gitBranch + '-' + gitShortSHA + ')'
server.upload(uploadSpec, buildInfo)
server.publishBuildInfo(buildInfo)

slackSend color: 'good', message: 'status-go `' + version + '` was built successfully. ' + env.BUILD_URL
sh "env GITHUB_TOKEN=${env.GIT_PASS} make deploy release_tag=${version} release_branch=${gitBranch} release_directory=\"build/bin/*\""
}
}
}

0 comments on commit bd4cebf

Please sign in to comment.