diff --git "a/train.csv" "b/train.csv" deleted file mode 100644--- "a/train.csv" +++ /dev/null @@ -1,44076 +0,0 @@ -text -# Java Maven CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-java/ for more details -# -version: 2 -jobs: -checkout_code: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -=- checkout -- run: -command: | -mkdir ~/tmp -"for folder in `git log --format="""" --name-only ${CIRCLE_COMPARE_URL##http*/} | cut -d""/"" -f1 | sort -u`; do" -"echo ""$folder will be built in this run""" -touch ~/tmp/$folder.txt -done -extract=`mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout` -version=${extract/SNAPSHOT/$(git rev-parse --short HEAD)} -touch ~/tmp/$version.tmp -working_directory: auth -- save_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -paths: -- ~/ -run_auth_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/auth.txt ]; then -"echo ""[BUILDING] Auth""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Auth""" -fi -working_directory: auth -- save_cache: -paths: -- auth/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-auth -run_booking_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/booking.txt ]; then -"echo ""[BUILDING] Booking""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Booking""" -fi -working_directory: booking -- save_cache: -paths: -- booking/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-booking -run_report_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/report.txt ]; then -"echo ""[BUILDING] Report""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Report""" -fi -working_directory: report -- save_cache: -paths: -- report/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-report -run_room_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/room.txt ]; then -"echo ""[BUILDING] Room""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Room""" -fi -working_directory: room -- save_cache: -paths: -- room/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-room -run_branding_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/branding.txt ]; then -"echo ""[BUILDING] Branding""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Branding""" -fi -working_directory: branding -- save_cache: -paths: -- branding/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-branding -run_message_build: -docker: -- image: cimg/openjdk:15.0 -environment: -MAVEN_OPTS: -Xmx3200m -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -if [ -f ~/tmp/message.txt ]; then -"echo ""[BUILDING] Message""" -mvn clean install -Drevision=$(git rev-parse --short HEAD) -else -"echo ""[SKIPPING] Message""" -fi -working_directory: message -- save_cache: -paths: -- message/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-message -run_assets_tests: -docker: -- image: cimg/openjdk:15.0-node -resource_class: large -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -name: Startup local proxy -background: true -command: | -npm install --legacy-peer-deps -npm start -working_directory: .utilities/rbp-proxy/local/ -- run: -name: Install Sauce Connect Proxy -command: | -cd /tmp -curl https://saucelabs.com/downloads/sc-4.6.2-linux.tar.gz -o saucelabs.tar.gz -tar -xzf saucelabs.tar.gz -chmod a+x sc-4.6.2-linux/bin/sc -sudo cp sc-4.6.2-linux/bin/sc /usr/local/bin -sc --version -- run: -command: | -if [ -f ~/tmp/assets.txt ]; then -"echo ""[BUILDING] Assets""" -npm install --legacy-peer-deps -npm test -- --runInBand -npm run build -cd .. -cd api -"if [[ -z ""${APPLITOOLS_API_KEY}"" ]]; then" -"printf ""Skipping visual checks because no applitools api key has been set. Assign a key to APPLITOOLS_API_KEY to run visual checks""" -mvn install -Drevision=$(git rev-parse --short HEAD) -else -sc -u ${SAUCE_USERNAME} -k ${SAUCE_ACCESS_KEY} -x https://eu-central-1.saucelabs.com/rest/v1 --se-port 4445 & -wget --retry-connrefused --no-check-certificate -T 60 localhost:4445 -mvn install -Drevision=$(git rev-parse --short HEAD) -P ci -fi -else -"echo ""[SKIPPING] Assets""" -fi -working_directory: assets/js -environment: -BROWSER: remote -- save_cache: -paths: -- assets/ -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-assets -build_auth_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-auth -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/auth/target/restful-booker-platform-auth-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Auth""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_auth:$(ls target/restful-booker-platform-auth-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_auth:$(ls target/restful-booker-platform-auth-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Auth""" -fi -working_directory: auth -build_booking_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-booking -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/booking/target/restful-booker-platform-booking-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Booking""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_booking:$(ls target/restful-booker-platform-booking-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_booking:$(ls target/restful-booker-platform-booking-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Booking""" -fi -working_directory: booking -build_report_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-report -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/report/target/restful-booker-platform-report-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Report""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_report:$(ls target/restful-booker-platform-report-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_report:$(ls target/restful-booker-platform-report-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Report""" -fi -working_directory: report -build_room_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-room -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/room/target/restful-booker-platform-room-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Room""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_room:$(ls target/restful-booker-platform-room-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_room:$(ls target/restful-booker-platform-room-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Room""" -fi -working_directory: room -build_branding_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-branding -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/branding/target/restful-booker-platform-branding-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Branding""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_branding:$(ls target/restful-booker-platform-branding-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_branding:$(ls target/restful-booker-platform-branding-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Branding""" -fi -working_directory: branding -build_message_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-message -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/message/target/restful-booker-platform-message-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Message""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_message:$(ls target/restful-booker-platform-message-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_message:$(ls target/restful-booker-platform-message-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Message""" -fi -working_directory: message -build_assets_docker_image: -docker: -- image: cimg/openjdk:15.0-node -steps: -- restore_cache: -key: v1-dependencies-{{ .Environment.CIRCLE_SHA1 }}-assets -- setup_remote_docker: -docker_layer_caching: false -- run: -command: | -"if [ -f ~/project/assets/api/target/restful-booker-platform-assets-*-exec.jar ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[BUILDING] Assets""" -docker login -u $DOCKER_USER -p $DOCKER_PASS -docker build -t mwinteringham/restfulbookerplatform_assets:$(ls api/target/restful-booker-platform-assets-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) . -docker push mwinteringham/restfulbookerplatform_assets:$(ls api/target/restful-booker-platform-assets-*-exec.jar | cut -d '-' -f 5 | cut -c1-11) -else -"echo ""[SKIPPING] Assets""" -fi -working_directory: assets -deploy_auth_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/auth.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Auth""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-auth""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-auth -e profile='prod' -e HONEYCOMB_API_KEY='$HONEYCOMB_API_KEY' -e dbRefresh='10' -p 3004:3004 mwinteringham/restfulbookerplatform_auth:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Auth""" -fi -deploy_booking_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/booking.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Booking""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-booking""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-booking -p 3000:3000 -e profile='prod' -e dbRefresh='10' -e HONEYCOMB_API_KEY='$HONEYCOMB_API_KEY' mwinteringham/restfulbookerplatform_booking:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Booking""" -fi -deploy_report_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/report.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Report""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-report""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-report -e profile='prod' -p 3005:3005 mwinteringham/restfulbookerplatform_report:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Report""" -fi -deploy_room_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/room.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Room""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-room""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-room -p 3001:3001 -e profile='prod' -e dbRefresh='10' mwinteringham/restfulbookerplatform_room:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Room""" -fi -deploy_branding_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/branding.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Branding""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-branding""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-branding -p 3002:3002 -e profile='prod' -e dbRefresh='10' -e HONEYCOMB_API_KEY='$HONEYCOMB_API_KEY' mwinteringham/restfulbookerplatform_branding:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Branding""" -fi -deploy_message_docker_image: -docker: -- image: cimg/openjdk:15.0 -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/message.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Message""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-message""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-message -p 3006:3006 -e profile='prod' -e dbRefresh='10' mwinteringham/restfulbookerplatform_message:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Message""" -fi -deploy_assets_docker_image: -docker: -- image: cimg/openjdk:15.0-node -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- add_ssh_keys: -fingerprints: -"=- ""1c:eb:8d:d5:b6:56:34:09:bd:db:bb:de:d2:94:42:33""" -- run: -command: | -"if [ -f /home/circleci/tmp/assets.txt ] && [ $CIRCLE_BRANCH == ""trunk"" ]; then" -"echo ""[DEPLOYING] Report""" -"version=`find ~/tmp/*.tmp -printf ""%f\n""`" -ssh-keyscan $AWS_IP >> $HOME/.ssh/known_hosts -"ssh ec2-user@$AWS_IP 'container=`sudo docker ps -aqf ""name=rbp-assets""` && sudo docker stop $container && sudo docker rm $container && sudo docker run -d --network rbp-host --name rbp-assets -e profile='prod' -p 3003:3003 mwinteringham/restfulbookerplatform_assets:'${version%.*}' && exit'" -else -"echo ""[SKIPPING] Assets""" -fi -run_e2e_checks: -docker: -- image: cimg/openjdk:15.0-browsers -steps: -- restore_cache: -key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} -- run: -command: | -"if [ $CIRCLE_BRANCH == ""trunk"" ]; then" -node prod_monitor.js -fi -working_directory: .utilities/monitor -- run: -command: | -"if [ $CIRCLE_BRANCH == ""trunk"" ]; then" -mvn clean test -Drevision=$(git rev-parse --short HEAD) -fi -working_directory: end-to-end-tests -environment: -TARGET: production -BROWSER: remote -workflows: -version: 2 -build-test-and-deploy: -jobs: -=- checkout_code -- run_auth_build: -requires: -=- checkout_code -- run_booking_build: -requires: -=- checkout_code -- run_report_build: -requires: -=- checkout_code -- run_room_build: -requires: -=- checkout_code -- run_branding_build: -requires: -=- checkout_code -- run_message_build: -requires: -=- checkout_code -- run_assets_tests: -requires: -=- checkout_code -- build_auth_docker_image: -requires: -=- run_auth_build -- build_booking_docker_image: -requires: -=- run_booking_build -- build_report_docker_image: -requires: -=- run_report_build -- build_room_docker_image: -requires: -=- run_room_build -- build_branding_docker_image: -requires: -=- run_branding_build -- build_message_docker_image: -requires: -=- run_message_build -- build_assets_docker_image: -requires: -=- run_assets_tests -- deploy_auth_docker_image: -requires: -=- build_auth_docker_image -- deploy_booking_docker_image: -requires: -=- build_booking_docker_image -- deploy_report_docker_image: -requires: -=- build_report_docker_image -- deploy_room_docker_image: -requires: -=- build_room_docker_image -- deploy_branding_docker_image: -requires: -=- build_branding_docker_image -- deploy_message_docker_image: -requires: -=- build_message_docker_image -- deploy_assets_docker_image: -requires: -=- build_assets_docker_image -- run_e2e_checks: -requires: -=- deploy_auth_docker_image -=- deploy_booking_docker_image -=- deploy_report_docker_image -=- deploy_room_docker_image -=- deploy_assets_docker_image -=- deploy_branding_docker_image -=- deploy_message_docker_image ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team1.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team1.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team2.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team2.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team3.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team3.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team4.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team4.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team5.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team5.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team6.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team6.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://team7.automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: team7.automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-booking -spec: -selector: -matchLabels: -run: rbp-booking -replicas: 1 -template: -metadata: -labels: -run: rbp-booking -spec: -containers: -=- name: rbp-booking -image: mwinteringham/restfulbookerplatform_booking:latest -imagePullPolicy: Always -env: -=- name: dbRefresh -"value: ""10""" -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3000 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3000 -path: /booking/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-room -spec: -selector: -matchLabels: -run: rbp-room -replicas: 1 -template: -metadata: -labels: -run: rbp-room -spec: -containers: -=- name: rbp-room -image: mwinteringham/restfulbookerplatform_room:latest -imagePullPolicy: Always -env: -=- name: dbRefresh -"value: ""10""" -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3001 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3001 -path: /room/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-branding -spec: -selector: -matchLabels: -run: rbp-branding -replicas: 1 -template: -metadata: -labels: -run: rbp-branding -spec: -containers: -=- name: rbp-branding -image: mwinteringham/restfulbookerplatform_branding:latest -imagePullPolicy: Always -env: -=- name: dbRefresh -"value: ""10""" -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3002 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3002 -path: /branding/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-assets -spec: -selector: -matchLabels: -run: rbp-assets -replicas: 1 -template: -metadata: -labels: -run: rbp-assets -spec: -containers: -=- name: rbp-assets -image: mwinteringham/restfulbookerplatform_assets:latest -imagePullPolicy: Always -ports: -- containerPort: 3003 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3003 -path: /actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-auth -spec: -selector: -matchLabels: -run: rbp-auth -replicas: 1 -template: -metadata: -labels: -run: rbp-auth -spec: -containers: -=- name: rbp-auth -image: mwinteringham/restfulbookerplatform_auth:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3004 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3004 -path: /auth/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-report -spec: -selector: -matchLabels: -run: rbp-report -replicas: 1 -template: -metadata: -labels: -run: rbp-report -spec: -containers: -=- name: rbp-report -image: mwinteringham/restfulbookerplatform_report:latest -imagePullPolicy: Always -env: -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3005 -resources: -requests: -"memory: ""512Mi""" -"cpu: ""250m""" -limits: -"memory: ""1024Mi""" -"cpu: ""500m""" -readinessProbe: -httpGet: -port: 3005 -path: /report/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -name: rbp-message -spec: -selector: -matchLabels: -run: rbp-message -replicas: 1 -template: -metadata: -labels: -run: rbp-message -spec: -containers: -=- name: rbp-message -image: mwinteringham/restfulbookerplatform_message:latest -imagePullPolicy: Always -env: -=- name: dbRefresh -"value: ""10""" -=- name: cors -"value: ""https://automationintesting.online""" -ports: -- containerPort: 3006 -resources: -requests: -"memory: ""768Mi""" -"cpu: ""500m""" -limits: -"memory: ""1024Mi""" -"cpu: ""1000m""" -readinessProbe: -httpGet: -port: 3006 -path: /message/actuator/health -initialDelaySeconds: 1 -periodSeconds: 5 -timeoutSeconds: 4 -successThreshold: 2 -failureThreshold: 3 ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-booking -labels: -app: rbp-booking -spec: -type: NodePort -ports: -- port: 3000 -protocol: TCP -nodePort: 32147 -targetPort: 3000 -selector: -run: rbp-booking ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-room -labels: -app: rbp-room -spec: -type: NodePort -ports: -- port: 3001 -protocol: TCP -nodePort: 32148 -targetPort: 3001 -selector: -run: rbp-room ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-branding -labels: -app: rbp-branding -spec: -type: NodePort -ports: -- port: 3002 -protocol: TCP -nodePort: 32149 -targetPort: 3002 -selector: -run: rbp-branding ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-assets -labels: -app: rbp-assets -spec: -type: NodePort -ports: -- port: 3003 -protocol: TCP -nodePort: 32150 -targetPort: 3003 -selector: -run: rbp-assets ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-auth -labels: -app: rbp-auth -spec: -type: NodePort -ports: -- port: 3004 -protocol: TCP -nodePort: 32151 -targetPort: 3004 -selector: -run: rbp-auth ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-report -labels: -app: rbp-report -spec: -type: NodePort -ports: -- port: 3005 -protocol: TCP -nodePort: 32152 -targetPort: 3005 -selector: -run: rbp-report ---- -apiVersion: v1 -kind: Service -metadata: -name: rbp-message -labels: -app: rbp-message -spec: -type: NodePort -ports: -- port: 3006 -protocol: TCP -nodePort: 32153 -targetPort: 3006 -selector: -run: rbp-message ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -name: rbp-ingress -spec: -rules: -=- host: automationintesting.online -http: -paths: -- path: /booking/* -backend: -serviceName: rbp-booking -servicePort: 3000 -- path: /room/* -backend: -serviceName: rbp-room -servicePort: 3001 -- path: /branding/* -backend: -serviceName: rbp-branding -servicePort: 3002 -- path: /auth/* -backend: -serviceName: rbp-auth -servicePort: 3004 -- path: /report/* -backend: -serviceName: rbp-report -servicePort: 3005 -- path: /message/* -backend: -serviceName: rbp-message -servicePort: 3006 -- path: / -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /js/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /images/* -backend: -serviceName: rbp-assets -servicePort: 3003 -- path: /actuator/* -backend: -serviceName: rbp-assets -servicePort: 3003 -# Wiremock -Wiremock is a test double for Web APIs allowing you to create fake HTTP requests and responses that act like a real Web API. -## Using Wiremock -"To start up Wiremock, navigate to this folder and run:" -``` -java -jar wiremock-standalone.jar --port {your port number} -``` -This will start up Wiremock assuming nothing else is running on the port number you gave it -## Creating requests and responses -Wiremock-standalone can be programmed in two different ways. The first is creating .json mappings and adding them to the ```mappings folder```. When you start up Wiremock these mapping files will be loaded into Wiremock. -"The other option is to programme 'over the wire', which means creating an HTTP request with your mapping details and sending it to Wiremock over HTTP." -"To learn more, Wiremock has very well laid out documentation on how to use it (here)[http://wiremock.org/docs]" -{ -"""request"": {" -"""method"": ""GET""," -"""url"": ""/branding/""" -"}," -"""response"": {" -"""status"": 500," -"""headers"" : {" -"""Content-Type"": ""application/json;charset=UTF-8""" -"}," -"""body"": ""{\""name\"":\""Shady Meadows B&B\"",\""map\"":{\""latitude\"":52.6351204,\""longitude\"":1.2733774},\""logoUrl\"":\""https://www.mwtestconsultancy.co.uk/img/rbp-logo.png\"",\""description\"":\""Welcome to Shady Meadows, a delightful Bed & Breakfast nestled in the hills on Newingtonfordburyshire. A place so beautiful you will never want to leave. All our rooms have comfortable beds and we provide breakfast from the locally sourced supermarket. It is a delightful place.\"",\""contact\"":{\""name\"":\""Shady Meadows B&B\"",\""address\"":\""The Old Farmhouse, Shady Street, Newfordburyshire, NE1 410S\"",\""phone\"":\""012345678901\"",\""email\"":\""fake@fakeemail.com\""}}""" -} -} -{ -"""request"": {" -"""method"": ""GET""," -"""url"": ""/message/count""" -"}," -"""response"": {" -"""status"": 200," -"""headers"" : {" -"""Content-Type"": ""application/json;charset=UTF-8""" -"}," -"""body"": ""{\""count\"": 10}""" -} -} -{ -"""request"": {" -"""method"": ""GET""," -"""url"": ""/message/1""" -"}," -"""response"": {" -"""status"": 200," -"""headers"" : {" -"""Content-Type"": ""application/json;charset=UTF-8""" -"}," -"""body"": ""{\""name\"" : \""Mark Winteringham\"",\""email\"" : \""mark@mwtestconsultancy.co.uk\"",\""phone\"" : \""01821 912812\"",\""subject\"" : \""Subject description here\"",\""description\"" : \""Lorem ipsum dolores est\""}""" -} -} -{ -"""request"": {" -"""method"": ""GET""," -"""url"": ""/message""" -"}," -"""response"": {" -"""status"": 200," -"""headers"" : {" -"""Content-Type"": ""application/json;charset=UTF-8""" -"}," -"""body"": ""{\""messages\"" : [{\""id\"" : 1,\""name\"" : \""Mark Winteringham\"",\""subject\"" : \""Subject description here\""}, {\""id\"" : 2, \""name\"" : \""James Dean\"",\""subject\"" : \""Another description here\""}, {\""id\"" : 3, \""name\"" : \""Janet Samson\"",\""subject\"" : \""Lorem ipsum dolores est\""}]}""" -} -} -{ -"""request"": {" -"""method"": ""GET""," -"""url"": ""/report/""" -"}," -"""response"": {" -"""status"": 200," -"""headers"" : {" -"""Vary"": ""Origin""," -"""Vary"": ""Access-Control-Request-Method""," -"""Vary"": ""Access-Control-Request-Headers""," -"""Access-Control-Allow-Origin"": ""http://localhost:3003""," -"""Access-Control-Allow-Credentials"": ""true""," -"""Content-Type"": ""application/json;charset=UTF-8""," -"""Transfer-Encoding"": ""chunked""" -"}," -"""body"": ""{\n\t\""report\"": [{\n\t\t\""start\"": \""2019-04-26\"",\n\t\t\""end\"": \""2019-04-29\"",\n\t\t\""title\"": \""James Dean - Room: 101\""\n\t}, {\n\t\t\""start\"": \""2019-04-10\"",\n\t\t\""end\"": \""2019-04-13\"",\n\t\t\""title\"": \""Mark Winteringham - Room: 102\""\n\t}]\n}""" -} -} -{ -"""request"": {" -"""method"": ""POST""," -"""url"": ""/auth/validate""" -"}," -"""response"": {" -"""status"": 200," -"""headers"" : {" -"""X-Application-Context"": ""application:3004""," -"""Access-Control-Allow-Origin"": ""http://localhost:3003""," -"""Vary"": ""Origin""," -"""Access-Control-Allow-Credentials"": ""true""," -"""Content-Length"": ""0""" -} -} -} -const http = require('http'); -const https = require('https'); -"makeHttpRequest = (host, apiName) => {" -"http.get(host + apiName + 'actuator/health', (response) => {" -let data = ''; -"response.on('data', (chunk) => {" -data += chunk; -}); -"response.on('end', () => {" -if(response.statusCode !== 200){ -process.stdout.write('.'); -setTimeout(() => { -"makeHttpRequest(host, apiName);" -"}, 5000);" -} else { -process.stdout.write('\n' + apiName + ' ready '); -} -}); -"}).on('error', () => {" -process.stdout.write('.') -setTimeout(() => { -"makeHttpRequest(host, apiName);" -"}, 5000);" -}); -} -"makeHttpsRequest = (host, apiName) => {" -"https.get(host + apiName + 'actuator/health', (response) => {" -let data = ''; -"response.on('data', (chunk) => {" -data += chunk; -}); -"response.on('end', () => {" -if(response.statusCode !== 200){ -process.stdout.write('.'); -setTimeout(() => { -"makeHttpsRequest(host, apiName);" -"}, 5000);" -} else { -process.stdout.write('\n' + apiName + ' ready '); -} -}); -"}).on('error', () => {" -process.stdout.write('.') -setTimeout(() => { -"makeHttpsRequest(host, apiName);" -"}, 5000);" -}); -} -"exports.checkForLife = (protocol, host, apiName) => {" -if(protocol === 'https'){ -"makeHttpsRequest(host, apiName);" -} else if (protocol === 'http'){ -"makeHttpRequest(host, apiName, (requestResult) => {" -if(requestResult !== 200){ -setTimeout(() => { -"makeHttpRequest(host, apiName)" -"}, 5000);" -} -}); -} else { -"console.log(""Protocol not recognised. I can only handle 'http' or 'https'"")" -} -} -const apiMonitor = require('./apimonitor.js'); -"process.stdout.write(""Waiting for RBP to turn on"");" -"apiMonitor.checkForLife('http', 'http://localhost:3000', '/booking/');" -"apiMonitor.checkForLife('http', 'http://localhost:3001', '/room/');" -"apiMonitor.checkForLife('http', 'http://localhost:3002', '/branding/');" -"apiMonitor.checkForLife('http', 'http://localhost:3003', '/');" -"apiMonitor.checkForLife('http', 'http://localhost:3004', '/auth/');" -"apiMonitor.checkForLife('http', 'http://localhost:3005', '/report/');" -"apiMonitor.checkForLife('http', 'http://localhost:3006', '/message/');" -const apiMonitor = require('./apimonitor.js'); -"process.stdout.write(""Waiting for RBP to turn on"");" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/booking/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/room/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/branding/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/auth/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/report/');" -"apiMonitor.checkForLife('https', 'https://automationintesting.online', '/message/');" -FROM maven:3.5.2-jdk-8-alpine -ADD . /usr/local/wirebridge -WORKDIR /usr/local/report -COPY . ./ -ENTRYPOINT java -jar Wirebridge-0.0.3.jar -D -# Wirebridge -Wirebridge is a configurable API that helps teams abstract complex data creation tasks behind programmable HTTP requests. -"It is currently being used with RBP as means to quickly create bookings and rooms. To find out more on how to create mappings for Wirebridge, check out its README [https://github.com/mwinteringham/wirebridge](https://github.com/mwinteringham/wirebridge)" -## Setting up -"To run Wirebridge, open up a terminal window and navigate to this folder and run:" -```java -jar Wirebridge-0.0.1.jar``` -You will see logging to show that Wirebridge is up and running. -## Using Wirebridge -Wirebridge has been configured with two mappings that you can make HTTP requests against to create a single Room or a single Booking per API call. -You can download the HTTP requests as a Postman collection here: [https://www.getpostman.com/collections/5805c3bde8c38353bea9](https://www.getpostman.com/collections/5805c3bde8c38353bea9) -{ -"""request"" : {" -"""method"" : ""POST""," -"""path"" : ""/booking""," -"""parameters"" : [""roomid"", ""firstname"", ""lastname"", ""depositpaid"", ""checkin"", ""checkout""]" -"}," -"""sql"" : {" -"""database"" : ""h2-booking""," -"""query"" : ""INSERT INTO BOOKINGS(roomid, firstname, lastname, depositpaid, checkin, checkout) VALUES(${roomid}, ${firstname}, ${lastname}, ${depositpaid}, ${checkin}, ${checkout});""" -} -} -{ -"""request"" : {" -"""method"" : ""POST""," -"""path"" : ""/room""," -"""parameters"" : [""room_name"", ""type"", ""beds"", ""accessible"", ""details""]" -"}," -"""sql"" : {" -"""database"" : ""h2-room""," -"""query"" : ""INSERT INTO ROOMS(room_name, type, beds, accessible, details) VALUES(${room_name}, ${type}, ${beds}, ${accessible}, ${details});""" -} -} -{ -"""databases"" : [{" -"""name"" : ""h2-booking""," -"""host"" : ""booking:9090""," -"""database"" : ""mem:rbp""," -"""username"" : ""user""," -"""password"" : ""password""," -"""driver"" : ""jdbc:h2:tcp""" -"},{" -"""name"" : ""h2-room""," -"""host"" : ""room:9091""," -"""database"" : ""mem:rbp""," -"""username"" : ""user""," -"""password"" : ""password""," -"""driver"" : ""jdbc:h2:tcp""" -}] -} -{ -"""request"" : {" -"""method"" : ""POST""," -"""path"" : ""/booking/query""," -"""parameters"" : [""roomid"", ""firstname"", ""lastname"", ""depositpaid"", ""checkin"", ""checkout""]" -"}," -"""sql"" : {" -"""database"" : ""h2-booking""," -"""query"" : ""SELECT * FROM BOOKINGS WHERE roomid = ${roomid} AND firstname = ${firstname} AND lastname = ${lastname} AND depositpaid = ${depositpaid} AND checkin = ${checkin} AND checkout = ${checkout};""" -} -} -# restful-booker-platform -A platform of web services that forms a Bed and Breakfast booking system. The platforms primary purpose is for training others on how to explore and test web service platforms as well as strategise and implement automation in testing strategies. -## Requirements -RBP is currently known to work with the following requirements: -- JDK 15.0.2 or higher (Tested with JDK 18) -- Maven 3.6.3 -- Node 16.15.1 -- NPM 8.11.0 -## Building locally -"Assuming you have the above requirements in place, to get started open a terminal/command line window and follow these instructions:" -1. Clone/Download the repository -2. Navigate into the restful-booker-platform root folder -3. Run either ```bash build_locally.sh``` for Linux or Mac or ```build_locally.cmd``` on Windows to build RBP and get it running (It may take a while on the first run as it downloads dependencies) -4. Navigate to http://localhost:8080 to access the site -## Running locally -"Assuming you have successfully built the application at least once, you can now run the app without having to rebuild the whole application." -### Mac / Linux -1. To run without end-to-end checks run: ```run_locally.sh``` -2. To run with end-to-end checks run: ```run_locally.sh -e true``` -### Windows -1. To run without end-to-end checks run: ```run_locally.cmd``` -2. To run with end-to-end checks run: ```run_locally.cmd true``` -### Login -The user login details are: -* Username: admin -* Password: password -## Development -### API details -"The details on running checks, building APIs and additional details on documentation for development can be found in READMEs inside each of the API folders." -### Setting up your own CI/CD for this project -The build process for this project is managed by [CircleCI](https://circleci.com/) which is all managed by the config.yml file in the .circleci folder. To get setup you will need to: -### Running CI tests -Follow these steps to get a CI setup running the tests -1. Fork this repository so that you have your own copy -"2. If you haven't already, create a CircleCI login using your GitHub details. This will connect CircleCI to your GitHub profile." -"3. Head to the Projects page in CircleCI, locate the RBP repository and click setup project." -"4. Go through the steps to for setting up the project, ensuring that it loads in the config.yml from the project (Click use existing config)" -"If you would like to setup CircleCI to run a full deployment, please drop an issue into the repository." -FROM openjdk:15-slim -ADD . /usr/local/assets -WORKDIR /usr/local/assets -ENV profile=dev -COPY api/target ./ -ENTRYPOINT java -jar -Dspring.profiles.active=$profile restful-booker-platform-assets-*.jar -# Restful-booker-assets -The assets API is responsible for serving the UI assets to a browser to give users easy access to the restful-booker-platform. -"The assets folder is broken into two sections: ```api``` and ```js```. The ```js``` folder contains all the HTML, CSS, JavaScript and Images that make up the front end assets to create a single page application which enables UI components to be individually checked before builds. The contents of the ```js``` folder are built using ```webpack``` that bundles the frontend assets and sends them to the ```api```. The ```api``` folder contains code for the assets API that contains one endpoint that serves the frontend assets when requested. The rest of the assets part of the application is then run within the browser with JavaScript taking responsibility to create the HTML." -## Building and running -The building of the assets API is done in two stages. -"1. The frontend assets should be built first so that they are compiled and sent to the ```api``` folder. To do this, navigate to the ```js``` folder and run ```npm run build```" -2. Once the frontend assets are built. Navigate to the ```api``` folder and run ```mvn install``` (Note: Do not run ```mvn clean install``` as this will remove the frontend assets) -"Once built run ```java -jar target/restful-booker-platform-ui-1.0-SNAPSHOT.jar``` in the ```api``` folder. This will start up the API, allowing you to access the UI." -## Running checks -### JS module -To run the ```js``` checks you will need to install Jest globally ```npm install jest -g``` before running either ```npm test``` or ```jest``` -### API module -The ```api``` module contains visual checks that use [Applitools](https://applitools.com/) to run the visual checking. Therefore you will need to set the following environmental variable with your [Applitools](https://applitools.com/) API key: -```APPLITOOLS_API_KEY = MY_API_KEY_ABC1234``` -With that set you can then run ```mvn verify``` -## Documentation -"You can also find out the health of the application by accessing ```http://localhost:3003/actuator/health```. Finally, to access the APIs logfiles, head to ```http://localhost:3003/actuator/logfile```" -"" -"" -4.0.0 -com.automationintesting -restful-booker-platform-assets -1.6.${revision} - -org.springframework.boot -spring-boot-starter-parent -2.7.5 - - - -UTF-8 -SNAPSHOT -true - - - -ci - - -env.skipVisual - - - -false - - - - - - -org.apache.maven.plugins -maven-compiler-plugin -3.8.1 - -15 - - - -org.springframework.boot -spring-boot-maven-plugin - -exec - - - - -repackage - - - - - -org.apache.maven.plugins -maven-surefire-plugin -2.22.0 - - -**/ServeContentTest.java - - - - -maven-failsafe-plugin -2.22.0 - - - -integration-test -verify - - - - - -**/AuthVisualTest.java -**/RoomVisualTest.java -**/HomeVisualTest.java - -${skipVisual} - - - - - - -org.springframework.boot -spring-boot-starter-web - - -org.springframework.boot -spring-boot-starter-actuator - - -org.springframework.boot -spring-boot-starter-test -test - - -org.junit.jupiter -junit-jupiter -5.9.1 -test - - -io.rest-assured -rest-assured -5.3.0 - - - -org.codehaus.groovy -groovy-xml - - -test - - -com.approvaltests -approvaltests -18.5.0 - - -org.seleniumhq.selenium -selenium-java -4.6.0 -test - - -com.applitools -eyes-selenium-java3 -5.0.0 - - -com.xebialabs.restito -restito -1.1.0 - - -com.fasterxml.jackson.core -jackson-core -2.14.0 - - -com.fasterxml.jackson.core -jackson-databind -2.14.0 - - -com.fasterxml.jackson.core -jackson-annotations -2.14.0 - - -io.github.bonigarcia -webdrivermanager -5.3.1 - - - -package com.automationintesting; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; -@SpringBootApplication -@ComponentScan() -public class UiApplication { -public static void main(String[] args) { -"SpringApplication.run(UiApplication.class, args);" -} -} -logging.file.name=ui.log -server.port = 3003 -"management.endpoints.web.exposure.include=health,logfile" -package com.automationintesting.integration.taskanalysis; -import com.applitools.eyes.RectangleSize; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -// This test class extends the class TestSetup meaning we can inherit -// the Before and After hooks to setup Selenium and Applitools -public class AuthVisualTest extends TestSetup { -// We add the @Test annotation so that when JUnit runs it knows which -// methods to run as tests -@Test -// We give the check a clear name to ensure that it is descriptive in -// what it is checking -public void loginVisualTest(){ -"// First, we start Applitools by calling the open method and giving it the Selenium WebDriver object" -// to interact with and then details about the check and finally a fixed browser size that Applitools will -// resize the browser to. -"eyes.open(driver, ""RBP"",""Login Visual Test"", new RectangleSize(1400, 700));" -// Next we use Selenium to navigate to our page under test -"driver.navigate().to(""http://localhost:3003/#/admin"");" -// Close down the banner because we don't want to screenshot that -"driver.findElement(By.cssSelector("".btn-primary"")).click();" -// Finally we trigger the Applitools check by calling 'checkWindow' that will take a screenshot of the browser -// and upload it to Applitools cloud to compare it against a previously stored image to compare the differences -"eyes.checkWindow(""Login state"");" -} -} -package com.automationintesting.integration.taskanalysis; -import com.applitools.eyes.RectangleSize; -import com.xebialabs.restito.semantics.Condition; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp; -import static com.xebialabs.restito.semantics.Action.*; -public class HomeVisualTest extends TestSetup { -@Test -public void homeVisualTest(){ -"// The UI is being checked in a 'stubbed state' meaning there are no backend APIs running. Therefore," -// we can use WireMock to create fake APIs that send stubbed responses back to the UI to make it think -// it is in a specific state. -// First we start by mocking the branding API that will send all the branding API details. We will need -// to create one for the CORS option request and one for the get request. -whenHttp(brandingApi). -"match(Condition.get(""/branding/""))." -"then(ok(), header(""Content-Type"",""application/json""), stringContent(""{\""name\"": \""Shady Meadows B&B\"",\""map\"": {\""latitude\"": 52.6351204,\""longitude\"": 1.2733774},\""logoUrl\"": \""https://www.mwtestconsultancy.co.uk/img/rbp-logo.png\"",\""description\"": \""Welcome to Shady Meadows, a delightful Bed & Breakfast nestled in the hills on Newingtonfordburyshire. A place so beautiful you will never want to leave. All our rooms have comfortable beds and we provide breakfast from the locally sourced supermarket. It is a delightful place.\"",\""contact\"": {\""name\"": \""Shady Meadows B&B\"",\""address\"": \""The Old Farmhouse, Shady Street, Newfordburyshire, NE1 410S\"",\""phone\"": \""012345678901\"",\""email\"": \""fake@fakeemail.com\""}}""));" -"// Finally, we create a stubbed response for the Room API that will fill the UI with Rooms for the" -// rooms listing for us to check. We will need to create one for the CORS option request and one for -// the get request -whenHttp(roomApi). -"match(Condition.get(""/room/""))." -"then(ok(), header(""Content-Type"",""application/json""), stringContent(""{\""rooms\"":[{\""roomid\"":1,\""roomName\"":\""101\"",\""type\"":\""Twin\"",\""accessible\"":false,\""image\"":\""https://www.mwtestconsultancy.co.uk/img/room1.jpg\"",\""description\"":\""Aenean porttitor mauris sit amet lacinia molestie. In posuere accumsan aliquet. Maecenas sit amet nisl massa. Interdum et malesuada fames ac ante.\"",\""features\"":[\""Wifi\"",\""TV\"",\""Safe\""]}]}""));" -"// Next, we start Applitools by calling the open method and giving it the Selenium WebDriver object" -// to interact with and then details about the check and finally a fixed browser size that Applitools will -// resize the browser to. -"eyes.open(driver, ""RBP"",""Home Visual Test"", new RectangleSize(1400, 700));" -eyes.setForceFullPageScreenshot(true); -// Next we use Selenium to navigate to our page under test -"driver.navigate().to(""http://localhost:3003/"");" -// Close down the banner because we don't want to screenshot that -"driver.findElement(By.cssSelector("".btn-primary"")).click();" -// Finally we trigger the Applitools check by calling 'checkWindow' that will take a screenshot of the browser -// and upload it to Applitools cloud to compare it against a previously stored image to compare the differences -"eyes.checkWindow(""Home state"");" -} -} -package com.automationintesting.integration.taskanalysis; -import com.applitools.eyes.RectangleSize; -import com.xebialabs.restito.semantics.Condition; -import org.junit.jupiter.api.Test; -import org.openqa.selenium.By; -import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp; -import static com.xebialabs.restito.semantics.Action.*; -// This test class extends the class TestSetup meaning we can inherit -// the Before and After hooks to setup Selenium and Applitools -public class RoomVisualTest extends TestSetup { -// We add the @Test annotation so that when JUnit runs it knows which -// methods to run as tests -@Test -// We give the check a clear name to ensure that it is descriptive in -// what it is checking -public void roomListVisualTest(){ -"// The UI is being checked in a 'stubbed state' meaning there are no backend APIs running. Therefore," -// we can use WireMock to create fake APIs that send stubbed responses back to the UI to make it think -// it is in a specific state. -"// Next, we mock the branding API that will send all the branding API details." -whenHttp(brandingApi). -"match(Condition.get(""/branding/""))." -"then(ok(), header(""Content-Type"",""application/json""), stringContent(""{\""name\"": \""Shady Meadows B&B\"",\""map\"": {\""latitude\"": 52.6351204,\""longitude\"": 1.2733774},\""logoUrl\"": \""https://www.mwtestconsultancy.co.uk/img/rbp-logo.png\"",\""description\"": \""Welcome to Shady Meadows, a delightful Bed & Breakfast nestled in the hills on Newingtonfordburyshire. A place so beautiful you will never want to leave. All our rooms have comfortable beds and we provide breakfast from the locally sourced supermarket. It is a delightful place.\"",\""contact\"": {\""name\"": \""Shady Meadows B&B\"",\""address\"": \""The Old Farmhouse, Shady Street, Newfordburyshire, NE1 410S\"",\""phone\"": \""012345678901\"",\""email\"": \""fake@fakeemail.com\""}}""));" -"// Once the browser receives the first stubbed response, it will trigger the browser to send a POST response" -// to check if the app is logged in. The second stubbed response below will make the frontend believe it is -// in a logged in state. -whenHttp(authApi). -"match(Condition.post(""/auth/validate""))." -then(ok()); -"// Finally, we create a stubbed response for the Room API that will fill the UI with Rooms for the" -// rooms listing for us to check. -whenHttp(roomApi). -"match(Condition.get(""/room/""))." -"then(ok(), header(""Content-Type"",""application/json""), stringContent(""{\""rooms\"":[{\""roomid\"":1,\""roomName\"":\""101\"",\""type\"":\""Twin\"",\""accessible\"":false,\""image\"":\""https://www.mwtestconsultancy.co.uk/img/room1.jpg\"",\""description\"":\""Aenean porttitor mauris sit amet lacinia molestie. In posuere accumsan aliquet. Maecenas sit amet nisl massa. Interdum et malesuada fames ac ante.\"",\""features\"":[\""Wifi\"",\""TV\"",\""Safe\""]}]}""));" -"// Next, we start Applitools by calling the open method and giving it the Selenium WebDriver object" -// to interact with and then details about the check and finally a fixed browser size that Applitools will -// resize the browser to. -"eyes.open(driver, ""RBP"",""Room List Visual Test"", new RectangleSize(1400, 700));" -// Next we use Selenium to navigate to our page under test -"driver.navigate().to(""http://localhost:3003/#/admin"");" -// Close down the banner because we don't want to screenshot that -"driver.findElement(By.cssSelector("".btn-primary"")).click();" -// Finally we trigger the Applitools check by calling 'checkWindow' that will take a screenshot of the browser -// and upload it to Applitools cloud to compare it against a previously stored image to compare the differences -"eyes.checkWindow(""Room state"");" -} -} -package com.automationintesting.integration.taskanalysis; -import com.applitools.eyes.selenium.Eyes; -import com.automationintesting.UiApplication; -import com.automationintesting.integration.taskanalysis.driverfactory.DriverFactory; -import com.xebialabs.restito.server.StubServer; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.extension.ExtendWith; -import org.openqa.selenium.WebDriver; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit.jupiter.SpringExtension; -// We need to start the app up to test it. So we use the SpringRunner class and SpringBootTest to configure -// and run the app. -@ExtendWith(SpringExtension.class) -"@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = UiApplication.class)" -public class TestSetup { -// Our test rely on multiples services so we want to mock each of the -// services the UI uses -"StubServer brandingApi, authApi, roomApi;" -// We require instances of WebDriver and AppliTools eyes that will be -// inherited by the classes that use this setup class -protected WebDriver driver; -protected Eyes eyes; -// We add the @Before annotation so that when JUnit runs it knows to run this method before -// the tests are started. This is known as a hook. -@BeforeEach -public void setUpDriver(){ -// In the before hook we need to configure both Selenium WebDriver to create an -// instance of a browser to run our check in -driver = new DriverFactory().create(); -// And an instances of Applitools 'Eyes' that will run the visual check. -eyes = new Eyes(); -"// For Appplitools to work, it requires an account that can be registered on their website." -// The account will come with an API key that you can assign to the environmental variable -// APPLITOOLS_API_KEY to use in your checks. -"//eyes.setApiKey("""");" -"eyes.setApiKey(System.getenv(""APPLITOOLS_API_KEY""));" -eyes.setForceFullPageScreenshot(true); -"// With the browser setup, we begin to configure our mocked services" -brandingApi = new StubServer(3002).run(); -authApi = new StubServer(3004).run(); -roomApi = new StubServer(3001).run(); -} -// We add the @After annotation so that when JUnit runs it knows to run this method after -// the tests are started. This is known as a hook. -@AfterEach -public void teardownDriver() throws InterruptedException { -// Once the check is complete we need to close the Applitools and WebDriver instances so that -// we can rebuild new ones for the next check -eyes.close(); -driver.quit(); -// We also need to close our mocks down to get them ready for the next check -brandingApi.stop(); -authApi.stop(); -roomApi.stop(); -// Sadly we have to wait a second to allow the mocks to properly turn off -Thread.sleep(1000); -} -} -package com.automationintesting.integration.taskanalysis.driverfactory; -import io.github.bonigarcia.wdm.WebDriverManager; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.chrome.ChromeDriver; -import org.openqa.selenium.chrome.ChromeOptions; -import org.openqa.selenium.firefox.FirefoxOptions; -import org.openqa.selenium.remote.RemoteWebDriver; -import java.net.MalformedURLException; -import java.net.URL; -public class DriverFactory { -"private static String OS = System.getProperty(""os.name"").toLowerCase();" -public WebDriver create() { -"if(System.getenv(""BROWSER"") != null){" -"switch (System.getenv(""BROWSER"")) {" -"case ""chrome"":" -return prepareChromeDriver(); -"case ""remote"":" -return prepareRemoteDriver(); -default: -"System.out.println(""WARN: Browser option '"" + System.getenv(""BROWSER"") + ""' not recognised. Falling back to ChromeDriver"");" -return prepareChromeDriver(); -} -} -"System.out.println(""WARN: No browser option detected. Defaulting to ChromeDriver but if you want to use a different browser please assign a browser to the env var 'BROWSER'."");" -return prepareChromeDriver(); -} -private WebDriver prepareChromeDriver(){ -WebDriverManager.chromedriver().setup(); -return new ChromeDriver(); -} -private WebDriver prepareRemoteDriver(){ -"if(System.getenv(""SAUCE_USERNAME"") == null){" -"throw new RuntimeException(""To use remote driver a Sauce lab account is required. Please assign your Sauce labs account name to the environmental variable 'sauce_username'"");" -} -"if(System.getenv(""SAUCE_ACCESS_KEY"") == null){" -"throw new RuntimeException(""To use remote driver a Sauce lab account is required. Please assign your Sauce labs access key to the environmental variable 'sauce_access_key'"");" -} -"String URL = ""https://"" + System.getenv(""SAUCE_USERNAME"") + "":"" + System.getenv(""SAUCE_ACCESS_KEY"") + ""@ondemand.eu-central-1.saucelabs.com:443/wd/hub"";" -FirefoxOptions firefoxOptions = new FirefoxOptions(); -"firefoxOptions.setCapability(""screenResolution"", ""1440x900"");" -"firefoxOptions.setCapability(""extendedDebugging"", ""true"");" -try { -"return new RemoteWebDriver(new URL(URL), firefoxOptions);" -} catch (MalformedURLException e) { -"throw new RuntimeException(""WARN: An error occurred attempting to create a remote driver connection. See the following error: "" + e);" -} -} -} -"" - -"" -"" -"" -Restful-booker-platform demo -"" -"" -"" -"" -"" - - -"
" - - -export const API_ROOT = window.location.origin; -"import React, { useEffect, useState } from 'react';" -import ReactModal from 'react-modal'; -import moment from 'moment/moment'; -import { API } from '../libs/Api.js'; -"const AdminBooking = ({closeBooking, dates}) => {" -"const [rooms, setRooms] = useState([]);" -"const [booking, setBooking] = useState({" -"firstname : ''," -"lastname : ''," -"depositpaid : false," -"roomid : 0," -bookingdates : {} -}); -"const [errors, setErrors] = useState([]);" -useEffect(() => { -"booking.bookingdates.checkin = moment(dates.start).format(""YYYY-MM-DD"");" -"booking.bookingdates.checkout = moment(dates.end).format(""YYYY-MM-DD"");" -setBooking(prevState => ({ -...prevState -})); -API.getRoom(setRooms); -"}, []);" -const updateState = (event) => { -booking[event.name] = event.value; -setBooking(prevState => ({ -...prevState -})); -} -const doBooking = () => { -"API.postBooking(booking, closeBooking, setErrors);" -} -let errorDetails; -if(errors.length > 0){ -"errorDetails =
" -{errors.map((value) => { -return

{value}

-})} -
-} -return -"
" -"
" -" updateState(e.target)} />" -
-"
" -" updateState(e.target)} />" -
-
-"
" -"
" -"
" -"Room" -" -
-
-"
" -"
" -"Deposit paid?" -" -
-
-
-"
" -"
" -"

Checkin: {booking.bookingdates.checkin}

" -
-"
" -"

Checkout: {booking.bookingdates.checkout}

" -
-
-"
" -"
" - - -
-
-{errorDetails} -
-} -export default AdminBooking; -"import React, { useEffect, useState } from 'react';" -"import { Route, Routes } from 'react-router-dom'" -import Cookies from 'universal-cookie'; -import Nav from './Nav.js'; -import Login from './Login.js'; -const Report = React.lazy(() => import('./Report.js')); -const Branding = React.lazy(() => import('./Branding.js')); -const MessageList = React.lazy(() => import('./MessageList.js')); -const RoomListings = React.lazy(() => import('./RoomListings.js')); -const RoomDetails = React.lazy(() => import('./RoomDetails.js')); -import Loading from './Loading.js'; -import { API } from '../libs/Api.js'; -const AdminContainer = () => { -"const [isAuthenticated, setAuthenticate] = useState(null);" -"const [count, updateCount] = useState(0);" -useEffect(() => { -const cookies = new Cookies(); -"API.postValidation(setAuthenticate, cookies);" -"}, []);" -const setCount = () => { -API.getNotificationCount(updateCount); -} -if(isAuthenticated == null){ -return( -
-
-) -} else { -return( -
-
) -} -} -export default AdminContainer; -"import React, { useEffect, useState } from 'react';" -"import { HashRouter, Route, Routes } from 'react-router-dom'" -import ReactModal from 'react-modal'; -import Cookies from 'universal-cookie'; -const AdminContainer = React.lazy(() => import('./AdminContainer.js')); -const CookiePolicy = React.lazy(() => import('./CookiePolicy.js')); -const PrivacyPolicy = React.lazy(() => import('./PrivacyPolicy.js')); -import Banner from './Banner.js'; -import Home from './Home.js'; -import Footer from './Footer.js'; -import Loading from './Loading.js'; -if (process.env.NODE_ENV !== 'test') ReactModal.setAppElement('#root'); -const App = () => { -"const [showBanner, toggleBanner] = useState(false);" -useEffect(() => { -const cookies = new Cookies(); -if(typeof cookies.get('banner') === 'undefined'){ -toggleBanner(true); -} -"}, [])" -let welcome = null; -if(showBanner){ -welcome =
- -
-} -return( - -{welcome} - -}>} /> -} /> -}>} /> -}>} /> - -