-
Notifications
You must be signed in to change notification settings - Fork 2
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 #266 from uselagoon/core-api
refactor: use compose from uselagoon/lagoon
- Loading branch information
Showing
13 changed files
with
129 additions
and
211 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
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,62 @@ | ||
# upstream | ||
CI_BUILD_TAG ?= lagoon-ui | ||
CORE_REPO=https://github.com/uselagoon/lagoon.git | ||
CORE_TREEISH=main | ||
CYPRESS_BASE=cypress/base:20.13.1 | ||
|
||
LAGOON_CORE_IMAGE_REPO=testlagoon | ||
LAGOON_CORE_IMAGE_TAG=main | ||
|
||
.PHONY: yarn-start-ui | ||
yarn-start-ui: | ||
export GRAPHQL_API=http://localhost:3000/graphql \ | ||
&& export KEYCLOAK_API=http://localhost:8088/auth \ | ||
&& yarn install \ | ||
&& yarn build \ | ||
&& yarn start \ | ||
|
||
# run-cypress: | ||
.PHONY: start-ui | ||
start-ui: development-api | ||
export GRAPHQL_API=http://localhost:3000/graphql \ | ||
&& export KEYCLOAK_API=http://localhost:8088/auth \ | ||
&& export NODE_ENV=production \ | ||
&& export NODE_PORT=3003 \ | ||
&& export LAGOON_UI_TOURS_ENABLED=disabled \ | ||
&& docker compose -p $(CI_BUILD_TAG) --compatibility up --build -d ui | ||
|
||
.PHONY: development-api | ||
development-api: | ||
export LAGOON_CORE=$$(mktemp -d ./lagoon-core.XXX) \ | ||
&& export GRAPHQL_API=http://localhost:3000/graphql \ | ||
&& export KEYCLOAK_API=http://localhost:8088/auth \ | ||
&& git clone $(CORE_REPO) "$$LAGOON_CORE" \ | ||
&& cd "$$LAGOON_CORE" \ | ||
&& git checkout $(CORE_TREEISH) \ | ||
&& IMAGE_REPO=$(LAGOON_CORE_IMAGE_REPO) IMAGE_REPO_TAG=$(LAGOON_CORE_IMAGE_TAG) COMPOSE_STACK_NAME=core-$(CI_BUILD_TAG) docker compose -p core-$(CI_BUILD_TAG) pull \ | ||
&& IMAGE_REPO=$(LAGOON_CORE_IMAGE_REPO) IMAGE_REPO_TAG=$(LAGOON_CORE_IMAGE_TAG) COMPOSE_STACK_NAME=core-$(CI_BUILD_TAG) $(MAKE) compose-api-logs-development | ||
|
||
.PHONY: run-cypress-with-development-api | ||
run-cypress-with-development-api: start-ui | ||
$(MAKE) run-cypress | ||
|
||
.PHONY: run-cypress | ||
run-cypress: | ||
export GRAPHQL_API=http://localhost:3000/graphql \ | ||
&& export KEYCLOAK_API=http://localhost:8088/auth \ | ||
&& export UI_URL=http://localhost:3003 \ | ||
&& docker run --rm -it --network host --name ct-$(CI_BUILD_TAG) \ | ||
--volume "$$(pwd):/workdir" -w /workdir \ | ||
-e cypress_api=$$GRAPHQL_API \ | ||
-e cypress_keycloak=$$KEYCLOAK_API \ | ||
-e cypress_url=$$UI_URL \ | ||
--entrypoint=/bin/bash $(CYPRESS_BASE) ./cypress/run.sh | ||
|
||
.PHONY: development-api-down | ||
development-api-down: | ||
docker compose -p core-$(CI_BUILD_TAG) --compatibility down -v --remove-orphans | ||
|
||
.PHONY: down | ||
down: | ||
$(MAKE) development-api-down | ||
docker compose -p $(CI_BUILD_TAG) --compatibility down -v --remove-orphans |
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 @@ export default defineConfig({ | |
e2e: { | ||
env: { | ||
api: 'http://0.0.0.0:33000/graphql', | ||
keycloak: 'http://0.0.0.0:38088', | ||
keycloak: 'http://0.0.0.0:38088/auth', | ||
url: 'http://0.0.0.0:3000', | ||
user_guest: '[email protected]', | ||
user_reporter: '[email protected]', | ||
|
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,11 @@ | ||
#!/bin/bash | ||
|
||
# create cache for repeat runs | ||
mkdir -p /workdir/cypress_cache | ||
ln -s /workdir/cypress_cache /root/.cache | ||
|
||
yarn --frozen-lockfile | ||
# run the tests | ||
yarn cypress:runRbac | ||
yarn cypress:runGeneral | ||
yarn cypress:runOrganizations |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.