1 Star 0 Fork 0

hegonghe/xinglan-admin-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.gitlab-ci.yml 3.13 KB
一键复制 编辑 原始数据 按行查看 历史
bryanHo 提交于 2024-05-12 17:28 . initial version
# This file is a template, and might need editing before it works on your project.
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Laravel.gitlab-ci.yml
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/php
image: php:latest
# This folder is cached between builds
# https://docs.gitlab.com/ee/ci/yaml/index.html#cache
cache:
paths:
- vendor/
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/debian.sources
# Update packages
- apt-get update -yqq
# Prep for Node
- apt-get install gnupg -yqq
# Install dependencies
- apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev libonig-dev libzip-dev -yqq
- pecl install xlswriter
# Install php extensions
- docker-php-ext-install pdo_mysql bcmath gd zip
- docker-php-ext-enable bcmath xlswriter
- php -m
# Install Composer and project dependencies.
- curl -sS https://install.phpcomposer.com/installer | php
- mv composer.phar /usr/local/bin/composer
- composer config -g repos.packagist composer https://mirrors.tencent.com/composer/
- composer install
##
## Install ssh-agent if not already installed, it is required by Docker.
## (change apt-get to yum if you use an RPM-based image)
##
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
##
## Run ssh-agent (inside the build environment)
##
- eval $(ssh-agent -s)
##
## Give the right permissions, otherwise ssh-add will refuse to add files
## Add the SSH key stored in SSH_PRIVATE_KEY file type CI/CD variable to the agent store
##
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
##
## Create the SSH directory and give it the right permissions
##
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
##
## Optionally, if you will be using any Git commands, set the user name and
## and email.
##
# - git config --global user.email "user@example.com"
# - git config --global user.name "User name"
##
## Assuming you created the SSH_KNOWN_HOSTS variable, uncomment the
## following two lines.
##
- touch ~/.ssh/config
- touch ~/.ssh/known_hosts
- chmod -R 400 ~/.ssh
- chmod 644 ~/.ssh/known_hosts
- ssh-keyscan "$DEPLOY_IP" >> ~/.ssh/known_hosts
deploy:
stage: deploy
script: php vendor/bin/envoy run deploy
environment: production
artifacts:
expose_as: 'artifact 1'
paths:
- .
exclude:
- .git
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/bryanho2020/xinglan-admin-api.git
git@gitee.com:bryanho2020/xinglan-admin-api.git
bryanho2020
xinglan-admin-api
xinglan-admin-api
master

搜索帮助