Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
test build (#4)
Browse files Browse the repository at this point in the history
* test build

* add separate build ci

* checkout before setting up

* bump kotlin version?

* remove system API temporary since it clashes

* rename system to prevent import conflict

* add command for local build

* set correct versions via template

* fix totp stage enum
  • Loading branch information
BeryJu authored Nov 16, 2023
1 parent 8a89ade commit 19460dd
Show file tree
Hide file tree
Showing 21 changed files with 348 additions and 72 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
- version-*

permissions:
contents: write
packages: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "20"
cache: "gradle"
- uses: actions/setup-go@v4
- uses: gradle/gradle-build-action@v2
with:
arguments: build
gradle-version: "8.4"
12 changes: 12 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
packages: write

jobs:
schema:
Expand All @@ -22,6 +23,11 @@ jobs:
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "20"
cache: "gradle"
- uses: actions/setup-go@v4
- name: Check for updates
run: make
Expand All @@ -40,3 +46,9 @@ jobs:
git tag $version
git push --tags
gh release create $version -F diff.log
- uses: gradle/gradle-build-action@v2
with:
arguments: publish
gradle-version: "8.4"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
8 changes: 4 additions & 4 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,8 @@ docs/StaticDeviceRequest.md
docs/StaticDeviceToken.md
docs/StaticDeviceTokenRequest.md
docs/SubModeEnum.md
docs/System.md
docs/SystemRuntime.md
docs/SystemInfo.md
docs/SystemInfoRuntime.md
docs/TOTPDevice.md
docs/TOTPDeviceRequest.md
docs/Task.md
Expand Down Expand Up @@ -1007,8 +1007,8 @@ src/main/kotlin/io/goauthentik/api/models/StaticDeviceRequest.kt
src/main/kotlin/io/goauthentik/api/models/StaticDeviceToken.kt
src/main/kotlin/io/goauthentik/api/models/StaticDeviceTokenRequest.kt
src/main/kotlin/io/goauthentik/api/models/SubModeEnum.kt
src/main/kotlin/io/goauthentik/api/models/System.kt
src/main/kotlin/io/goauthentik/api/models/SystemRuntime.kt
src/main/kotlin/io/goauthentik/api/models/SystemInfo.kt
src/main/kotlin/io/goauthentik/api/models/SystemInfoRuntime.kt
src/main/kotlin/io/goauthentik/api/models/TOTPDevice.kt
src/main/kotlin/io/goauthentik/api/models/TOTPDeviceRequest.kt
src/main/kotlin/io/goauthentik/api/models/Task.kt
Expand Down
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ UID = $(shell id -u)
GID = $(shell id -g)
VERSION = $(shell cd version/ && go run -v .)

all: clean fetch diff build
all: clean fetch diff generate

clean:
rm -rf build/
rm -rf docs/
rm -rf src/

.PHONY: build
build:
.PHONY: generate
generate:
docker run \
--rm -v ${PWD}:/local \
--user ${UID}:${GID} \
Expand All @@ -24,6 +25,10 @@ build:
rm -rf ./test
rm -f .travis.yml git_push.sh
chmod +x ./gradlew
# cp ./templates/build.gradle build.gradle

build:
docker run -it --rm -v ${PWD}:/data -w /data eclipse-temurin:20 ./gradlew build

diff:
docker run \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,8 @@ Class | Method | HTTP request | Description
- [StaticDeviceToken](docs/StaticDeviceToken.md)
- [StaticDeviceTokenRequest](docs/StaticDeviceTokenRequest.md)
- [SubModeEnum](docs/SubModeEnum.md)
- [System](docs/System.md)
- [SystemRuntime](docs/SystemRuntime.md)
- [SystemInfo](docs/SystemInfo.md)
- [SystemInfoRuntime](docs/SystemInfoRuntime.md)
- [TOTPDevice](docs/TOTPDevice.md)
- [TOTPDeviceRequest](docs/TOTPDeviceRequest.md)
- [Task](docs/Task.md)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ wrapper {
}

buildscript {
ext.kotlin_version = '1.8.10'
ext.kotlin_version = '1.9.10'
ext.spotless_version = "6.13.0"

repositories {
Expand Down
4 changes: 4 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ files:
README.mustache:
templateType: SupportingFiles
destinationFilename: README.md
build.gradle.mustache:
destinationFilename: build.gradle
gradle-wrapper.properties.mustache:
destinationFilename: gradle/wrapper/gradle-wrapper.properties
12 changes: 6 additions & 6 deletions docs/AdminApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Configure authentik:

<a id="adminSystemCreate"></a>
# **adminSystemCreate**
> System adminSystemCreate()
> SystemInfo adminSystemCreate()


Expand All @@ -170,7 +170,7 @@ Get system information.

val apiInstance = AdminApi()
try {
val result : System = apiInstance.adminSystemCreate()
val result : SystemInfo = apiInstance.adminSystemCreate()
println(result)
} catch (e: ClientException) {
println("4xx response calling AdminApi#adminSystemCreate")
Expand All @@ -186,7 +186,7 @@ This endpoint does not need any parameter.

### Return type

[**System**](System.md)
[**SystemInfo**](SystemInfo.md)

### Authorization

Expand All @@ -202,7 +202,7 @@ Configure authentik:

<a id="adminSystemRetrieve"></a>
# **adminSystemRetrieve**
> System adminSystemRetrieve()
> SystemInfo adminSystemRetrieve()


Expand All @@ -216,7 +216,7 @@ Get system information.

val apiInstance = AdminApi()
try {
val result : System = apiInstance.adminSystemRetrieve()
val result : SystemInfo = apiInstance.adminSystemRetrieve()
println(result)
} catch (e: ClientException) {
println("4xx response calling AdminApi#adminSystemRetrieve")
Expand All @@ -232,7 +232,7 @@ This endpoint does not need any parameter.

### Return type

[**System**](System.md)
[**SystemInfo**](SystemInfo.md)

### Authorization

Expand Down
6 changes: 3 additions & 3 deletions docs/DigitsEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
## Enum


* `_6` (value: `6`)
* `_6` (value: `"6"`)

* `_8` (value: `8`)
* `_8` (value: `"8"`)

* `unknownDefaultOpenApi` (value: `11184809`)
* `unknownDefaultOpenApi` (value: `"unknown_default_open_api"`)



4 changes: 2 additions & 2 deletions docs/StagesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ AuthenticatorTOTPStage Viewset

val apiInstance = StagesApi()
val configureFlow : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val digits : kotlin.Int = 56 // kotlin.Int | * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator
val digits : kotlin.String = digits_example // kotlin.String | * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator
val friendlyName : kotlin.String = friendlyName_example // kotlin.String |
val name : kotlin.String = name_example // kotlin.String |
val ordering : kotlin.String = ordering_example // kotlin.String | Which field to use when ordering the results.
Expand All @@ -1875,7 +1875,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**configureFlow** | **java.util.UUID**| | [optional]
**digits** | **kotlin.Int**| * &#x60;6&#x60; - 6 digits, widely compatible * &#x60;8&#x60; - 8 digits, not compatible with apps like Google Authenticator | [optional] [enum: 6, 8]
**digits** | **kotlin.String**| * &#x60;6&#x60; - 6 digits, widely compatible * &#x60;8&#x60; - 8 digits, not compatible with apps like Google Authenticator | [optional] [enum: 6, 8]
**friendlyName** | **kotlin.String**| | [optional]
**name** | **kotlin.String**| | [optional]
**ordering** | **kotlin.String**| Which field to use when ordering the results. | [optional]
Expand Down
4 changes: 2 additions & 2 deletions docs/System.md → docs/SystemInfo.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

# System
# SystemInfo

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**httpHeaders** | **kotlin.collections.Map&lt;kotlin.String, kotlin.String&gt;** | Get HTTP Request headers | [readonly]
**httpHost** | **kotlin.String** | Get HTTP host | [readonly]
**httpIsSecure** | **kotlin.Boolean** | Get HTTP Secure flag | [readonly]
**runtime** | [**SystemRuntime**](SystemRuntime.md) | |
**runtime** | [**SystemInfoRuntime**](SystemInfoRuntime.md) | |
**tenant** | **kotlin.String** | Currently active tenant | [readonly]
**serverTime** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | Current server time | [readonly]
**embeddedOutpostHost** | **kotlin.String** | Get the FQDN configured on the embedded outpost | [readonly]
Expand Down
2 changes: 1 addition & 1 deletion docs/SystemRuntime.md → docs/SystemInfoRuntime.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# SystemRuntime
# SystemInfoRuntime

## Properties
Name | Type | Description | Notes
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
33 changes: 12 additions & 21 deletions schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/System'
$ref: '#/components/schemas/SystemInfo'
description: ''
'400':
content:
Expand All @@ -133,7 +133,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/System'
$ref: '#/components/schemas/SystemInfo'
description: ''
'400':
content:
Expand Down Expand Up @@ -22451,10 +22451,10 @@ paths:
- in: query
name: digits
schema:
type: integer
type: string
enum:
- 6
- 8
- '6'
- '8'
description: |-
* `6` - 6 digits, widely compatible
* `8` - 8 digits, not compatible with apps like Google Authenticator
Expand Down Expand Up @@ -28794,10 +28794,7 @@ components:
type: string
nullable: true
digits:
allOf:
- $ref: '#/components/schemas/DigitsEnum'
minimum: -2147483648
maximum: 2147483647
$ref: '#/components/schemas/DigitsEnum'
required:
- component
- digits
Expand Down Expand Up @@ -28828,10 +28825,7 @@ components:
nullable: true
minLength: 1
digits:
allOf:
- $ref: '#/components/schemas/DigitsEnum'
minimum: -2147483648
maximum: 2147483647
$ref: '#/components/schemas/DigitsEnum'
required:
- digits
- name
Expand Down Expand Up @@ -29920,9 +29914,9 @@ components:
* `http://www.w3.org/2001/04/xmlenc#sha512` - SHA512
DigitsEnum:
enum:
- 6
- 8
type: integer
- '6'
- '8'
type: string
description: |-
* `6` - 6 digits, widely compatible
* `8` - 8 digits, not compatible with apps like Google Authenticator
Expand Down Expand Up @@ -35909,10 +35903,7 @@ components:
nullable: true
minLength: 1
digits:
allOf:
- $ref: '#/components/schemas/DigitsEnum'
minimum: -2147483648
maximum: 2147483647
$ref: '#/components/schemas/DigitsEnum'
PatchedAuthenticatorValidateStageRequest:
type: object
description: AuthenticatorValidateStage Serializer
Expand Down Expand Up @@ -41152,7 +41143,7 @@ components:
* `user_username` - Based on the username
* `user_email` - Based on the User's Email. This is recommended over the UPN method.
* `user_upn` - Based on the User's UPN, only works if user has a 'upn' attribute set. Use this method only if you have different UPN and Mail domains.
System:
SystemInfo:
type: object
description: Get system information.
properties:
Expand Down
Loading

0 comments on commit 19460dd

Please sign in to comment.