Skip to content

Commit

Permalink
Merge pull request #1 from Infisical/daniel/custom-http-client
Browse files Browse the repository at this point in the history
feat(sdk): custom http client
  • Loading branch information
DanielHougaard authored Dec 3, 2024
2 parents a8fe599 + 3bf4bcc commit f94fa88
Show file tree
Hide file tree
Showing 31 changed files with 994 additions and 35,674 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release to Maven Central
on:
push:
tags:
- "*"
workflow_dispatch:

jobs:
integration-tests:
name: Run tests before deployment
uses: ./.github/workflows/test.yml
secrets:
INFISICAL_MACHINE_IDENTITY_CLIENT_ID: ${{ secrets.INFISICAL_MACHINE_IDENTITY_CLIENT_ID }}
INFISICAL_MACHINE_IDENTITY_CLIENT_SECRET: ${{ secrets.INFISICAL_MACHINE_IDENTITY_CLIENT_SECRET }}
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_PROJECT_ID }}
INFISICAL_SITE_URL: ${{ secrets.INFISICAL_SITE_URL }}

publish:
needs: [integration-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
java-version: "11"
distribution: "temurin"
cache: "maven"
server-id: ossrh
server-username: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
server-password: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
gpg-private-key: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
gpg-passphrase: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}

- name: Build and test
run: mvn -B clean verify

- name: Set version
run: |
VERSION=${GITHUB_REF#refs/tags/}
mvn versions:set -DnewVersion=${VERSION} -DgenerateBackupPoms=false
if: github.event_name == 'release'

- name: Publish to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
MAVEN_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
run: |
mvn --batch-mode \
--no-transfer-progress \
clean deploy \
-P release \
-DskipTests
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Maven Test

on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
workflow_call:
secrets:
INFISICAL_MACHINE_IDENTITY_CLIENT_ID:
required: true
INFISICAL_MACHINE_IDENTITY_CLIENT_SECRET:
required: true
INFISICAL_PROJECT_ID:
required: true
INFISICAL_SITE_URL:
required: true
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: maven

- name: Run Tests
env:
INFISICAL_MACHINE_IDENTITY_CLIENT_ID: ${{ secrets.INFISICAL_MACHINE_IDENTITY_CLIENT_ID }}
INFISICAL_MACHINE_IDENTITY_CLIENT_SECRET: ${{ secrets.INFISICAL_MACHINE_IDENTITY_CLIENT_SECRET }}
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_PROJECT_ID }}
INFISICAL_SITE_URL: ${{ secrets.INFISICAL_SITE_URL }}
run: mvn clean test

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: target/surefire-reports/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/scripts/node_modules
/target
/target
.idea
70 changes: 42 additions & 28 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f94fa88

Please sign in to comment.