mirror of
https://github.com/certd/certd.git
synced 2026-07-09 06:07:37 +08:00
refactor: ```
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import pkg from 'chai'
|
||||
import options from './options.js'
|
||||
import Deployer from '../src/index.js'
|
||||
const { expect } = pkg
|
||||
describe('AutoDeploy', function () {
|
||||
it('#run', async function () {
|
||||
const deploy = new Deployer()
|
||||
const ret = deploy.run(options)
|
||||
expect(ret).ok
|
||||
expect(ret.cert).ok
|
||||
expect(ret.AliyunCertId).ok
|
||||
})
|
||||
})
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import optionsPrivate from './options.private.js'
|
||||
import optionsPrivate from '../../../test/options.private.js'
|
||||
const defaultOptions = {
|
||||
providers: {
|
||||
accessProviders: {
|
||||
aliyun: {
|
||||
providerType: 'aliyun',
|
||||
accessKeyId: '',
|
||||
@@ -17,7 +17,7 @@ const defaultOptions = {
|
||||
}
|
||||
},
|
||||
cert: {
|
||||
domains: ['*.docmirror.club', 'docmirror.club'],
|
||||
domains: ['*.docmirror.club', 'docmirror.xyz'],
|
||||
email: 'xiaojunnuo@qq.com',
|
||||
challenge: {
|
||||
challengeType: 'dns',
|
||||
@@ -38,17 +38,17 @@ const defaultOptions = {
|
||||
tasks: [
|
||||
{
|
||||
name: '上传证书到云',
|
||||
taskType: 'uploadCertToCloud',
|
||||
type: 'uploadCertToAliyun',
|
||||
certStore: 'aliyun'
|
||||
},
|
||||
{
|
||||
{ // CDN、SCDN、DCDN和负载均衡(SLB)
|
||||
name: '部署证书到SLB',
|
||||
taskType: 'deployCertToAliyunSLB',
|
||||
type: 'deployCertToAliyunSLB',
|
||||
certStore: 'aliyun'
|
||||
},
|
||||
{
|
||||
name: '部署证书到阿里云集群Ingress',
|
||||
taskType: 'deployCertToAliyunK8sIngress',
|
||||
type: 'deployCertToAliyunK8sIngress',
|
||||
certStore: 'aliyun'
|
||||
}
|
||||
]
|
||||
@@ -58,7 +58,7 @@ const defaultOptions = {
|
||||
tasks: [
|
||||
{
|
||||
name: '上传证书到服务器,并重启nginx',
|
||||
taskType: 'sshAndExecute',
|
||||
type: 'sshAndExecute',
|
||||
ssh: 'myLinux',
|
||||
upload: [
|
||||
{ from: '{certPath}', to: '/xxx/xxx/xxx.cert.pem' },
|
||||
@@ -73,7 +73,7 @@ const defaultOptions = {
|
||||
tasks: [
|
||||
{
|
||||
name: '触发jenkins任务',
|
||||
taskType: 'sshAndExecute',
|
||||
type: 'sshAndExecute',
|
||||
ssh: 'myLinux',
|
||||
script: 'sudo systemctl restart nginx'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user