Skip to content

Commit 1e7d6d8

Browse files
committed
Change integration tests
1 parent 5354fbe commit 1e7d6d8

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/oidc-integration-test.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
name: OIDC Integration Test
2+
# This workflow tests the setup-jfrog-cli GitHub Action's OpenID Connect integration across OSes and CLI versions.
3+
# It ensures backward compatibility with older CLI versions and validates step outputs and connectivity.
4+
# CLI versions used:
5+
# - 2.74.1: Does not support `jf eot` command, validates manual fallback logic.
6+
# - 2.75.0: Introduced native OIDC token exchange.
7+
# - Latest: Ensures ongoing compatibility with the most recent CLI build.
28

39
on:
410
push:
511
branches:
6-
- '**'
7-
12+
- master
13+
# Triggers the workflow on labeled PRs only.
14+
pull_request_target:
15+
types: [ labeled ]
16+
# Ensures that only the latest commit is running for each PR at a time.
817
concurrency:
918
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
1019
cancel-in-progress: true
@@ -18,8 +27,8 @@ jobs:
1827
strategy:
1928
fail-fast: true
2029
matrix:
21-
os: [ubuntu, macos, windows]
22-
cli-version: ['2.74.1', '2.75.0']
30+
os: [ ubuntu, macos, windows ]
31+
cli-version: [ '2.74.1', '2.75.0','latest' ]
2332
runs-on: ${{ matrix.os }}-latest
2433
name: OIDC Test - ${{ matrix.cli-version }} on ${{ matrix.os }}
2534
env:
@@ -31,6 +40,7 @@ jobs:
3140
with:
3241
ref: ${{ github.event.pull_request.head.sha }}
3342

43+
# Setup OIDC platform integration
3444
- name: Generate unique OIDC provider name
3545
id: gen-oidc
3646
shell: bash
@@ -70,6 +80,7 @@ jobs:
7080
}
7181
}'
7282
83+
# Setup
7384
- name: Setup JFrog CLI
7485
id: setup-jfrog-cli
7586
uses: ./
@@ -79,9 +90,11 @@ jobs:
7990
version: ${{ matrix.cli-version }}
8091
oidc-provider-name: ${{ steps.gen-oidc.outputs.oidc_provider_name }}
8192

93+
# validate successful OIDC configuration
8294
- name: Test JFrog CLI connectivity
8395
run: jf rt ping
8496

97+
# Validate step outputs
8598
- name: Validate user output
8699
shell: bash
87100
run: test -n "${{ steps.setup-jfrog-cli.outputs.oidc-user }}"
@@ -90,6 +103,7 @@ jobs:
90103
shell: bash
91104
run: test -n "${{ steps.setup-jfrog-cli.outputs.oidc-token }}"
92105

106+
# Cleanup
93107
- name: Delete OIDC integration
94108
shell: bash
95109
if: always()

0 commit comments

Comments
 (0)