User name | NIA | Travis-CI | Score |
---|---|---|---|
UNIZAR-30246-WebEngineering | 30246 | ||
your name | your nia | your Travis-ci status |
This is the repository that we will use for the first assignment of the course 2015-2016. This guide is command line oriented but your are free to use IDE like Eclipse and IntelliJ IDEA which have full support of the tools that we are going to use. We also assume that you have installed in your box Java 8 JDK.
This is a speed competition. The quicker will do less work and will be more easily to them to pass it. You can browse the src folder. The code is not documented and I expect that you documment it without breaking it. Each should add a few lines adding NEW and CORRECT documentation. The topics expected are:
- How to build the code
- How to test the code
- How to deploy the code in a server
- Which are the technologies used in the code
- How these technonogies work
- What means each a specific piece or code
- Which is the purpose of a specific Java annotation
The documentacion can be added only to existing files (here in README.md or any in src) and must be written in English (B1 level of course!).
And remember, if you add outstanding information you will have a cumulative bonus of 10% in your personal score in the evaluation of the project. People deserving the cummulative bonus will be announced here in the Score column. If you fail to commit your work before October, 17th you will have a cumulative penalisation of 20% in your personal score in the evaluation of the project.
The first step is setting up git. This is a git repository. First, you’ll need to sign up for an account on GitHub.com. Let's imagine that you account is named your-github-username
Install git for Windows, Mac or Linux as needed. Next, in your console type:
$ git config --global user.name "Your real Here"
$ git config --global user.email "[email protected]"
$ git config --global push.default simple
Next steps you must configure your preferred way to connecting GitHub: HTTPS (tutorial) or SSH (tutorial). Now you can create your own online repository on GitHub (tutorial)
Forking this repository is very easy. First click on the right-top corner of the page Fork. That's it!. Now you have https://github.com/UNIZAR-30246-WebEngineering/hello cloned in https://github.com/your-github-username/hello
Next you need to keep your fork synced. We assume here that you have set up git in your computer.
$ git clone https://github.com/your-github-username/hello
$ cd hello
$ git remote add upstream https://github.com/UNIZAR-30246-WebEngineering/hello.git
Do the following steps to keep your repo synced.
$ cd hello
$ git fetch upstream
$ git checkout master
$ git merge upstream/master
Gradle is the building tool used in this course. It is like a Swiss Army knife for building software from the command line. Gradle is configured by adding a file named gradle.build
to the root directory of a project, which is a Groovy script. Please, refer to the Gradle user guide for its installation. Once it is installed just do a first run for checking the code:
$ cd hello
$ gradle check
Travis-CI is an open-source hosted, distributed continuous integration service used to build and test projects hosted at GitHub. Travis CI is configured by adding a file named .travis.yml
, which is a YAML format text file, to the root directory of the GitHub repository. When you push code to your repository, Travis CI grabs your code and build it, providing a nice report of the outcome (see here). You only need to settup a free account linked to your GitHub account and configure Travis-CI to monitor your your-github-username/hello
repository.
In order to check that Travis-CI is working well modify locally README.md
and add to the above table the following markdown code:
your name | your nia | [![Build Status](https://travis-ci.org/your-github-username/hello.svg)](https://travis-ci.org/your-github-username/hello)
Next add your changes into your local repository:
$ cd hello
$ git add -A
$ git commit -m "with a concise description of the commit"
And then push them to your online hello repository in GitHub:
$ git push
The file README.md
in your GitHub repository will be updated and Travis-CI will start to build and test your code. Soon your badge will turn green if you refresh your browser. Otherwise, it means that you have done something wrong.
Now is time to review the code and look for relevant and correct information. Once your have updated locally ensure that you code works with gradle check
and if it works do a git push
.
Finally, you must make a pull request. Go to your your-github-username/hello
repository in GitHub and click on the green icon on the left. Create a pull request so that we can check your changes and accept them in this repository. If everything is ok, your changes will be added. If not, you will receive a message explaining why not.
The most three common reason for rejecting your request are:
- You are not adding NEW and CORRECT information.
- Your request cannot be automatically merged. The fix is easy. sync your local repository with https://github.com/UNIZAR-30246-WebEngineering/hello, then upload your changes, and finally perform the pull request.
- Your Travis-CI status is not green. Check why it doesn't work and fix it!