Skip to content
Snippets Groups Projects
Commit b5db14f4 authored by Mart van Santen's avatar Mart van Santen
Browse files

Merge branch '102-remove-old-panel-from-code' into 103-add-login-panel-ci-cd-to-create-docker-image

parents 6efee1b2 f2e3b7c9
No related branches found
No related tags found
2 merge requests!68Merge loginpanel into main and release 0.5.0,!57Resolve "Add login panel CI/CD to create (docker) image"
Pipeline #9836 failed with stages
in 7 seconds
......@@ -57,18 +57,16 @@ pylint:
- .gitlab-ci.yml
# TODO: This integration testing is the old test. This need to be modified
# and will happen in the issue which is about integration the login
# image & testing that
behave-integration:
stage: integration-test
services:
- name: postgres:latest
alias: postgres
- name: ${CI_REGISTRY_IMAGE}/login_provider:${CI_COMMIT_REF_NAME}
alias: login
- name: ${CI_REGISTRY_IMAGE}/consent_provider:${CI_COMMIT_REF_NAME}
alias: consent
- name: ${CI_REGISTRY_IMAGE}/logout_provider:${CI_COMMIT_REF_NAME}
alias: logout
- name: docker.io/oryd/hydra:v1.8
- name: docker.io/oryd/hydra:v1.10.7-alpine
alias: hydra
command:
- serve
......@@ -76,8 +74,6 @@ behave-integration:
- --dangerous-force-http
- --dangerous-allow-insecure-redirect-urls
- "http://oidc:5000/callback"
- name: open.greenhost.net:4567/stackspin/user-panel/backend:main
alias: backend
- name: ${CI_REGISTRY_IMAGE}/integration_test_app:${CI_COMMIT_REF_NAME}
alias: oidc
variables:
......@@ -118,28 +114,29 @@ behave-integration:
FLASK_ENV: "development"
image: ${CI_REGISTRY_IMAGE}/integration_test:${CI_COMMIT_REF_NAME}
script:
- echo "I am skipped today!"
# Create user and application objects
- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000
- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME2} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL2} backend:5000
- /bin/bash user-panel/backend/utils/create-application.bash ${KEY} "Application used for testing" backend:5000
- /bin/bash user-panel/backend/utils/create-role.bash ${ROLE} backend:5000
- /bin/bash user-panel/backend/utils/grant-access.bash ${TESTUSER_USERNAME} ${KEY} backend:5000
- /bin/bash user-panel/backend/utils/assign-role.bash ${TESTUSER_USERNAME} ${ROLE} backend:5000
#- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL} backend:5000
#- /bin/bash user-panel/backend/utils/create-user.bash ${TESTUSER_USERNAME2} ${TESTUSER_PASSWORD} ${TESTUSER_EMAIL2} backend:5000
#- /bin/bash user-panel/backend/utils/create-application.bash ${KEY} "Application used for testing" backend:5000
#- /bin/bash user-panel/backend/utils/create-role.bash ${ROLE} backend:5000
#- /bin/bash user-panel/backend/utils/grant-access.bash ${TESTUSER_USERNAME} ${KEY} backend:5000
#- /bin/bash user-panel/backend/utils/assign-role.bash ${TESTUSER_USERNAME} ${ROLE} backend:5000
# Wait for 60s for hydra to become available. Then create the oauth2 client object
- while [[ $HYDRAADMINSTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRAADMINSTATUS=`curl http://hydra:4445/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
- /bin/bash test/create-hydra-client.bash ${KEY} ${SECRET} http://hydra:4445 http://oidc:5000/callback http://oidc:5000/ http://oidc:5000/logout
- cd test/integration_tests/test/behave/
- TIMER=0
- while [[ $HYDRASTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRASTATUS=`curl http://hydra:4444/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
- >
python3 -m behave
-D headless=True
-D url=http://oidc:5000
-D username=${TESTUSER_USERNAME}
-D username2=${TESTUSER_USERNAME2}
-D password=${TESTUSER_PASSWORD}
-D email=${TESTUSER_EMAIL}
-D role=${ROLE}
#- while [[ $HYDRAADMINSTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRAADMINSTATUS=`curl http://hydra:4445/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
#- /bin/bash test/create-hydra-client.bash ${KEY} ${SECRET} http://hydra:4445 http://oidc:5000/callback http://oidc:5000/ http://oidc:5000/logout
#- cd test/integration_tests/test/behave/
#- TIMER=0
#- while [[ $HYDRASTATUS -ne "200" && 60 -ge $TIMER ]]; do HYDRASTATUS=`curl http://hydra:4444/health/ready -o /dev/null -w "%{http_code}"` || TIMER=$TIMER+5 && sleep 5 ; done
#- >
# python3 -m behave
# -D headless=True
# -D url=http://oidc:5000
# -D username=${TESTUSER_USERNAME}
# -D username2=${TESTUSER_USERNAME2}
# -D password=${TESTUSER_PASSWORD}
# -D email=${TESTUSER_EMAIL}
# -D role=${ROLE}
artifacts:
paths:
- test/integration_tests/test/behave/screenshots/
......
# Local dev with Kratos
# Development
The main role for this repo is provide Single-Sign-On. The architecture to make
this happen has a lot of moving components. A quick overview:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment