add RSYNC_USER to env

This commit is contained in:
Lanre Adelowo
2019-03-30 00:04:02 +01:00
parent 24b116006b
commit 4326e0e470

View File

@@ -60,6 +60,8 @@ steps:
environment: environment:
RSYNC_KEY: RSYNC_KEY:
from_secret: rsync_key from_secret: rsync_key
RSYNC_USER:
from_secret: rsync_user
settings: settings:
hosts: hosts:
- remote1 - remote1
@@ -75,7 +77,6 @@ steps:
- cd ~/packages - cd ~/packages
- md5sum -c app.tar.gz.md5 - md5sum -c app.tar.gz.md5
- tar -xf app.tar.gz -C ~/app - tar -xf app.tar.gz -C ~/app
secrets: [ rsync_user, rsync_key ]
``` ```
The example above illustrates a situation where an app package (`app.tar.gz`) will be deployed to 2 remote hosts (`remote1` and `remote2`). An md5 checksum will be deployed as well. After deploying, the md5 checksum is used to check the deployed package. If successful the package is extracted. The example above illustrates a situation where an app package (`app.tar.gz`) will be deployed to 2 remote hosts (`remote1` and `remote2`). An md5 checksum will be deployed as well. After deploying, the md5 checksum is used to check the deployed package. If successful the package is extracted.