diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..27db3196c9 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,69 @@ +version: 2.1 + +orbs: + docker: circleci/docker@1.5.0 + +jobs: + + build: + docker: + - image: cimg/openjdk:11.0 + steps: + - checkout + - restore_cache: + keys: + - maven-deps-{{ checksum "pom.xml" }} + - run: + name: Build with Maven + command: mvn clean package + - save_cache: + paths: + - ~/.m2 + key: maven-deps-{{ checksum "pom.xml" }} + - persist_to_workspace: + root: . + paths: + - target/*.war + - Dockerfile + + test: + docker: + - image: cimg/openjdk:11.0 + steps: + - checkout + - restore_cache: + keys: + - maven-deps-{{ checksum "pom.xml" }} + - run: + name: Run tests + command: mvn test + + build_and_push_image: + docker: + - image: cimg/base:stable + steps: + - setup_remote_docker + - attach_workspace: + at: . + - docker/check + - docker/build: + image: bodeomoboya01/java-hello-world-01 + tag: ${CIRCLE_SHA1} + - docker/push: + image: bodeomoboya01/java-hello-world-01 + tag: ${CIRCLE_SHA1} + +workflows: + version: 2 + build-test-deploy: + jobs: + - build + - test: + requires: + - build + - build_and_push_image: + requires: + - test + filters: + branches: + only: develop \ No newline at end of file diff --git a/ansible-playbook-regapp-deploy-service.yaml b/ansible-playbook-regapp-deploy-service.yaml new file mode 100644 index 0000000000..2a9e5ebd02 --- /dev/null +++ b/ansible-playbook-regapp-deploy-service.yaml @@ -0,0 +1,10 @@ +--- +- hosts: kubernetes + user: root +# become: true + + tasks: + - name: deploy regapp service on kubernetes + command: kubectl apply -f regapp-service.yaml + - name: deploy regapp on kubernetes + command: kubectl apply -f regapp-deploy.yaml diff --git a/webapp/src/main/webapp/index.jsp b/webapp/src/main/webapp/index.jsp index 7f5bec63ce..fdd88ad55b 100644 --- a/webapp/src/main/webapp/index.jsp +++ b/webapp/src/main/webapp/index.jsp @@ -13,8 +13,7 @@
- -
+