-
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.
refactor: use compose from uselagoon/lagoon
- Loading branch information
1 parent
67d9718
commit d4afb43
Showing
11 changed files
with
111 additions
and
193 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,57 @@ | ||
# upstream | ||
CI_BUILD_TAG ?= lagoon-ui | ||
CORE_REPO=https://github.com/uselagoon/lagoon.git | ||
CORE_TREEISH=make-export-refactoring | ||
CYPRESS_BASE=cypress/base:20.13.1 | ||
|
||
.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: test-with-api | ||
export GRAPHQL_API=http://localhost:3000/graphql \ | ||
&& export KEYCLOAK_API=http://localhost:8088/auth \ | ||
&& export NODE_ENV=production \ | ||
&& export NODE_PORT=3003 \ | ||
&& docker compose -p $(CI_BUILD_TAG) --compatibility up --build -d ui | ||
|
||
.PHONY: test-with-api | ||
test-with-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=testlagoon IMAGE_REPO_TAG=main COMPOSE_STACK_NAME=core-$(CI_BUILD_TAG) $(MAKE) compose-api-logs-development | ||
|
||
.PHONY: run-cypress-with-test-api | ||
run-cypress-with-test-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: test-api-down | ||
test-api-down: | ||
docker-compose -p core-$(CI_BUILD_TAG) --compatibility down -v --remove-orphans | ||
|
||
.PHONY: down | ||
down: | ||
$(MAKE) test-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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/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.
This file was deleted.
Oops, something went wrong.