Skip to content

CI

CI #283

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/**'
jobs:
build:
if: github.repository_owner == 'spring-cloud'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# cache maven repo
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
# jdk8
- uses: actions/setup-java@v1
with:
java-version: 1.8
# maven version
- uses: jvalkeal/setup-maven@v1
with:
maven-version: 3.6.2
# jfrog cli
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: 'https://repo.spring.io'
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
# setup frog cli
- name: Configure JFrog Cli
run: |
jfrog rt mvnc \
--server-id-resolve=${{ vars.JF_SERVER_ID }} \
--server-id-deploy=${{ vars.JF_SERVER_ID }} \
--repo-resolve-releases=libs-milestone \
--repo-resolve-snapshots=libs-snapshot \
--repo-deploy-releases=libs-release-local \
--repo-deploy-snapshots=libs-snapshot-local
echo JFROG_CLI_BUILD_NAME=spring-cloud-dataflow-ui-3-4-x >> $GITHUB_ENV
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
# build and publish
- name: Build and Publish
run: |
jfrog rt mvn -U -B clean install
jfrog rt build-publish
# clean m2 cache
- name: Clean cache
run: |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr