diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 618bf5d6..e7ba7782 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,9 @@ on: action: required: true type: string + travis_tag: + required: true + type: string secrets: MAVEN_SIGNING_KEY_BASE64: required: true @@ -34,4 +37,4 @@ jobs: MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - run: ./gradlew ${{ inputs.action }} + run: TRAVIS_TAG=${{ inputs.travis_tag }} ./gradlew ${{ inputs.action }} diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index 35fb7859..c54149ed 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -9,6 +9,8 @@ on: secrets: CI_USER_TOKEN: required: true + TRAVIS_COM_TOKEN: + required: true jobs: test: runs-on: ubuntu-latest @@ -17,8 +19,8 @@ jobs: with: # You should create a personal access token and store it in your repository token: ${{ secrets.CI_USER_TOKEN }} - repository: 'optimizely/ci-helper-tools' - path: 'home/runner/ci-helper-tools' + repository: 'optimizely/travisci-tools' + path: 'home/runner/travisci-tools' ref: 'master' - name: set SDK Branch if PR env: @@ -26,12 +28,14 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: | echo "SDK_BRANCH=$HEAD_REF" >> $GITHUB_ENV + echo "TRAVIS_BRANCH=$HEAD_REF" >> $GITHUB_ENV - name: set SDK Branch if not pull request env: REF_NAME: ${{ github.ref_name }} if: ${{ github.event_name != 'pull_request' }} run: | echo "SDK_BRANCH=$REF_NAME" >> $GITHUB_ENV + echo "TRAVIS_BRANCH=$REF_NAME" >> $GITHUB_ENV - name: Trigger build env: SDK: java @@ -41,13 +45,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }} EVENT_TYPE: ${{ github.event_name }} GITHUB_CONTEXT: ${{ toJson(github) }} + #REPO_SLUG: ${{ github.repository }} PULL_REQUEST_SLUG: ${{ github.repository }} UPSTREAM_REPO: ${{ github.repository }} PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} UPSTREAM_SHA: ${{ github.sha }} + TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} EVENT_MESSAGE: ${{ github.event.message }} HOME: 'home/runner' run: | echo "$GITHUB_CONTEXT" - home/runner/ci-helper-tools/trigger-script-with-status-update.sh + home/runner/travisci-tools/trigger-script-with-status-update.sh diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 311686c2..554eddaf 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -31,17 +31,19 @@ jobs: integration_tests: if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} - uses: optimizely/java-sdk/.github/workflows/integration_test.yml@master + uses: optimizely/java-sdk/.github/workflows/integration_test.yml@mnoman/fsc-gitaction-test secrets: CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} fullstack_production_suite: if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} - uses: optimizely/java-sdk/.github/workflows/integration_test.yml@master + uses: optimizely/java-sdk/.github/workflows/integration_test.yml@mnoman/fsc-gitaction-test with: FULLSTACK_TEST_REPO: ProdTesting secrets: CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} test: if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} @@ -92,7 +94,7 @@ jobs: publish: if: startsWith(github.ref, 'refs/tags/') - uses: optimizely/java-sdk/.github/workflows/build.yml@master + uses: optimizely/java-sdk/.github/workflows/build.yml@revert-558-muzahid/remove-travis-doc with: action: ship travis_tag: ${GITHUB_REF#refs/*/} @@ -104,7 +106,7 @@ jobs: snapshot: if: ${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }} - uses: optimizely/java-sdk/.github/workflows/build.yml@master + uses: optimizely/java-sdk/.github/workflows/build.yml@revert-558-muzahid/remove-travis-doc with: action: ship travis_tag: BB-SNAPSHOT diff --git a/README.md b/README.md index 1f97786a..dbc7ecb3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Optimizely Java SDK +[![Build Status](https://travis-ci.org/optimizely/java-sdk.svg?branch=master)](https://travis-ci.org/optimizely/java-sdk) [![Apache 2.0](https://img.shields.io/badge/license-APACHE%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) This repository houses the Java SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy). @@ -174,4 +175,4 @@ License (Apache 2.0): [https://github.com/apache/httpcomponents-client/blob/mast - Ruby - https://github.com/optimizely/ruby-sdk -- Swift - https://github.com/optimizely/swift-sdk +- Swift - https://github.com/optimizely/swift-sdk \ No newline at end of file