- If you don't have a GitHub account already, create one. If you do, record the name of your handle in your lab report and record a link to one repository you either follow or star.
- If you don't already have git installed on your development machine, do so.
- Install a text editor or some sort of application for local development. Lately, I'm partial to Visual Studio Code and my instructions assume it's use, but you're welcome to diviate. Each one should choose their own sword, etc. etc.
- To run the project in Step 2, you'll need to have node.js and npm installed.
- After logging in, navigate to the purelab branch root of this repository.
- Fork this repository to your personal GitHub account (hint: read the page).
- Record the URL to your forked repo in your lab report.
- Generate a simple diagram (in Google Draw or your favorite diagramming tool) that demonstrates the relationship between this repository and my account (trevordbunch) with your account and your newly forked repository. (i.e. Is this the same thing as a source control branch or is there something unique about a fork in a distributed version control system? Hint... I'm asking for a reason. If it's helpful, think about the relationship you and another student who is conducting the fork command each has to this respository.)
- Navigate to your forked repository in your GitHub account and copy the reference to your repository in from the Clone or Download button.
- Open the terminal or command line interface on your development machine, navigate to your chosen working directory, and execute the following command:
git clone [YOUR COPIED GITHUB CLONE REFERENCE]
. - Navigate to that directory
cd cis411_lab1_CI
.
- If you haven't already - make sure that you have installed node.js and npm
- Run
npm install
and watch the magic happen. - Run
npm start
and navigate to http://localhost:4000/graphql. - Run the following GraphQL mutation in GraphiQL and record the response.
mutation {
mutateAccount(input: {
email: "YOUR EMAIL"
name: "YOUR FULL NAME"
mutation: "add"
}) {
id
name
email
}
}
Branching and merging is a common tactic used in change management and feature development. We're going to use a branch (and eventually a merge) to build our lab report.
- Create the branch
git checkout -b labreport
. - Create a lab report mardown file (ex.
cp labreports/LAB_Template.md labreports/LAB_[GITHUB USERNAME].md
). - Add your lab report
git add *
- Add the file to your branch
git commit -a -m "your commit and reference @trevordbunch in the message"
. - Push the change to GitHub
git push -u origin labreport
. - As you make additional changes to the lab report, commit and push at least one more change to the branch.
- Add the output of your git commit log for your feature branch to your lab report
git log --oneline
. - Generate a simple diagram that demonstrates the relationship between your main and feature branch in your forked repository.
- Signup for CircleCI with your GitHub account.
- Login to CircleCI and add your project to your account (ex. https://circleci.com/add-projects/gh/[YOUR_GITHUB_HANDLE]) by clicking Add Project.
- Follow the setup instructions, including creating the .circleci directory and adding the default config.yml file.
- Create a directory name .circleci in your project
mkdir .circleci
. - Add a file to that directory named config.yml
code .circleci/config.yml
. - Copy the content for the setup instructions into config.yml.
- Document in your lab report what your .circleci/config.yml is doing in as much detail as you can determine. A diagram is not required but is highlt encouraged. Additionally, answer the following questions.
- What do the various sections on the config file do?
- When a CI build is successful, what does that philosophically and practically/precisely indicate about the build?
- If you were to take the next step and ready this project for Continuous Delivery, what additional changes might you make in this configuration (conceptual, not code)?
- Commit your changes to your feature branch
git commit -a -m "your commit message
. - Switch to the main branch
git checkout main
. - Merge the changes from your feature branch
git merge labreport
. - Add the output of your git commit log from main to your lab report
git log --oneline
. - Validate that your CircleCI build is running doing so successfully, by grabbing a screenshot of the Jobs list in CircleCI and including it in your report.
Once you've completed your report markdown, have ensured that your forked repository is successfully running in CircleCI, and have committed all your changes to your (primary) main branch, and push
your updated main branch back to Github, and then initiate a Pull Request in GitHub to submit your Lab Report.
- Navigate to the root of your forked repository (ex. https://github.com/YOURHANDLE/cis411_lab1_CI).
- Click the New pull request button.
- Choose the base fork trevordbunch/cis411_lab1 is the target and that your fully updated main branch is the source.
- Enter a title and description for the Pull Request (PR), referencing at least one other student in the content via their GitHub handle, and submit the PR.
For the purposes of gaining 10%, 20% or even more extra credit on the assignment, perform any of the following:
- Add one or more unit tests to the core assignment project.
- Configure the CircleCI config.yml to automatically build a Docker image of the project.
- Configure an automatic deployment of the successful CircleCI build to an Amazon EC2 instance.
Note this work in your lab report by submitting it in your PR and linking to either the PR or the specific commit as recorded in GitHub in your lab report.