-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from RADAR-base/release-0.4.1
Release 0.4.1
- Loading branch information
Showing
14 changed files
with
797 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
check: | ||
publish: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -64,3 +64,117 @@ jobs: | |
OSSRH_USER: ${{ secrets.OSSRH_USER }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
run: ./gradlew -Psigning.gnupg.keyName=${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} publish closeAndReleaseSonatypeStagingRepository | ||
|
||
# Build and push tagged release backend docker image | ||
dockerBackend: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DOCKER_IMAGE: radarbase/radar-app-config | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Add Docker labels and tags | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
# Setup docker build environment | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build backend docker | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./radar-app-config/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
# Use runtime labels from docker_meta_backend as well as fixed labels | ||
labels: | | ||
${{ steps.docker_meta.outputs.labels }} | ||
maintainer=Joris Borgdorff <[email protected]>, Nivethika Mahasivam <[email protected]> | ||
org.opencontainers.image.description=RADAR-base app config service | ||
org.opencontainers.image.authors=Joris Borgdorff <[email protected]>, Nivethika Mahasivam <[email protected]> | ||
org.opencontainers.image.vendor=RADAR-base | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
- name: Inspect docker image | ||
run: | | ||
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} | ||
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} | ||
dockerFrontend: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DOCKER_IMAGE: radarbase/radar-app-config-frontend | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Add Docker labels and tags | ||
- name: Docker meta | ||
id: docker_meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.DOCKER_IMAGE }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
# Setup docker build environment | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build frontend docker | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./radar-app-config-frontend | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
# Use runtime labels from docker_meta_backend as well as fixed labels | ||
labels: | | ||
${{ steps.docker_meta.outputs.labels }} | ||
maintainer=Peyman Mohtashami <[email protected]>, Joris Borgdorff <[email protected]> | ||
org.opencontainers.image.description=RADAR-base app config frontend | ||
org.opencontainers.image.authors=Peyman Mohtashami <[email protected]>, Joris Borgdorff <[email protected]> | ||
org.opencontainers.image.vendor=RADAR-base | ||
org.opencontainers.image.licenses=Apache-2.0 | ||
- name: Inspect docker image | ||
run: | | ||
docker pull ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} | ||
docker image inspect ${{ env.DOCKER_IMAGE }}:${{ steps.docker_meta.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# App config client | ||
|
||
Kotlin client library for the radar-app-config service. It uses OkHttp3 for communication and Jackson JSON parsing. | ||
It may cache values. | ||
|
||
Import it with: | ||
|
||
```gradle | ||
dependencies { | ||
implementation("org.radarbase:radar-app-config-client:<release version>") | ||
} | ||
``` | ||
|
||
Example use: | ||
|
||
```kotlin | ||
data class MyConfig(val paramA: String?) | ||
|
||
val appConfigClient = AppConfigClient(object : TypeReference<MyConfig>() {}) { | ||
appConfigUrl(appConfigUrl) | ||
tokenUrl(authConfig.tokenUrl) | ||
clientId = authConfig.clientId | ||
clientSecret = authConfig.clientSecret | ||
} | ||
|
||
val myConfig = appConfigClient.getUserConfig(projectId, userId) | ||
val newConfig = updateConfig(myConfig) | ||
appConfigClient.setUserConfig(projectId, userId, newConfig) | ||
``` |
Oops, something went wrong.