Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,19 @@ jobs:
java-version: 11
- name: Setup Gradle 🐘
uses: gradle/gradle-build-action@v2
- name: Prepare Artifactory 🐸
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: "https://${{ secrets.ARTIFACTORY_HOST }}"
JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run build with Gradle Wrapper 🏃
run: ./gradlew build -x test
- name: Run tests 🧑‍⚕️
run: ./gradlew test
# Might want to remove this step
- name: Archive production artifacts ⬆️
if: ${{ github.event_name == 'pull_request' && github.pull_request_target == 'master' }}
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: ./build/libs/saRestApi-*.jar
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: ${{ secrets.ARTIFACTORY_URL }}
JF_USER: ${{ secrets.JFROG_USERNAME }}
JF_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
- run: |
# This command adds a new server configuration to the JFrog CLI
- name: Upload to artifactory
if: ${{ github.event_name == 'pull_request' }}
run: |
export BUILD_NAME="saidp-sdk-java"
export BUILD_MODULE="sdk-java"
export BUILD_NUMBER="1"

export VERSION=$(cat gradle.properties | grep -Po "\d*\.\d*\.\d*\.\d*")

jf rt upload "./build/libs/saRestApi-*.jar" radius-release-local/saRestApi/$VERSION/saRestApi-$VERSION.jar --build-name $BUILD_NAME --build-number $BUILD_NUMBER --module $BUILD_MODULE
jf rt build-publish $BUILD_NAME $BUILD_NUMBER
- run: echo "🍏 This job's status is ${{ job.status }}."
jf rt u "./build/libs/saRestApi-*.jar" saidp-dev/radius/saRestApi/$VERSION/saRestApi-$VERSION.jar
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ repositories {
mavenCentral()
maven {
url artifactory_repo
credentials {
username = artifactory_user
password = artifactory_key
authentication {
header(HttpHeaderAuthentication)
}
credentials(HttpHeaderCredentials) {
name = "Authorization"
value = "Bearer ${artifactory_token}"
}
metadataSources {
artifact()
Expand Down
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
currentVersion=1.1.0.13
artifactory_repo=https://secureauthcloud.jfrog.io/artifactory/
artifactory_user=
artifactory_key=
artifactory_repo=https://artifacts.secureauth.com
artifactory_token=
Loading