Step 2 - Initialise the software repository¶
In this Hands-On, the application directory will be initialised as a Git repository and linked to a remote service for hosting a copy of it. This Hands-On relies on GitLab to host the remote software repository.
Prerequisites¶
- The <app-name> value,
- The <app-url> value. It will be a Gitlab repository URL,
- The <cloud-username> value.
- An account on https://gitlab.com.
Procedure¶
- Open a Terminal window and change directory into the one you created in Step 1:
APP_NAME=<app-name>
cd /workspace/${APP_NAME}
- Setup additional variables:
export CLOUD_USERNAME=<cloud-username>
export NAME_SURNAME="<your-name-and-surname>"
export GITLAB_USERNAME="<gitlab-username>"
export GITLAB_EMAIL=<gitlab-email>
export HOME=/home/${CLOUD_USERNAME}
- Setup your Git configuration by typing:
echo "[user]
email = ${GITLAB_EMAIL}
name = ${NAME_SURNAME}
[credential \"https://gitlab.com\"]
username = ${GITLAB_EMAIL}
[push]
default = matching
[credential]
helper = cache --timeout=3600" > ~/.gitconfig
- Initialize the Git repository and perform the first commit on the master branch
git init
git add -A .
git commit -m "Initial commit"
- Setup the right sync between the local folder and the software repository:
APP_URL=<app-url>
git remote add origin ${APP_URL}
- Create the software repository branches and push them to GitLab:
git branch develop
git branch docker
git checkout develop
git push -u origin master develop docker
Next step¶
The software repository is now configured properly. The next Step is Step 3 - Stage-in the EO data where we retrieve locally a Sentinel-1 product.
[ ]: