1 Star 9 Fork 0

李铭昕/biz-skeleton

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
# usermod -aG docker gitlab-runner
stages:
- unit
- build
- deploy
variables:
PROJECT_NAME: hyperf
REGISTRY_URL: registry-docker.org
GIT_SUBMODULE_STRATEGY: recursive
unit:
stage: unit
image: hyperf/docker-ci:latest
resource_group: $CI_PROJECT_NAME
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
script:
- APP_ENV=test docker-compose up -d --remove-orphans --build
- docker exec $(basename $(pwd))_hyperf_1 composer install
- docker exec $(basename $(pwd))_hyperf_1 composer analyse
- docker exec $(basename $(pwd))_hyperf_1 vendor/bin/php-cs-fixer fix --dry-run
- docker exec $(basename $(pwd))_hyperf_1 composer test
after_script:
- docker-compose down
tags:
- unit
build_test_docker:
stage: build
script:
- docker build . -t $PROJECT_NAME
- docker tag $PROJECT_NAME $REGISTRY_URL/$PROJECT_NAME:test
- docker push $REGISTRY_URL/$PROJECT_NAME:test
only:
- test
tags:
- builder
deploy_test_docker:
stage: deploy
script:
- docker stack deploy -c deploy.test.yml --with-registry-auth $PROJECT_NAME
only:
- test
tags:
- test
build_docker:
stage: build
script:
- docker build . -t $PROJECT_NAME
- docker tag $PROJECT_NAME $REGISTRY_URL/$PROJECT_NAME:$CI_COMMIT_REF_NAME
- docker tag $PROJECT_NAME $REGISTRY_URL/$PROJECT_NAME:latest
- docker push $REGISTRY_URL/$PROJECT_NAME:$CI_COMMIT_REF_NAME
- docker push $REGISTRY_URL/$PROJECT_NAME:latest
only:
- tags
tags:
- builder
deploy_docker:
stage: deploy
script:
- echo SUCCESS
only:
- tags
tags:
- builder
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/limingxinleo/biz-skeleton.git
git@gitee.com:limingxinleo/biz-skeleton.git
limingxinleo
biz-skeleton
biz-skeleton
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385