fix: deploy
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
032c77497c
commit
cc19e18b51
|
@ -44,27 +44,6 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
|||
'/stack/squid'
|
||||
),
|
||||
images.wait(15),
|
||||
compose(
|
||||
std.map(
|
||||
function(s) util.envSet(s),
|
||||
publicSecrets + secretSecrets
|
||||
) +
|
||||
std.map(
|
||||
function(s) function(step) step {
|
||||
settings +: {
|
||||
script +: [
|
||||
|
||||
'export %(env)s="$${%(env)s}"' % {
|
||||
env: util.environment(s),
|
||||
},
|
||||
'echo "$${%s}"' % util.environment(s),
|
||||
],
|
||||
},
|
||||
},
|
||||
publicSecrets + secretSecrets
|
||||
)
|
||||
)
|
||||
(
|
||||
images.ssh {
|
||||
name: 'deploy squid',
|
||||
settings +: {
|
||||
|
@ -78,12 +57,11 @@ local publicSecrets = import 'lib/public-secrets.libsonnet';
|
|||
'openssl req -x509 -days 600 -new -nodes -key CA_key.pem -out CA_crt.pem -extensions v3_ca -config openssl.cnf -subj "/C=US/ST=California/L=Mountain View/O=Google/OU=Enterprise/CN=MyCA"',
|
||||
'cd ..',
|
||||
"docker stack rm squid",
|
||||
"sleep 30",
|
||||
"sleep 31",
|
||||
"docker stack deploy -c docker-compose.yml squid",
|
||||
]
|
||||
}
|
||||
}
|
||||
),
|
||||
],
|
||||
}
|
||||
]
|
||||
|
|
|
@ -38,11 +38,6 @@ steps:
|
|||
- drone_build_number
|
||||
- drone_repo_name
|
||||
- drone_repo_namespace
|
||||
- ssh_host
|
||||
- ssh_user
|
||||
- ssh_root_user
|
||||
- ssh_password
|
||||
- ssh_key
|
||||
host:
|
||||
from_secret: ssh-host
|
||||
key:
|
||||
|
@ -57,31 +52,10 @@ steps:
|
|||
- openssl req -x509 -days 600 -new -nodes -key CA_key.pem -out CA_crt.pem -extensions v3_ca -config openssl.cnf -subj "/C=US/ST=California/L=Mountain View/O=Google/OU=Enterprise/CN=MyCA"
|
||||
- cd ..
|
||||
- docker stack rm squid
|
||||
- sleep 30
|
||||
- sleep 31
|
||||
- docker stack deploy -c docker-compose.yml squid
|
||||
- export SSH_HOST="$${SSH_HOST}"
|
||||
- echo "$${SSH_HOST}"
|
||||
- export SSH_USER="$${SSH_USER}"
|
||||
- echo "$${SSH_USER}"
|
||||
- export SSH_ROOT_USER="$${SSH_ROOT_USER}"
|
||||
- echo "$${SSH_ROOT_USER}"
|
||||
- export SSH_PASSWORD="$${SSH_PASSWORD}"
|
||||
- echo "$${SSH_PASSWORD}"
|
||||
- export SSH_KEY="$${SSH_KEY}"
|
||||
- echo "$${SSH_KEY}"
|
||||
username:
|
||||
from_secret: ssh-user
|
||||
environment:
|
||||
SSH_HOST:
|
||||
from_secret: ssh-host
|
||||
SSH_KEY:
|
||||
from_secret: ssh-key
|
||||
SSH_PASSWORD:
|
||||
from_secret: ssh-password
|
||||
SSH_ROOT_USER:
|
||||
from_secret: ssh-root-user
|
||||
SSH_USER:
|
||||
from_secret: ssh-user
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
'ssh-host',
|
||||
'ssh-user',
|
||||
'ssh-root-user',
|
||||
'local-docker-registry',
|
||||
]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[
|
||||
'ssh-password',
|
||||
'ssh-key',
|
||||
'local-registry-password',
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue