Skip to content

Commit fb79cc3

Browse files
committed
Integration fixes
1 parent 1a9f6b4 commit fb79cc3

File tree

9 files changed

+94
-66
lines changed

9 files changed

+94
-66
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

+29-7
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ inputs:
1313
jfrog-platform-url:
1414
description: ""
1515
required: false
16-
default: https://aerospike.jfrog.io/
16+
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
2826
default: gnu
27+
artifact-name:
28+
description: ""
29+
required: true
2930

3031
runs:
3132
using: "composite"
@@ -38,15 +39,36 @@ runs:
3839
oidc-provider-name: ${{ inputs.oidc-provider }}
3940
oidc-audience: ${{ inputs.oidc-audience }}
4041

42+
- name: Debug
43+
shell: bash
44+
run: |
45+
echo "${{ inputs.crypto-type }}" && \
46+
ls -la
47+
4148
- name: Set crypto dependency
4249
shell: bash
4350
run: |
4451
./set_crypto ${{ inputs.crypto-type }}
4552
53+
- name: Debug
54+
shell: bash
55+
run: |
56+
echo "${{ inputs.crypto-type }}" && \
57+
ls -la
58+
4659
- name: Deploy release
4760
shell: bash
4861
working-directory: client
4962
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 }}
63+
jf mvn-config --repo-deploy-releases=${{ inputs.jfrog-releases-repo-name }} --repo-deploy-snapshots=${{ inputs.jfrog-snapshots-repo-name }} && \
64+
jf mvn source:jar javadoc:jar deploy -Dusername=${{ steps.setup-jfrog-cli.outputs.oidc-user }} ${{ steps.setup-jfrog-cli.outputs.oidc-token }} && \
65+
jf mvn deploy:deploy-file -DpomFile=src/resources/${{ inputs.crypto-type }}_pom.xml \
66+
-Dfile=target/${{ inputs.artifact-name }}.jar \
67+
-Dfiles=target/${{ inputs.artifact-name }}-jar-with-dependencies.jar,target/${{ inputs.artifact-name }}-javadoc.jar,target/${{ inputs.artifact-name }}-sources.jar \
68+
-Dclassifiers=jar-with-dependencies,javadoc,sources \
69+
-Dtypes=jar,jar,jar \
70+
-DrepositoryId=${{ inputs.jfrog-releases-repo-name }} \
71+
-Durl=${{ inputs.jfrog-platform-url }}/artifactory/${{ inputs.jfrog-releases-repo-name }}
72+
jf rt bce && \
73+
jf rt bag && \
5274
jf rt bp

.github/workflows/build.yaml

+12
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:
@@ -66,8 +70,16 @@ jobs:
6670
server-tag: ${{ inputs.server-tag }}
6771
use-server-rc: ${{ inputs.use-server-rc }}
6872

73+
- name: Get artifact name
74+
id: get-artifact-name
75+
run: |
76+
echo artifact-name=$(mvn help:evaluate -Dexpression=project.build.finalName -q -DforceStdout) >> $GITHUB_OUTPUT
77+
6978
- name: Publish to JFrog
7079
if: ${{ !cancelled() && inputs.upload-artifacts == true }}
7180
uses: ./.github/actions/publish-to-jfrog
7281
with:
7382
crypto-type: ${{ inputs.crypto-type }}
83+
oidc-provider: ${{ secrets.JFROG_OIDC_PROVIDER }}
84+
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}
85+
artifact-name: ${{ steps.get-artifact-name.outputs.artifact-name }}

.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 }}

client/src/resources/bouncy_pom.xml client/src/resources/bouncycastle_pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.aerospike</groupId>
44
<artifactId>aerospike-client-bc-jdk21</artifactId>
5-
<version>9.0.1</version>
5+
<version>9.0.2</version>
66
<packaging>jar</packaging>
77
<name>Aerospike Java Client BC</name>
88
<description>Aerospike Java client interface to Aerospike database server. Uses Bouncy Castle crypto library for RIPEMD-160 hashing.</description>

client/src/resources/gnu_pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.aerospike</groupId>
44
<artifactId>aerospike-client-jdk21</artifactId>
5-
<version>9.0.1</version>
5+
<version>9.0.2</version>
66
<packaging>jar</packaging>
77
<name>Aerospike Java Client</name>
88
<description>Aerospike Java client interface to Aerospike database server</description>

0 commit comments

Comments
 (0)