sysmon/bitbucket-pipelines.yml

23 lines
1.3 KiB
YAML
Raw Permalink Normal View History

image: openjdk:8
pipelines:
branches:
master:
- step:
caches:
- gradle
name: Build and Test
script:
- ./gradlew clean build
tags: # add the 'tags' section
v*: # specify the tag
- step: # define the build pipeline for the tag
caches:
- gradle
name: Build and Release
script:
- ./gradlew clean packages
- shopt -s nullglob ; for file in ${BITBUCKET_CLONE_DIR}/server/build/distributions/*.{deb,rpm} ; do curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${file}" ; done
- shopt -s nullglob ; for file in ${BITBUCKET_CLONE_DIR}/plugins/build/distributions/*.{deb,rpm} ; do curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${file}" ; done
- shopt -s nullglob ; for file in ${BITBUCKET_CLONE_DIR}/client/build/distributions/*.{deb,rpm} ; do curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${file}" ; done