Dies ist eine alte Version des Dokuments!
cd existing_repo git remote rename origin old-origin git remote add origin https://gitlab.com/n1843/test1.git git push -u origin --all git push -u origin --tags
git push --set-upstream origin <Branchname>
variables:
GIT_DEPTH: 0
default:
image: snom/sina-portal:2
stages:
- static_analyses
pylint:
stage: static_analyses
before_script:
- echo "Installing pylint"
- pip3 install pylint
script:
- echo "$CI_COMMIT_SHA"
- last_ret=0
- pythonfiles=$(git diff --name-only origin/$CI_DEFAULT_BRANCH... | grep -E '*.py$') || last_ret=$?
- >
if [[ $last_ret -eq 0 ]]; then echo "linting '$pythonfiles'"; pylint --max-line-length=120 --output-format=text
--disable=import-error --reports=n --ignore='sphinx_conf.py,common_types_pb2_grpc.py,common_types_pb.py,
phone_system_service_pb2_grpc.py,phone_system_service_pb2.py,qa_service_pb2_grpc.py,qa_service_pb2.py,
settings_service_pb2_grpc.py,settings_service_pb2.py' $pythonfiles; else echo "Skipped, no python
files to lint"; fi
| Problem/Howto | Beschreibung |
|---|---|
git --diff schlägt fehl | gitlab macht eine „shallow copy“, das heißt es checkt nicht die gesamte git-History aus, sondern nur die letzten x Commits. Man kann in der globalen Sektion „Variables“ die Variable „GIT_DEPTH“ auf 0 setzen |
| Abkürzung | Begriff | Beschreibung |
|---|---|---|
| CI | Continous Integration | Jedes Commit wird automatisch (mit Hilfe von Scripten und Tools) gebaut (oder teilweise gebaut) und getestet |
| CD | Continous Delivery | Automatisches Ausrollen der Software, allerdings wird es manuell ausgelöst |
| CD | Continous Deployment | Es wird automatisch ausgerollt auf Produktivsysteme |