Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab Completed #40

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
46 changes: 46 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:11
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test

deploy:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- run:
name: Deploy Master to Heroku
command: |
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git master

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
8 changes: 8 additions & 0 deletions .idea/cis411_lab2.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

150 changes: 150 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added CircleCI_Snippet1.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CircleCi_Snippet2.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:11
WORKDIR /dist
COPY package.json /dist
RUN npm install
COPY . /dist
CMD node server.js
EXPOSE 4000
Binary file added GraphiQL_Screenshot.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions labreports/LAB_Leanne-Weaver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Lab Report for CIS411_Lab2
Course: Messiah College CIS 411, Fall 2019

Instructors: [Joel Worrall](https://github.com/tangollama) & [Trevor Bunch](https://github.com/trevordbunch)
Name: Leanne Weaver

GitHub: [Leanne-Weaver](https://github.com/Leanne-Weaver)

# Required Content

1. Generate a markdown file in the labreports directory named LAB_[GITHUB HANDLE].md. Write your lab report there. :heavy_check_mark:
2. Create the directory ```./circleci``` and the file ```.circleci/config.yml``` in your project and push that change to your GitHub repository. :heavy_check_mark:
3. Create the file ```Dockerfile``` in the root of your project and include the contents of the file as described in the instructions. Push that change to your GitHub repository. :heavy_check_mark:
4. Write the URL of your running Heroku app here: ```ex: http://[cis411lab2-leanne-weaver.herokuapp.com/graphql``` :heavy_check_mark:
5. Embed _using markdown_ a screenshot of your successful build and deployment to Heroku of your project. :heavy_check_mark:
![GraphiQL Screenshot](../GraphiQL_Screenshot.PNG)
![Earliest builds in CircleCI](../CircleCI_Snippet1.PNG)
![Latest builds in CircleCI](../CircleCi_Snippet2.PNG)
6. Answer the questions below. _(See below)_ :heavy_check_mark:
8. Submit a Pull Request to cis411_lab2 and provide the URL of that Pull Request in Canvas as your URL submission. :heavy_check_mark:

## Questions
1. Why would a containerized version of an application be beneficial if you can run the application locally already?<br>
Putting my application in a container will allow reliable and efficient transport of my application to other software environments. This will mitigate the headaches and errors that can be caused by slight discrepancies between the application's interactions with infrastructures of differing software environments.<br>

2. If we have the ability to publish directory to Heroku, why involve a CI solution like CircleCI? What benefit does it provide?<br>
The main benefit provided by CircleCI is that it tests code committed to GitHub. Validated code will be pushed, but code that fails the tests and is deemed as buggy will be rejected. This can help us detect _where_ the breakdown occurs (by looking only at the files in the rejected commit), as well as preserve the integrity of the functionality of the code that is already pushed.<br>
File renamed without changes.
11 changes: 8 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.