publish to s3

This commit is contained in:
Robert Kaussow 2020-05-26 21:38:16 +02:00
parent 9a1415211c
commit 8903962395
2 changed files with 25 additions and 74 deletions

View File

@ -61,8 +61,7 @@ local PipelineDeps = {
commands: [ commands: [
'pip install pipenv -qq', 'pip install pipenv -qq',
'pipenv --bare install --keep-outdated', 'pipenv --bare install --keep-outdated',
# temp disabled 'pipenv check -i 37752',
# 'pipenv check -i 37752',
'pipenv --bare install --dev --keep-outdated', 'pipenv --bare install --dev --keep-outdated',
'pipenv run pipenv-setup check', 'pipenv run pipenv-setup check',
], ],
@ -287,43 +286,19 @@ local PipelineDocs = {
'cd docs/ && hugo-official', 'cd docs/ && hugo-official',
], ],
}, },
{
name: 'freeze',
image: 'appleboy/drone-ssh:1.5.5',
settings: {
host: { from_secret: 'ssh_host' },
key: { from_secret: 'ssh_key' },
script: [
'cp -R /var/www/virtual/geeklab/html/docker-tidy.geekdocs.de/ /var/www/virtual/geeklab/html/dockertidy_freeze/',
'ln -sfn /var/www/virtual/geeklab/html/dockertidy_freeze /var/www/virtual/geeklab/docker-tidy.geekdocs.de',
],
username: { from_secret: 'ssh_username' },
},
},
{ {
name: 'publish', name: 'publish',
image: 'appleboy/drone-scp', image: 'plugins/s3-sync',
settings: { settings: {
host: { from_secret: 'ssh_host' }, access_key: { from_secret: 's3_access_key' },
key: { from_secret: 'ssh_key' }, bucket: 'geekdocs',
rm: true, delete: true,
source: 'docs/public/*', endpoint: 'https://sp.rknet.org',
strip_components: 2, path_style: true,
target: '/var/www/virtual/geeklab/html/docker-tidy.geekdocs.de/', secret_key: { from_secret: 's3_secret_access_key' },
username: { from_secret: 'ssh_username' }, source: 'docs/public/',
}, strip_prefix: 'docs/public/',
}, target: '/${DRONE_REPO_NAME}',
{
name: 'cleanup',
image: 'appleboy/drone-ssh:1.5.5',
settings: {
host: { from_secret: 'ssh_host' },
key: { from_secret: 'ssh_key' },
script: [
'ln -sfn /var/www/virtual/geeklab/html/docker-tidy.geekdocs.de /var/www/virtual/geeklab/docker-tidy.geekdocs.de',
'rm -rf /var/www/virtual/geeklab/html/dockertidy_freeze/',
],
username: { from_secret: 'ssh_username' },
}, },
}, },
], ],

View File

@ -36,6 +36,7 @@ steps:
commands: commands:
- pip install pipenv -qq - pip install pipenv -qq
- pipenv --bare install --keep-outdated - pipenv --bare install --keep-outdated
- pipenv check -i 37752
- pipenv --bare install --dev --keep-outdated - pipenv --bare install --dev --keep-outdated
- pipenv run pipenv-setup check - pipenv run pipenv-setup check
environment: environment:
@ -416,45 +417,20 @@ steps:
commands: commands:
- cd docs/ && hugo-official - cd docs/ && hugo-official
- name: freeze
image: appleboy/drone-ssh:1.5.5
settings:
host:
from_secret: ssh_host
key:
from_secret: ssh_key
script:
- cp -R /var/www/virtual/geeklab/html/docker-tidy.geekdocs.de/ /var/www/virtual/geeklab/html/dockertidy_freeze/
- ln -sfn /var/www/virtual/geeklab/html/dockertidy_freeze /var/www/virtual/geeklab/docker-tidy.geekdocs.de
username:
from_secret: ssh_username
- name: publish - name: publish
image: appleboy/drone-scp image: plugins/s3-sync
settings: settings:
host: access_key:
from_secret: ssh_host from_secret: s3_access_key
key: bucket: geekdocs
from_secret: ssh_key delete: true
rm: true endpoint: https://sp.rknet.org
source: docs/public/* path_style: true
strip_components: 2 secret_key:
target: /var/www/virtual/geeklab/html/docker-tidy.geekdocs.de/ from_secret: s3_secret_access_key
username: source: docs/public/
from_secret: ssh_username strip_prefix: docs/public/
target: /${DRONE_REPO_NAME}
- name: cleanup
image: appleboy/drone-ssh:1.5.5
settings:
host:
from_secret: ssh_host
key:
from_secret: ssh_key
script:
- ln -sfn /var/www/virtual/geeklab/html/docker-tidy.geekdocs.de /var/www/virtual/geeklab/docker-tidy.geekdocs.de
- rm -rf /var/www/virtual/geeklab/html/dockertidy_freeze/
username:
from_secret: ssh_username
trigger: trigger:
ref: ref:
@ -529,6 +505,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 1a06f37400cd549c9b7f95b9395f0ba5c5bbb8f7069e8635b3761322d0fba07c hmac: 5186d018e8073ea7d4ac2b47dc7bd8e1fcbc9a8059390c74fc5b6ce96f1bd2f7
... ...