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: [
'pip install pipenv -qq',
'pipenv --bare install --keep-outdated',
# temp disabled
# 'pipenv check -i 37752',
'pipenv check -i 37752',
'pipenv --bare install --dev --keep-outdated',
'pipenv run pipenv-setup check',
],
@ -287,43 +286,19 @@ local PipelineDocs = {
'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',
image: 'appleboy/drone-scp',
image: 'plugins/s3-sync',
settings: {
host: { from_secret: 'ssh_host' },
key: { from_secret: 'ssh_key' },
rm: true,
source: 'docs/public/*',
strip_components: 2,
target: '/var/www/virtual/geeklab/html/docker-tidy.geekdocs.de/',
username: { from_secret: 'ssh_username' },
},
},
{
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' },
access_key: { from_secret: 's3_access_key' },
bucket: 'geekdocs',
delete: true,
endpoint: 'https://sp.rknet.org',
path_style: true,
secret_key: { from_secret: 's3_secret_access_key' },
source: 'docs/public/',
strip_prefix: 'docs/public/',
target: '/${DRONE_REPO_NAME}',
},
},
],

View File

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