GitLab CI setup
.gitlab-ci.yml
file
GitLab CI is already configured to be launched on each commit.
Let's make a small modification in the .gitlab-ci.yml
file in the job_build
script
section, modify the string to display:
script:
- echo "Hello GitLab CI / CD !"
- ls
In your docker command line :
git add .gitlab-ci.yml
git commit -m "first commit to launch CI"
git push
Check result
On GitLab website project, go in CI / CD
, Jobs
page. Check your Job is
Result analysis
Click on the
You shall see something like :
$ echo "Hello GitLab CI / CD !"
Hello GitLab CI / CD !
$ ls
README.md
cxx
java
presentation
python
Job succeeded
Exercise
Build everything needed to install
Now you know what is cloned on the build slave, it is up to you to modify the
script section of the .gitlab-ci.yml
file in order to test the Python
package.
Note: You can rename the stage build as test as there will be no build.
Tips and tricks
You can use GitLab CI linter
to validate your .gitlab-ci.yml
file before pushing it.
Home | Python Home | << Python Previous - Local test | >>Python Next - Refactoring