Skip to content

Commit

Permalink
Adding oidc integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzakaracic committed Nov 18, 2024
1 parent 84989c5 commit c776a4f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
13 changes: 10 additions & 3 deletions .github/actions/upload-to-jfrog/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ inputs:
description: ""
required: false
default: https://aerospike.jfrog.io/
jfrog-token:
oidc-provider:
description: ""
required: true
required: false
default: gh-aerospike-clients
oidc-audience:
description: ""
required: false
default: aerospike/clients

runs:
using: "composite"
Expand All @@ -27,7 +32,9 @@ runs:
uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: ${{ inputs.jfrog-platform-url }}
JF_ACCESS_TOKEN: ${{ inputs.jfrog-token }}
with:
oidc-provider-name: ${{ inputs.oidc-provider }}
oidc-audience: ${{ inputs.oidc-audience }}

- name: Upload from branches to JFrog
shell: bash
Expand Down
29 changes: 10 additions & 19 deletions .github/workflows/build-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branch:
type: string
required: true
source-branch:
type: string
required: false
use-server-rc:
type: boolean
required: false
Expand Down Expand Up @@ -32,38 +35,26 @@ jobs:
- name: debug
run: |
echo "${{ inputs.branch }}"
echo "${{ github.ref }}"
echo "${{ github.base_ref }}"
build-java-21:
if: ${{ inputs.branch == 'refs/heads/stage' || inputs.branch == 'stage' }}
if: ${{ inputs.source-branch == 'refs/heads/stage' }}
uses: ./.github/workflows/build.yaml
strategy:
matrix:
java-version: [21]
include:
- java-version: 21
branch: "stage"
with:
java-version: ${{ matrix.java-version }}
branch: ${{ matrix.branch }}
java-version: 21
branch: ${{ inputs.branch }}
bump-version: ${{ inputs.bump-version }}
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
upload-artifacts: ${{ inputs.upload-artifacts }}
secrets: inherit

build-java-8:
if: ${{ inputs.branch == 'refs/heads/stage-jdk8' || inputs.branch == 'stage-jdk8' }}
if: ${{ inputs.source-branch == 'refs/heads/stage-jdk8' }}
uses: ./.github/workflows/build.yaml
strategy:
matrix:
java-version: [8]
include:
- java-version: 8
branch: "stage-jdk8"
with:
java-version: ${{ matrix.java-version }}
branch: ${{ matrix.branch }}
java-version: 8
branch: ${{ inputs.branch }}
bump-version: ${{ inputs.bump-version }}
use-server-rc: ${{ inputs.use-server-rc }}
server-tag: ${{ inputs.server-tag }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ on:
required: true
JFROG_DOCKER_TOKEN:
required: true
JFROG_MAVEN_TOKEN:
required: true

jobs:
build:
Expand All @@ -53,6 +51,11 @@ jobs:
distribution: "semeru" # See 'Supported distributions' for available options
java-version: ${{ inputs.java-version }}

- name: Debug, list files
run: |
ls -laR .github
echo "Checked out branch ${{ inputs.branch }}"
- name: Increment version
if: ${{ inputs.bump-version == true }}
run: |
Expand Down Expand Up @@ -95,4 +98,3 @@ jobs:
with:
version: ${{ steps.get-new-version.outputs.new_version }}
jdk-version: "jdk${{ inputs.java-version }}"
jfrog-token: ${{ secrets.JFROG_MAVEN_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/pull-request-open-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ on:
- reopened
workflow_dispatch:
inputs:
branch:
source-branch:
type: string
default: stage
description: Base branch to use if manually starting. By default base_ref will empty if triggering manually hence base_ref is only available on PRs.

jobs:
test-with-server-release:
name: Build stage - Test with latest version of Aerospike Enterprise Server
uses: ./.github/workflows/build-stage.yaml
with:
branch: ${{ github.base_ref || inputs.branch }}
branch: ${{ github.ref }}
source-branch: ${{ inputs.source-branch || github.base_ref }}
secrets: inherit

test-with-server-rc:
name: Build stage - Test with latest RC version of Aerospike Enterprise Server
uses: ./.github/workflows/build-stage.yaml
with:
branch: ${{ github.base_ref || inputs.branch }}
source-branch: ${{ inputs.source-branch || github.base_ref }}
use-server-rc: true
secrets: inherit

0 comments on commit c776a4f

Please sign in to comment.