You've already forked sap-jenkins-library
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:
4
.pipeline/config.yml
Normal file
4
.pipeline/config.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
steps:
|
||||
githubPublishRelease:
|
||||
owner: SAP
|
||||
repository: jenkins-library
|
17
.travis.yml
17
.travis.yml
@@ -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
|
||||
|
@@ -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 \
|
||||
|
Reference in New Issue
Block a user