1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

Add publishing of master binary to latest release (#972)

* Add publishing of master binary to latest release
* Update travis.yml
This commit is contained in:
Oliver Nocon
2019-11-12 16:34:05 +01:00
committed by GitHub
parent 3a0a3405ba
commit a822c2026e
3 changed files with 19 additions and 3 deletions

4
.pipeline/config.yml Normal file
View File

@@ -0,0 +1,4 @@
steps:
githubPublishRelease:
owner: SAP
repository: jenkins-library

View File

@@ -22,13 +22,26 @@ cache:
jobs:
include:
- stage: Tests
name: Unit Tests
name: Golang Build
if: type = pull_request
script:
- docker build -t piper:${TRAVIS_BRANCH} .
- name: Golang Build & Publish
if: type != pull_request && repo = "SAP/jenkins-library" && branch = "master"
script:
- docker build -t piper:${TRAVIS_BRANCH} .
- docker create --name piper_${TRAVIS_BRANCH} piper:${TRAVIS_BRANCH}
- docker cp piper_${TRAVIS_BRANCH}:/build/piper .
- docker rm piper_${TRAVIS_BRANCH}
- cp ./piper ./piper_master
- chmod +x ./piper
- ./piper githubPublishRelease --token ${GITHUB_TOKEN} --version latest --updateAsset --assetPath ./piper_master
- name: Groovy Unit Tests
before_script:
- curl -L --output cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- docker build -t piper:latest .
- mvn package --batch-mode
after_script:
- JACOCO_SOURCE_PATH="src vars test" ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco

View File

@@ -7,7 +7,6 @@ RUN go test ./... -cover
## ONLY tests so far, building to be added later
# execute build
# RUN go build -o piper
RUN export GIT_COMMIT=$(git rev-parse HEAD) && \
export GIT_REPOSITORY=$(git config --get remote.origin.url) && \
go build \