-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
loganhz
committed
Apr 22, 2020
1 parent
4559d31
commit 5f29189
Showing
9 changed files
with
182 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
kind: pipeline | ||
name: default | ||
|
||
steps: | ||
- name: build | ||
pull: default | ||
image: rancher/dapper:v0.4.2 | ||
commands: | ||
- dapper ci | ||
privileged: true | ||
volumes: | ||
- name: docker | ||
path: /var/run/docker.sock | ||
when: | ||
event: | ||
- push | ||
- pull_request | ||
- tag | ||
|
||
- name: github_binary_release | ||
image: plugins/github-release | ||
settings: | ||
api_key: | ||
from_secret: github_token | ||
prerelease: true | ||
checksum: | ||
- sha256 | ||
checksum_file: CHECKSUMsum-amd64.txt | ||
checksum_flatten: true | ||
files: | ||
- "dist/artifacts/*" | ||
when: | ||
ref: | ||
- refs/head/master | ||
- refs/tags/* | ||
event: | ||
- tag | ||
|
||
- name: docker-publish-head | ||
image: plugins/docker | ||
settings: | ||
build_args: | ||
- ARCH=amd64 | ||
custom_dns: 1.1.1.1 | ||
dockerfile: package/Dockerfile | ||
tag: latest | ||
password: | ||
from_secret: docker_password | ||
repo: cnrancher/pdf-sender | ||
username: | ||
from_secret: docker_username | ||
when: | ||
ref: | ||
include: | ||
- "refs/heads/master" | ||
event: | ||
- push | ||
|
||
- name: docker-publish | ||
image: plugins/docker | ||
settings: | ||
build_args: | ||
- ARCH=amd64 | ||
custom_dns: 1.1.1.1 | ||
dockerfile: package/Dockerfile | ||
password: | ||
from_secret: docker_password | ||
repo: cnrancher/pdf-sender | ||
tag: "${DRONE_TAG}" | ||
username: | ||
from_secret: docker_username | ||
when: | ||
event: | ||
- tag | ||
|
||
volumes: | ||
- name: docker | ||
host: | ||
path: /var/run/docker.sock | ||
|
||
node: | ||
instance: agent-amd64 | ||
|
||
trigger: | ||
event: | ||
exclude: | ||
- promote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 环境变量配置: | ||
|
||
SMTP_RANCHER_TO: 定期接收消息邮箱 | ||
|
||
SMTP_USER: 服务邮箱用户名 | ||
SMTP_PWD: 服务邮箱用户密码 | ||
SMTP_ENDPOINT: SMTP端点 | ||
SMTP_PORT: 服务邮箱端口 | ||
|
||
DB_HOST_IP: 数据库地址 | ||
DB_USERNAME: 数据库用户名 | ||
DB_PASSWORD: 数据库密码 | ||
DB_NAME: 数据库名 | ||
|
||
ALI_REGION_ID: 阿里云区域 | ||
ALI_ACCESS_KEYID: 阿里云访问令牌 | ||
ALI_ACCESS_SECRET: 阿里云访问令牌密钥 | ||
ALI_SIGN_NAME: 阿里云短信签名 | ||
ALI_TEMPLATE_CODE: 阿里云短信模板 | ||
|
||
# 建表SQL语句: | ||
|
||
CREATE TABLE `user` ( | ||
`uid` int(11) NOT NULL AUTO_INCREMENT, | ||
`name` varchar(255) DEFAULT NULL, | ||
`company` varchar(255) DEFAULT NULL, | ||
`position` varchar(255) DEFAULT NULL, | ||
`phone` varchar(255) DEFAULT NULL, | ||
`email` varchar(255) DEFAULT NULL, | ||
`savetime` datetime DEFAULT NULL, | ||
`status` tinyint(1) DEFAULT NULL, | ||
PRIMARY KEY (`uid`) | ||
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM alpine:3 | ||
COPY bin/pdf-sender/pdf-sender | ||
COPY bin/pdf-sender /pdf-sender | ||
CMD ["/pdf-sender"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ set -e | |
|
||
cd $(dirname $0) | ||
|
||
# ./test | ||
# ./validate | ||
chmod +x ./build | ||
chmod +x ./package | ||
|
||
./build | ||
./package | ||
./package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters