Skip to content

Commit 8460576

Browse files
committed
Integration fixes
1 parent 1a9f6b4 commit 8460576

File tree

7 files changed

+75
-63
lines changed

7 files changed

+75
-63
lines changed

.github/actions/build-and-test/action.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ runs:
3131
- name: Stage crypto
3232
shell: bash
3333
run: |
34-
./set_cypto ${{ inputs.crypto-type }}
34+
./set_crypto ${{ inputs.crypto-type }}
3535
3636
- name: Build
3737
shell: bash
38-
run: mvn clean install -P ${{ inputs.crypto-type }}
38+
run: mvn clean install
3939

4040
- name: Run EE server
4141
if: ${{ inputs.run-tests == 'true' }}

.github/actions/fast-forward-merge/action.yaml

-36
This file was deleted.

.github/actions/publish-to-jfrog/action.yaml

+18-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ inputs:
1616
default: https://aerospike.jfrog.io/
1717
oidc-provider:
1818
description: ""
19-
required: false
20-
default: gh-aerospike-clients
19+
required: true
2120
oidc-audience:
2221
description: ""
23-
required: false
24-
default: aerospike/clients
22+
required: true
2523
crypto-type:
2624
description: ""
2725
required: false
@@ -38,15 +36,29 @@ runs:
3836
oidc-provider-name: ${{ inputs.oidc-provider }}
3937
oidc-audience: ${{ inputs.oidc-audience }}
4038

39+
- name: Debug
40+
shell: bash
41+
run: |
42+
echo "${{ inputs.crypto-type }}" && \
43+
ls -la
44+
4145
- name: Set crypto dependency
4246
shell: bash
4347
run: |
4448
./set_crypto ${{ inputs.crypto-type }}
4549
50+
- name: Debug
51+
shell: bash
52+
run: |
53+
echo "${{ inputs.crypto-type }}" && \
54+
ls -la
55+
4656
- name: Deploy release
4757
shell: bash
4858
working-directory: client
4959
run: |
50-
jf mvn-config --repo-deploy-releases=${{ inputs.jfrog-releases-repo-name }} --repo-deploy-snapshots=${{ inputs.jfrog-snapshots-repo-name }}
51-
jf mvn source:jar javadoc:jar deploy -Dusername=${{ steps.setup-jfrog-cli.outputs.oidc-user }} ${{ steps.setup-jfrog-cli.outputs.oidc-token }}
60+
jf mvn-config --repo-deploy-releases=${{ inputs.jfrog-releases-repo-name }} --repo-deploy-snapshots=${{ inputs.jfrog-snapshots-repo-name }} && \
61+
jf mvn source:jar javadoc:jar deploy -Dusername=${{ steps.setup-jfrog-cli.outputs.oidc-user }} ${{ steps.setup-jfrog-cli.outputs.oidc-token }} && \
62+
jf rt bce && \
63+
jf rt bag && \
5264
jf rt bp

.github/workflows/build.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ on:
4141
required: true
4242
GPG_PASS:
4343
required: true
44+
JFROG_OIDC_PROVIDER:
45+
required: true
46+
JFROG_OIDC_AUDIENCE:
47+
required: true
4448

4549
jobs:
4650
build:
@@ -71,3 +75,5 @@ jobs:
7175
uses: ./.github/actions/publish-to-jfrog
7276
with:
7377
crypto-type: ${{ inputs.crypto-type }}
78+
oidc-provider: ${{ secrets.JFROG_OIDC_PROVIDER }}
79+
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}

.github/workflows/promote-prod.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
name: Promot from stage to prod
1717
uses: ./.github/workflows/promote.yaml
1818
with:
19-
build-number: ${{ inputs.build-number }}
20-
target-repository: client-maven-stage-local
19+
build-number: ${{ inputs.build-number }}
20+
target-repository: clients-maven-stage-local
2121
target-branch: dev-stage
22+
secrets: inherit

.github/workflows/promote-to-stage.yaml

+14-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,25 @@ jobs:
2020
env:
2121
JF_URL: ${{ vars.JFROG_PLATFORM_URL }}
2222
with:
23-
oidc-provider-name: ${{ inputs.oidc-provider }}
24-
oidc-audience: ${{ inputs.oidc-audience }}
23+
oidc-provider-name: ${{ secrets.JFROG_OIDC_PROVIDER }}
24+
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}
2525

2626
- name: Get info
2727
id: get-build-info
2828
run: |
2929
echo build-info=$(jf rt curl /api/build/clients-java-push-to-dev/${{ inputs.build-number }}) >> $GITHUB_OUTPUT
3030
31+
- name: Get commit hash from repo
32+
id: get-commit-hash
33+
run: |
34+
echo commit-hash=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.vcs[].revision') >> $GITHUB_OUTPUT
35+
36+
- name: Get build name
37+
id: get-build-name
38+
run: |
39+
echo build-name=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.name') >> $GITHUB_OUTPUT
40+
3141
- name: Debug
3242
run: |
33-
echo ${{ steps.get-build-info.outputs.build-info }}
43+
echo "commit-hash: '${{ steps.get-commit-hash.outputs.commit-hash }}'"
44+
echo "build-name: '${{ steps.get-build-name.outputs.build-name }}'"

.github/workflows/promote.yaml

+32-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
build-number:
7-
type: number
7+
type: string
88
description: Build number used to build artifact to be promoted
99
target-repository:
1010
type: string
@@ -25,8 +25,8 @@ jobs:
2525
env:
2626
JF_URL: ${{ vars.JFROG_PLATFORM_URL }}
2727
with:
28-
oidc-provider-name: ${{ inputs.oidc-provider }}
29-
oidc-audience: ${{ inputs.oidc-audience }}
28+
oidc-provider-name: ${{ secrets.JFROG_OIDC_PROVIDER }}
29+
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}
3030

3131
- name: Get info
3232
id: get-build-info
@@ -36,25 +36,43 @@ jobs:
3636
- name: Get commit hash from repo
3737
id: get-commit-hash
3838
run: |
39-
echo commit-hash=$(steps.get-build-info.outputs.build-info | jq -r '.vcs[].revision') >> $GITHUB_OUTPUT
39+
echo commit-hash=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.vcs[].revision') >> $GITHUB_OUTPUT
4040
41-
- name: Get commit hash from repo
41+
- name: Get build name
4242
id: get-build-name
4343
run: |
44-
echo build-name=$(steps.get-build-info.outputs.build-info | jq -r '.name') >> $GITHUB_OUTPUT
44+
echo build-name=$(echo '${{ steps.get-build-info.outputs.build-info }}' | jq -r '.buildInfo.name') >> $GITHUB_OUTPUT
4545
4646
- name: Debug
4747
run: |
48-
echo ${{ steps.get-build-info.outputs.build-info }}
49-
echo ${{ steps.get-build-info.outputs.build-name }}
48+
echo "commit-hash: '${{ steps.get-commit-hash.outputs.commit-hash }}'"
49+
echo "build-name: '${{ steps.get-build-name.outputs.build-name }}'"
50+
51+
# Needed since we are using actions which are part of the repository
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
# Fetch the whole history to prevent unrelated history errors
56+
fetch-depth: "0"
57+
ref: ${{ inputs.target-branch }}
58+
token: ${{ secrets.CLIENT_BOT_PAT }}
59+
60+
- name: Fast forward
61+
shell: bash
62+
run: git merge --ff-only ${{ inputs.ref-to-merge }}
5063

51-
- name: Merge commit hash from source to target branch
52-
uses: ./github/actions/fast-forward-merge
64+
- name: Add tagging message
65+
uses: stefanzweifel/git-auto-commit-action@v4
5366
with:
54-
ref-to-merge: ${{ steps.get-build-info.outputs.build-info }}
55-
base-branch: ${{ inputs.target-branch }}
56-
git-bot-token: ${{ secrets.CLIENT_BOT_PAT }}
67+
commit_message: "Promote to prod [skip ci]"
68+
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
69+
tagging_message: Promote to PROD
70+
branch: ${{ inputs.target-branch }}
71+
72+
- name: Upload changes to remote head branch
73+
shell: bash
74+
run: git push
5775

5876
- name: Promote build
5977
run: |
60-
jf rt build-promote ${{ steps.get-build-info.outputs.build-name }} ${{ inputs.build-number }} ${{ inputs.target-repository }}
78+
jf rt build-promote ${{ steps.get-build-name.outputs.build-name }} ${{ inputs.build-number }} ${{ inputs.target-repository }}

0 commit comments

Comments
 (0)