<commit_before>name: Milestone Worker

on:
  workflow_dispatch:
    inputs:
      build-zoo-handler:
        description: 'Build Zoo Handler Payload'
        required: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - uses: jvalkeal/setup-maven@v1
      with:
        maven-version: 3.6.3
    - uses: jfrog/setup-jfrog-cli@v1
      with:
        version: 1.46.4
      env:
        JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

    # target deploy repos
    - name: Configure JFrog Cli
      run: |
        jfrog rt mvnc \
          --server-id-deploy=repo.spring.io \
          --repo-deploy-releases=libs-staging-local \
          --repo-deploy-snapshots=libs-staging-local
        echo JFROG_CLI_BUILD_NAME=spring-cloud-deployer-cloudfoundry-main-milestone >> $GITHUB_ENV
        echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV

    # zoo extract and ensure
    - name: Extract Zoo Context Properties
      uses: jvalkeal/build-zoo-handler@v0.0.4
      with:
        dispatch-handler-extract-context-properties: true
        ensure-env: |
          BUILD_ZOO_HANDLER_milestone_version
          BUILD_ZOO_HANDLER_spring_cloud_dataflow_build_version
          BUILD_ZOO_HANDLER_spring_cloud_deployer_build_version

    # build and publish to configured target
    - name: Build and Publish
      run: |
        jfrog rt mvn build-helper:parse-version versions:set \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DprocessAllModules=true \
          -DgenerateBackupPoms=false \
          -Dartifactory.publish.artifacts=false \
          -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-'${BUILD_ZOO_HANDLER_milestone_version}
        jfrog rt mvn versions:update-parent \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DgenerateBackupPoms=false \
          -DparentVersion='['${BUILD_ZOO_HANDLER_spring_cloud_deployer_build_version}']'
        jfrog rt mvn versions:set-property \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DgenerateBackupPoms=false \
          -Dproperty=spring-cloud-deployer.version \
          -DnewVersion=${BUILD_ZOO_HANDLER_spring_cloud_deployer_build_version}
        jfrog rt build-clean
        jfrog rt mvn clean install \
          -gs .github/settings.xml \
          -P-spring,stagingmilestone \
          -DskipTests -U -B
        jfrog rt build-publish
        echo BUILD_ZOO_HANDLER_spring_cloud_deployer_cloudfoundry_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV<commit_msg>Make workflow less verbose<commit_after>name: Milestone Worker

on:
  workflow_dispatch:
    inputs:
      build-zoo-handler:
        description: 'Build Zoo Handler Payload'
        required: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2
    - uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - uses: jvalkeal/setup-maven@v1
      with:
        maven-version: 3.6.3
    - uses: jfrog/setup-jfrog-cli@v1
      with:
        version: 1.46.4
      env:
        JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

    # target deploy repos
    - name: Configure JFrog Cli
      run: |
        jfrog rt mvnc \
          --server-id-deploy=repo.spring.io \
          --repo-deploy-releases=libs-staging-local \
          --repo-deploy-snapshots=libs-staging-local
        echo JFROG_CLI_BUILD_NAME=spring-cloud-deployer-cloudfoundry-main-milestone >> $GITHUB_ENV
        echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV

    # zoo extract and ensure
    - name: Extract Zoo Context Properties
      uses: jvalkeal/build-zoo-handler@v0.0.4
      with:
        dispatch-handler-extract-context-properties: true
        ensure-env: |
          BUILD_ZOO_HANDLER_milestone_version
          BUILD_ZOO_HANDLER_spring_cloud_dataflow_build_version
          BUILD_ZOO_HANDLER_spring_cloud_deployer_version

    # build and publish to configured target
    - name: Build and Publish
      run: |
        jfrog rt mvn build-helper:parse-version versions:set \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DprocessAllModules=true \
          -DgenerateBackupPoms=false \
          -Dartifactory.publish.artifacts=false \
          -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}-'${BUILD_ZOO_HANDLER_milestone_version} \
          -B
        jfrog rt mvn versions:update-parent \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DgenerateBackupPoms=false \
          -DparentVersion='['${BUILD_ZOO_HANDLER_spring_cloud_deployer_version}']' \
          -B
        jfrog rt mvn versions:set-property \
          -gs .github/settings.xml \
          -Pstagingmilestone \
          -DgenerateBackupPoms=false \
          -Dproperty=spring-cloud-deployer.version \
          -DnewVersion=${BUILD_ZOO_HANDLER_spring_cloud_deployer_version} \
          -B
        jfrog rt build-clean
        jfrog rt mvn clean install \
          -gs .github/settings.xml \
          -P-spring,stagingmilestone \
          -DskipTests -U -B
        jfrog rt build-publish
        echo BUILD_ZOO_HANDLER_spring_cloud_deployer_cloudfoundry_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
{'fraction_non_alphanumeric': 0.09048473967684022, 'fraction_numerical': 0.005745062836624776, 'mean_word_length': 2.3200238379022644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4136886', 'n_tokens_mistral': 1893, 'n_tokens_neox': 1812, 'n_words': 291}