Commit fba834a1 authored by Tony Wildish's avatar Tony Wildish
Browse files

Improve sample project creation documentation

parent 6fc6fd47
......@@ -13,8 +13,10 @@ Create a new project and import the sample code, see the build process it trigge
- set the project visibility to 'internal' or 'public' if you want to share it with others
- **do not* click the 'Initialize repository with README' button
- Click 'Create Project'
- that's all you need to do in the browser, you don't need to follow the instructions you see on-screen next, instead do what it says below.
- Do the **git config** steps:
- Log into your virtual machine, or, if you're using your laptop, open a terminal window
- Do the **git config** steps, this stops git from prompting you if you haven't set these fields before. You only need to do it once per machine:
```
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR_USERNAME@ebi.ac.uk"
......@@ -28,13 +30,19 @@ cd ~/gitlab-test
git init
```
- Add the code to your repository, commit it, and push it to the server:
- Add the code to your repository and commit it:
```
tar xvf ~/tsi-ccdoc/tsi-cc/ResOps/scripts/gitlab/tiny-test.tar
git remote add origin git@gitlab.ebi.ac.uk:YOUR_GITLAB_USERNAME/YOUR_PROJECT_NAME.git
git remote add origin https://gitlab.ebi.ac.uk/YOUR_GITLAB_USERNAME/YOUR_PROJECT_NAME.git
git add .
git commit -m "Initial commit"
```
- Tell git to cache your password for one hour. This saves you typing it in all the time whenever you make a push to the server. This is only needed when you use the **https** URL, with the SSH URL you can use an ssh-agent to cache the connection information instead. However, the SSH URL isn't accessible outside the EBI network, so we use the https URL for portability here:
```
git config --global credential.helper "cache --timeout=3600"
git push -u origin master
```
......@@ -44,7 +52,7 @@ Then go to the **CI/CD** -> **Pipelines** tab and watch the progress of your pip
The build fails because the code which is uploaded points to my personal project, which only I have access to.
To fix this, edit the **.gitlab-ci.yml** file, change the **APPLICATION** name to the name of your project, and the **REGISTRY_USER** to your gitlab username. Save the file, commit it to git, and push it to the server again.
To fix this, edit the **.gitlab-ci.yml** file, change the **APPLICATION** name to the name of your project, and the **REGISTRY_USER** to your gitlab username. Save the file, commit it to git, and push it to the server again. This time, you only need a ```git push```, with no extra arguments.
Go to the **CI/CD** -> **Pipelines** tab again, this time it should succeed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment