Skip to content

Commit a356011

Browse files
committed
Integration fixes
1 parent 1a9f6b4 commit a356011

File tree

11 files changed

+100
-73
lines changed

11 files changed

+100
-73
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

+30-11
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,59 @@ 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"
3233
steps:
3334
- name: Set up JFrog credentials
35+
id: setup-jfrog-cli
3436
uses: jfrog/setup-jfrog-cli@v4
3537
env:
3638
JF_URL: ${{ inputs.jfrog-platform-url }}
3739
with:
3840
oidc-provider-name: ${{ inputs.oidc-provider }}
3941
oidc-audience: ${{ inputs.oidc-audience }}
4042

41-
- name: Set crypto dependency
42-
shell: bash
43-
run: |
44-
./set_crypto ${{ inputs.crypto-type }}
43+
- uses: s4u/[email protected]
44+
with:
45+
servers: '[{"id": "jfrog", "username": "${{ steps.setup-jfrog-cli.outputs.oidc-user }}", "password": "${{ steps.setup-jfrog-cli.outputs.oidc-token }}"}]'
4546

46-
- name: Deploy release
47+
- name: Deploy client release
4748
shell: bash
4849
working-directory: client
4950
run: |
5051
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 }}
52+
jf mvn source:jar javadoc:jar org.apache.maven.plugins:maven-deploy-plugin:3.1.3:deploy-file \
53+
-DpomFile=src/resources/${{ inputs.crypto-type }}_pom.xml \
54+
-Dfile=target/${{ inputs.artifact-name }}.jar \
55+
-Dfiles=target/${{ inputs.artifact-name }}-jar-with-dependencies.jar \
56+
-Dtypes=jar \
57+
-Dclassifiers=jar-with-dependencies \
58+
-Dsources=target/${{ inputs.artifact-name }}-sources.jar \
59+
-Djavadoc=target/${{ inputs.artifact-name }}-javadoc.jar \
60+
-DrepositoryId=jfrog \
61+
-Durl=${{ inputs.jfrog-platform-url }}/artifactory/${{ inputs.jfrog-releases-repo-name }}
62+
63+
- name: Publish build info
64+
shell: bash
65+
run: |
66+
# Collect environment variables for the build
67+
jf rt bce
68+
# Collect VCS details from git and add them to the build
69+
jf rt bag
70+
# Publish build info
5271
jf rt bp

.github/workflows/build-dev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
needs: java-version
7676
strategy:
7777
matrix:
78-
crypto-type: ["bouncycastle", "gnu"]
78+
crypto-type: [bouncycastle, gnu]
7979
with:
8080
java-version: ${{ needs.java-version.outputs.java-version }}
8181
branch: ${{ inputs.branch }}

.github/workflows/build.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Build artifacts
2+
run-name: Build artifact for ${{ inputs.crypto-type }} ${{ inputs.java-version }}
23

34
permissions:
45
# This is required for requesting the OIDC token
@@ -41,12 +42,16 @@ on:
4142
required: true
4243
GPG_PASS:
4344
required: true
45+
JFROG_OIDC_PROVIDER:
46+
required: true
47+
JFROG_OIDC_AUDIENCE:
48+
required: true
4449

4550
jobs:
4651
build:
4752
runs-on: ubuntu-latest
4853
steps:
49-
- name: Checkout client
54+
- name: Checkout code
5055
uses: actions/checkout@v4
5156
with:
5257
ref: ${{ inputs.branch }}
@@ -66,8 +71,17 @@ jobs:
6671
server-tag: ${{ inputs.server-tag }}
6772
use-server-rc: ${{ inputs.use-server-rc }}
6873

74+
- name: Get artifact name
75+
id: get-artifact-name
76+
working-directory: client
77+
run: |
78+
echo artifact-name=$(mvn help:evaluate -Dexpression=project.build.finalName -q -DforceStdout) >> $GITHUB_OUTPUT
79+
6980
- name: Publish to JFrog
7081
if: ${{ !cancelled() && inputs.upload-artifacts == true }}
7182
uses: ./.github/actions/publish-to-jfrog
7283
with:
7384
crypto-type: ${{ inputs.crypto-type }}
85+
oidc-provider: ${{ secrets.JFROG_OIDC_PROVIDER }}
86+
oidc-audience: ${{ secrets.JFROG_OIDC_AUDIENCE }}
87+
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/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<goal>install-file</goal>
117117
</goals>
118118
<configuration>
119-
<pomFile>${project.basedir}/src/resources/bouncy_pom.xml</pomFile>
119+
<pomFile>${project.basedir}/src/resources/bouncycastle_pom.xml</pomFile>
120120
<file>target/${project.build.finalName}.jar</file>
121121
<groupId>com.aerospike</groupId>
122122
<artifactId>aerospike-client${crypto.type}-jdk21</artifactId>

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)