cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

Use CI/CD provided by gitlab #598

Open cbleek opened 3 years ago

cbleek commented 3 years ago

I think, the free services of travis are not usable anymore. The processes are just take to long, until they start.

I think, we can build, test and depoy using gitlab.com

I've setup such a build process on gitlab.

the equivalent to the tracis.yml is the gitlab-ci.yml. There we can use a docker image for the build process. I've created such Image containing everything, which is needed (composer, npm, ext-mongodb)

this way the build process gets much faster.

https://gitlab.com/yawik/yawik/-/pipelines/224218926

@TiSiE @kilip

What do you think?

The code on gitlab is currently for testing only. I'll remove the projet completly an reimport it from github, after #591 is done

kilip commented 3 years ago

Yes, travis build is slow.

I propose using github action to do the build. Here's a sample of symfony build:

https://github.com/symfony/symfony/runs/1487071210?check_suite_focus=true

A sample of github action config:

https://github.com/kilip/api-platform-laravel/blob/master/.github/workflows/ci.yml

If agreed, just assign me to this issue. I will transfer our build into github action.

TiSiE commented 3 years ago

I totally forgot that there are github actions now, dispite using them in https://github.com/cross-solution/phpunit-utils/actions

And now that I'm reminded, I like how easy the setup of github actions is.


On the other hand, we do plan to move YAWIK to gitlab, because we like the UI and general concepts of gitlab a bit more.
So it would make sense to use the gitlab CI integration then also.

cbleek commented 3 years ago

I like the Gitlab software. And I like the company Gitlab even more. So I am biased.

I have found the following

With the Gitlab software, we can see that it is technically possible to release a new version of Gitlab with many new features every 4 weeks. And we can see how the Giltlab people do that.

What I like about Gitlab CI is the possibility to use a docker image for testing. This reduces the testing time because we don't have to compile php-mongodb every time we commit. Github Actions can also test with docker images. But you need code from a 3rd party.

Check again and let me know how we should proceed.

cbleek commented 3 years ago

Gitlab supports a container registry. That means it's possible to to build and store dockerimages in Gitlab. Selfhosted or gitlab.com.

I've created a Docker image https://gitlab.com/yawik/docker/build

The gitlab-ci.yml creates and stores the docker file. It's currently more or less copy&past from the gitlab docs

Gitlab also uses its own docker containers in its CI/CD process. We can see how they solve problems.

@kilip Do you know the Gitlab CI/CD process?