gitlab CI config
Пример конфигурации gitlab-CI для репозитория.
Файл .gitlab-ci.yml в корне репозитория
############################################################################### stages: - build - prepare - deploy ############################################################################### variables: # GIT_SSL_NO_VERIFY: "1" # GIT_SUBMODULE_STRATEGY: recursive # GIT_STRATEGY: fetch ## !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEPLOY_PATH_PREFIX: superproject ############################################################################### #------------------------------------------------------------------------------ build:linux32: stage: build tags: - linux, gcc32 script: - echo "build commands" artifacts: paths: - build/bin32/* expire_in: 1 hour #------------------------------------------------------------------------------ build:linux64: stage: build tags: - linux, gcc64 script: - echo "build commands" artifacts: paths: - build/bin64/* expire_in: 1 hour #------------------------------------------------------------------------------ build:doc: stage: build tags: - latex script: - cd doc - latexmk artifacts: paths: - doc/result/* expire_in: 1 hour ############################################################################### prepare_release: stage: prepare tags: - linux, gcc script: - mkdir release - mkdir release/doc - mkdir release/bin - cp doc/result/* release/doc/ - cp build/bin32/* release/bin/ - cp build/bin64/* release/bin/ dependencies: - build:doc - build:linux64 - build:linux32 artifacts: paths: - release/* expire_in: 2 hours ############################################################################### upstream: stage: deploy trigger:. project: upstream/project1 branch: master #------------------------------------------------------------------------------ deploy_testing: variables: GIT_SUBMODULE_STRATEGY: none stage: deploy tags: - dev-deploy except: - tags script: - deploy_to_dev -b -d $DEPLOY_PATH_PREFIX release/ dependencies: - prepare_release #------------------------------------------------------------------------------ deploy_tag: variables: GIT_SUBMODULE_STRATEGY: none stage: deploy tags: - dev-deploy only: - tags script: - deploy_to_dev -v $DEPLOY_PATH_PREFIX release/ dependencies: - prepare_release