Skip to content

Commit

Permalink
Merge branch 'main' into admin-ui-issue-806
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Mar 21, 2023
2 parents decfd32 + 2531627 commit adc3371
Show file tree
Hide file tree
Showing 125 changed files with 1,149 additions and 674 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ jobs:

- name: Configure Git
run: |
git config user.name "mo-auto"
git config user.email "54212639+mo-auto@users.noreply.github.com"
git config --global user.name "mo-auto"
git config --global user.email "54212639+mo-auto@users.noreply.github.com"
git config --global user.signingkey "${{ steps.import_gpg.outputs.keyid }}"
echo "${{ secrets.MOWORKFLOWTOKEN }}" | gh auth login --with-token
Expand All @@ -97,6 +97,7 @@ jobs:
git clone https://mo-auto:${{ secrets.MOWORKFLOWTOKEN }}@github.com/GluuFederation/flex.git
cd flex
git checkout -b cn-flex-update-auto-generated-docs
git pull origin cn-flex-update-auto-generated-docs || echo "Nothing to pull"
echo "Custom work on generating docs can go here."
# Run cn docs
sudo bash ./automation/docs/generated-cn-docs.sh . || echo "something went wrong with generating the cn docs"
Expand All @@ -119,17 +120,7 @@ jobs:
MESSAGE="fix(docs): autogenerate docs"
PR=$(gh pr create --body "Auto generated docs" --title "${MESSAGE}")
cd ../../
rm -rf temp
# The below should not be pushed to main
echo "Replacing release number markers with actual release number"
if [ ! -z "$VERSION" ]; then
cd docs
egrep -lRZ --exclude=CONTRIBUTING.md . | xargs -0 -l sed -i -e "s/replace-flex-version/${VERSION:1}/g"
git add . || echo "Nothing to add"
git commit -a -S -m "docs: replace release marker with release number" || echo "Nothing to commit"
cd ..
fi
sudo rm -rf temp
- name: mike deploy ${{ github.event.inputs.version }}
if: >-
Expand Down Expand Up @@ -164,7 +155,8 @@ jobs:
run: |
TAGS=$(gh release list -L 1000 -R ${{ github.repository }} | grep -o '^\v.*'| grep -v Draft | cut -f 1 | sed '/-/!{s/$/_/}' | sort -V | sed 's/_$//')
LATEST=$(echo "${TAGS}" | tail -1)
STABLE=$(echo "${TAGS}" | grep -v -- "-" | tail -1)
#STABLE=$(echo "${TAGS}" | grep -v -- "-" | tail -1)
STABLE=$LATEST
echo "Latest is $LATEST and Stable is $STABLE"
# remove below two lines after first release
#LATEST="head"
Expand Down Expand Up @@ -195,6 +187,14 @@ jobs:
git add index.yaml && git update-index --refresh
cd ..
# END move generated chart from a previous step
echo "Replacing release number markers with actual release number"
cd ${LATEST}
egrep -lRZ --exclude=CONTRIBUTING.md . | xargs -0 -l sed -i -e "s/replace-flex-version/${LATEST:1}/g"
egrep -lRZ --exclude=CONTRIBUTING.md . | xargs -0 -l sed -i -e "s/replace-jans-version/${LATEST:1}/g"
git add . && git update-index --refresh
cd ..
echo "${STABLE}" > stable.txt
git add stable.txt && git update-index --refresh
git diff-index --quiet HEAD -- || git commit -S -m "Set stable to ${STABLE}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
with:
repo_token: ${{ secrets.MOWORKFLOWTOKEN }}
file: ${{github.workspace}}/${{ matrix.asset_path }}/flex${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ env.ASSET_PRESUFFIX }}${{ matrix.asset_suffix }}
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ env.ASSET_PRESUFFIX }}${{ matrix.asset_suffix }}
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}-${{ matrix.asset_suffix }}
tag: ${{ steps.previoustag.outputs.tag }}
overwrite: true
- name: Upload checksum to release
Expand All @@ -145,7 +145,7 @@ jobs:
with:
repo_token: ${{ secrets.MOWORKFLOWTOKEN }}
file: ${{github.workspace}}/${{ matrix.asset_path }}/flex${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ env.ASSET_PRESUFFIX }}${{ matrix.asset_suffix }}.sha256sum
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}${{ env.ASSET_PRESUFFIX }}${{ matrix.asset_suffix }}.sha256sum
asset_name: ${{ env.PACKAGE_PREFIX }}${{ matrix.asset_prefix }}${{ steps.previoustag.outputs.version }}-${{ matrix.asset_suffix }}.sha256sum
tag: ${{ steps.previoustag.outputs.tag }}
overwrite: true

Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/docker_build_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ jobs:
if: steps.build_docker_image.outputs.build || github.event_name == 'tags'
id: prep
run: |
MAIN_VERSION=$(python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('./docker-${{ matrix.docker-images }}') ; print(dfparser.labels['version'])")
DOCKER_IMAGE=gluufederation/${{ matrix.docker-images }}
REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
MAIN_VERSION=$(python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('./docker-${{ matrix.docker-images }}') ; print(dfparser.labels['org.opencontainers.image.version'])")
DOCKER_IMAGE=ghcr.io/$REPOSITORY/${{ matrix.docker-images }}
if [[ ${{ matrix.docker-images }} == "flex-monolith" ]]; then
DOCKER_IMAGE=gluufederation/monolith
fi
Expand Down Expand Up @@ -162,21 +163,13 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
if: steps.build_docker_image.outputs.build && steps.prep.outputs.build
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.MOAUTO_DOCKERHUB_USERNAME }}
password: ${{ secrets.MOAUTO_DOCKERHUB_TOKEN }}
registry: ghcr.io
username: mo-auto
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
if: steps.build_docker_image.outputs.build && steps.prep.outputs.build
Expand All @@ -197,8 +190,6 @@ jobs:
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Image digest
if: steps.build_docker_image.outputs.build && steps.prep.outputs.build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/releaseplease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ on:
node_release_as:
description: 'Release version for the admin ui'
required: true
default: '1.0.9'
default: '1.0.11'
java_release_as:
description: 'Release version for the java projects casa'
required: true
default: '5.0.0-9'
default: '5.0.0-11'
docker_release_as:
description: 'Release version for the docker images docker-*'
required: true
default: '1.0.9-1'
default: '1.0.11-1'
python_release_as:
description: 'Release version for the python projects'
required: true
default: '1.0.9'
default: '1.0.11'
mega_release_as:
description: 'Mega release version'
required: true
default: '5.0.0-9'
default: '5.0.0-11'
jobs:
release-java-pr:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_docker_linux_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "flex-linux-setup/**"
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
max-parallel: 6
matrix:
Expand All @@ -37,7 +37,7 @@ jobs:
run: |
ip=$(ifconfig eth0 | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
sudo chmod u+x automation/startflexmonolithdemo.sh
sudo bash ./automation/startflexmonolithdemo.sh demoexample.gluu.org ${{ matrix.persistence-backends }} $ip ${{ github.sha }}
sudo bash ./automation/startflexmonolithdemo.sh demoexample.gluu.org ${{ matrix.persistence-backends }} $ip ${{ github.sha }} ${{ secrets.LICENSE_SSA }}
echo "echo setup.properties"
docker exec docker-flex-monolith-flex-1 cat setup.properties
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## [5.0.0-10](https://github.com/GluuFederation/flex/compare/v5.0.0-9...v5.0.0-10) (2023-03-16)


### Features

* **admin-ui:** change design for backend error ([afb1221](https://github.com/GluuFederation/flex/commit/afb12214d1cd0e8ee88f5e60fa781b0e254d7b2e))
* **docker-admin-ui:** admin-ui license registration ([#844](https://github.com/GluuFederation/flex/issues/844)) ([1b64602](https://github.com/GluuFederation/flex/commit/1b64602861501d831e1516534576f8162463d3c2))


### Bug Fixes

* add cn license enforcment to chart ([55fb0c9](https://github.com/GluuFederation/flex/commit/55fb0c97428a3ec704e80558679a7e9d7f88c42c))
* **admin-ui:** fix default arc in properties [#851](https://github.com/GluuFederation/flex/issues/851) ([9ef87ad](https://github.com/GluuFederation/flex/commit/9ef87ad0c44d2e22686e49d4d01ea72ef878d57f))
* **admin-ui:** fix properties page [#848](https://github.com/GluuFederation/flex/issues/848) ([1aa30da](https://github.com/GluuFederation/flex/commit/1aa30dac3496fd8b9bf4df8600cd0bab53c55a34))
* **admin-ui:** tab skip tooltip ([c35f8d5](https://github.com/GluuFederation/flex/commit/c35f8d5a8258a4ba0475fa4ca5e01a2968f0f0dd))
* **flex-linux-setup:** enforce SSA ([f46b80e](https://github.com/GluuFederation/flex/commit/f46b80edd500a7721358cedfcb43ca342a77401e))
* prepare for 5.0.10 release ([1ffcbc7](https://github.com/GluuFederation/flex/commit/1ffcbc74d837e7a037d6cff71d990573d04bba7b))

## [5.0.0-9](https://github.com/GluuFederation/flex/compare/v5.0.0-8...v5.0.0-9) (2023-03-09)


### Features

* admin ui license registration [#497](https://github.com/GluuFederation/flex/issues/497) ([f10ec67](https://github.com/GluuFederation/flex/commit/f10ec678bbea7c1eacde9574c771fad10540fce1))
* change error message[#497](https://github.com/GluuFederation/flex/issues/497) ([d2e94a4](https://github.com/GluuFederation/flex/commit/d2e94a4067c84674860894623f282b904eecb099))


### Bug Fixes

* **admin-ui:** fix edit and view pages issue ([90f396a](https://github.com/GluuFederation/flex/commit/90f396a7687384b55067f467b1d003acdaf7ea36))
* **docs:** ubuntu install download location ([bb3a5cd](https://github.com/GluuFederation/flex/commit/bb3a5cdc282c6089edb326675061e72d20bd8431))
* **flex-linux-setup:** adminui template ([85249a3](https://github.com/GluuFederation/flex/commit/85249a3447242957e45e887634430740ff520059))
* **flex-linux-setup:** decoding ssa jwt ([a953d31](https://github.com/GluuFederation/flex/commit/a953d31a459fac4ca55ff5b0d61cf454635e0673))
* **flex-linux-setup:** no download for deb/rpm packages ([02b9ac4](https://github.com/GluuFederation/flex/commit/02b9ac4f24e20413a9b138df430f28168605f3eb))
* **flex-linux-setup:** set flex version 1.0.9 ([#827](https://github.com/GluuFederation/flex/issues/827)) ([d94b40d](https://github.com/GluuFederation/flex/commit/d94b40d7b79d7baabc547294cce3156ec442ff26))
* prepare for 5.0.0-9 release ([716d309](https://github.com/GluuFederation/flex/commit/716d309350f5713b96f482dde9e0a543e5e62286))
* redirect_uris is mandatory if grant_types is not selected [#807](https://github.com/GluuFederation/flex/issues/807) ([a986eb0](https://github.com/GluuFederation/flex/commit/a986eb0a81971e3e5355121f4ca1ca1b68b324ca))

## [5.0.0-8](https://github.com/GluuFederation/flex/compare/v5.0.0-7...v5.0.0-8) (2023-03-02)


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Try first, ask questions later? Go to the [Gluu](https://gluu.org) website right
## Why the name Gluu?

## Support

30 changes: 30 additions & 0 deletions admin-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [1.0.10](https://github.com/GluuFederation/flex/compare/admin-ui-v1.0.9...admin-ui-v1.0.10) (2023-03-16)


### Features

* **admin-ui:** change design for backend error ([afb1221](https://github.com/GluuFederation/flex/commit/afb12214d1cd0e8ee88f5e60fa781b0e254d7b2e))


### Bug Fixes

* **admin-ui:** fix default arc in properties [#851](https://github.com/GluuFederation/flex/issues/851) ([9ef87ad](https://github.com/GluuFederation/flex/commit/9ef87ad0c44d2e22686e49d4d01ea72ef878d57f))
* **admin-ui:** fix properties page [#848](https://github.com/GluuFederation/flex/issues/848) ([1aa30da](https://github.com/GluuFederation/flex/commit/1aa30dac3496fd8b9bf4df8600cd0bab53c55a34))
* **admin-ui:** tab skip tooltip ([c35f8d5](https://github.com/GluuFederation/flex/commit/c35f8d5a8258a4ba0475fa4ca5e01a2968f0f0dd))
* prepare for 5.0.10 release ([1ffcbc7](https://github.com/GluuFederation/flex/commit/1ffcbc74d837e7a037d6cff71d990573d04bba7b))

## [1.0.9](https://github.com/GluuFederation/flex/compare/admin-ui-v1.0.8...admin-ui-v1.0.9) (2023-03-09)


### Features

* admin ui license registration [#497](https://github.com/GluuFederation/flex/issues/497) ([f10ec67](https://github.com/GluuFederation/flex/commit/f10ec678bbea7c1eacde9574c771fad10540fce1))
* change error message[#497](https://github.com/GluuFederation/flex/issues/497) ([d2e94a4](https://github.com/GluuFederation/flex/commit/d2e94a4067c84674860894623f282b904eecb099))


### Bug Fixes

* **admin-ui:** fix edit and view pages issue ([90f396a](https://github.com/GluuFederation/flex/commit/90f396a7687384b55067f467b1d003acdaf7ea36))
* prepare for 5.0.0-9 release ([716d309](https://github.com/GluuFederation/flex/commit/716d309350f5713b96f482dde9e0a543e5e62286))
* redirect_uris is mandatory if grant_types is not selected [#807](https://github.com/GluuFederation/flex/issues/807) ([a986eb0](https://github.com/GluuFederation/flex/commit/a986eb0a81971e3e5355121f4ca1ca1b68b324ca))

## [1.0.8](https://github.com/GluuFederation/flex/compare/admin-ui-v1.0.7...admin-ui-v1.0.8) (2023-03-02)


Expand Down
2 changes: 1 addition & 1 deletion admin-ui/app/components/OuterClick/OuterClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class OuterClick extends React.Component {
}

openSidebar(path){
const exists= path.some(item => item.id === "navToggleBtn")
const exists= path?.some(item => item.id === "navToggleBtn")
if(exists)
return false

Expand Down
5 changes: 0 additions & 5 deletions admin-ui/app/redux/actions/LicenseActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
CHECK_FOR_VALID_LICENSE,
CHECK_FOR_VALID_LICENSE_RESPONSE,
ACTIVATE_CHECK_USER_API,
ACTIVATE_CHECK_LICENCE_API_VALID,
ACTIVATE_CHECK_USER_LICENSE_KEY_RESPONSE,
ACTIVATE_CHECK_USER_LICENSE_KEY,
} from './types'
Expand All @@ -21,10 +20,6 @@ export const checkUserLicenceKey = (payload) => ({
type: ACTIVATE_CHECK_USER_LICENSE_KEY,
payload: { payload },
})
export const checkUserApiKeyResponse = (payload) => ({
type: ACTIVATE_CHECK_LICENCE_API_VALID,
payload: payload,
})
export const checkUserLicenseKeyResponse = (payload) => ({
type: ACTIVATE_CHECK_USER_LICENSE_KEY_RESPONSE,
payload: payload,
Expand Down
2 changes: 0 additions & 2 deletions admin-ui/app/redux/actions/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ export const ACTIVATE_CHECK_USER_API = 'ACTIVATE_CHECK_USER_API'
export const ACTIVATE_CHECK_USER_LICENSE_KEY = 'ACTIVATE_CHECK_USER_LICENSE_KEY'
export const ACTIVATE_CHECK_USER_LICENSE_KEY_RESPONSE =
'ACTIVATE_CHECK_USER_LICENSE_KEY_RESPONSE'
export const ACTIVATE_CHECK_LICENCE_API_VALID =
'ACTIVATE_CHECK_LICENCE_API_VALID'

//OIDC DISCOVERY
export const GET_OIDC_DISCOVERY = 'GET_OIDC_DISCOVERY'
Expand Down
9 changes: 0 additions & 9 deletions admin-ui/app/redux/api/LicenseApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ export default class LicenseApi {
})
}

submitApiKey = (data) => {
const options = {}
options['licenseSpringCredentials'] = data.payload
return new Promise((resolve, reject) => {
this.api.saveLicenseApiCredentials(options, (error, data) => {
handleResponse(error, reject, resolve, data)
})
})
}
submitLicenseKey = (data) => {
const options = {}
options['licenseRequest'] = data.payload
Expand Down
16 changes: 1 addition & 15 deletions admin-ui/app/redux/reducers/LicenseReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,7 @@ export default function licenseReducer(state = INIT_STATE, action) {
isLoading: true,
error: '',
}
case ACTIVATE_CHECK_LICENCE_API_VALID:
if (action.payload.apiResult) {
return {
...state,
isLicenceAPIkeyValid: action.payload,
error: '',
isLoading: false,
}
} else {
return {
...state,
error: action.payload.responseMessage,
isLoading: false,
}
}

case ACTIVATE_CHECK_USER_LICENSE_KEY_RESPONSE:
if (action.payload.apiResult) {
return {
Expand Down
16 changes: 2 additions & 14 deletions admin-ui/app/redux/sagas/LicenseSaga.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { checkLicensePresentResponse } from '../actions'
import LicenseApi from '../api/LicenseApi'
import { getClient, getClientWithToken } from '../api/base'
import {
checkUserApiKeyResponse,
checkUserLicenseKeyResponse,
} from '../actions'
import {
Expand Down Expand Up @@ -46,15 +45,7 @@ function* checkLicensePresentWorker() {
yield put(checkLicensePresentResponse())
}

function* activateCheckUserApi({ payload }) {
try {
const licenseApi = yield* getApiTokenWithDefaultScopes()
const response = yield call(licenseApi.submitApiKey, payload)
yield put(checkUserApiKeyResponse(response))
} catch (error) {
console.log(error)
}
}

function* activateCheckUserLicenseKey({ payload }) {
try {
const licenseApi = yield* getApiTokenWithDefaultScopes()
Expand All @@ -71,15 +62,12 @@ export function* checkLicensePresentWatcher() {
yield takeEvery(ACTIVATE_CHECK_USER_LICENSE_KEY, activateCheckUserLicenseKey)
}

export function* activateCheckApiKeyWatcher() {
yield takeEvery(ACTIVATE_CHECK_USER_API, activateCheckUserApi)
}

/**
* License Root Saga
*/
export default function* rootSaga() {
yield all([
fork(checkLicensePresentWatcher),
fork(activateCheckApiKeyWatcher),
])
}
Loading

0 comments on commit adc3371

Please sign in to comment.