Move pre-commit check in its own stage
This is a preliminary implementation of an "optimisation" of the current pipeline.
It's implemented to in a way that takes into account the issue already tackled by !285 (closed).
The goal here is to add a new stage to the pipeline that is responsible for the QA of the code sent.
This will allow the pipeline to fail early on rather than run each and every variation of the build to have them fail for the same reasons. Using such a stage can also remove the quality checks in every build job as it is done prior to that.
This should allow to improve the nightlies build time a bit since the QA would be done once per package rather than once per build job.
Merge request reports
Activity
added Important label
requested review from @tiago.pereira
assigned to @andre.anjos
Hey @samuel.gaist;
Now I understood what you are proposing.
It is a good idea.
Thanks for the MR; I'll close the !285 (closed) in favor of this one and check if I need to update other files.
Edited by Tiago de Freitas Pereiramentioned in merge request !285 (closed)
mentioned in commit 40ba1104
82 77 key: "macos-arm-cache" 83 78 84 79 80 code_quality: 81 tags: 82 - docker 83 stage: qa 84 image: quay.io/condaforge/linux-anvil-cos7-x86_64 @samuel.gaist I think it would have been better to just use a pre-commit or python image here.
29 29 - python3 bootstrap.py -vv channel base 30 30 - source ${CONDA_ROOT}/etc/profile.d/conda.sh 31 31 - conda activate base 32 - git config --global --add safe.directory ${CI_PROJECT_DIR} @tiago.pereira: this does not work well if the runner is shared (shell executor), as it tends to pollute the global gitconfig indefinitely. Here is an example:
# admin @ cimacos3 in ~ [18:10:05] $ su - gitlab Password: gitlab@cimacos3 ~ % cat .gitconfig [safe] directory = /Users/gitlab/builds/sAZPGTqW/1/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.fusion.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.face directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.ip.binseg directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.pipelines directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.base directory = /Users/gitlab/builds/sAZPGTqW/1/bob/bob.bio.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.fusion.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.fusion.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.fusion.base directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.spear directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.face directory = /Users/gitlab/builds/sAZPGTqW/0/beat/beat.nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl2 directory = /Users/gitlab/builds/sAZPGTqW/0/beat/beat.nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl2 directory = /Users/gitlab/builds/sAZPGTqW/0/bob/nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/beat/beat.nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl2 directory = /Users/gitlab/builds/sAZPGTqW/0/beat/beat.nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl2 directory = /Users/gitlab/builds/sAZPGTqW/0/beat/beat.nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/nightlies directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.db.batl2 directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.ip.binseg directory = /Users/gitlab/builds/sAZPGTqW/0/bob/bob.bio.spear directory = /Users/gitlab/builds/sAZPGTqW/1/bob/bob.devtools directory = /Users/gitlab/builds/sAZPGTqW/2/bob/bob.devtools
@tiago.pereira: there is also an unfortunate side effect that breaks the builds: https://gitlab.idiap.ch/bob/bob.devtools/-/jobs/265131
mentioned in merge request !288 (merged)