Proper yaml linting.
This commit is contained in:
parent
df13e01b46
commit
eba63d7cdd
1 changed files with 33 additions and 32 deletions
65
ci/drone.yml
65
ci/drone.yml
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
@ -12,24 +13,24 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
GIT_ASKPASS: "/bin/git-askpass-from-env"
|
GIT_ASKPASS: "/bin/git-askpass-from-env"
|
||||||
commands:
|
commands:
|
||||||
# Installing little script to get git password from environment.
|
# Installing little script to get git password from environment.
|
||||||
- wget https://download.ad5001.eu/other/git-askpass-from-env.sh
|
- wget https://download.ad5001.eu/other/git-askpass-from-env.sh
|
||||||
- mv git-askpass-from-env.sh /bin/git-askpass-from-env
|
- mv git-askpass-from-env.sh /bin/git-askpass-from-env
|
||||||
- chmod +x /bin/git-askpass-from-env
|
- chmod +x /bin/git-askpass-from-env
|
||||||
# Changing submodule URL to https://<USERNAME>@git.ad5001.eu/Ad5001/omegamma.git
|
# Changing submodule URL to https://<USERNAME>@git.ad5001.eu/Ad5001/omegamma.git
|
||||||
- git submodule init
|
- git submodule init
|
||||||
- git config submodule.sub/omegamma.url https://$DRONE_GIT_USERNAME@git.ad5001.eu/Ad5001/omegamma.git
|
- git config submodule.sub/omegamma.url https://$DRONE_GIT_USERNAME@git.ad5001.eu/Ad5001/omegamma.git
|
||||||
# Fetching submodules
|
# Fetching submodules
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Build dev.apps.ad5001.eu
|
- name: Build dev.apps.ad5001.eu
|
||||||
image: xdevbase/hugo-builder:latest
|
image: xdevbase/hugo-builder:latest
|
||||||
commands:
|
commands:
|
||||||
- hugo --config ci/dev.config.yml
|
- hugo --config ci/dev.config.yml
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ master ]
|
branch: [master]
|
||||||
|
|
||||||
- name: Remove old dev.apps.ad5001.eu
|
- name: Remove old dev.apps.ad5001.eu
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
settings:
|
settings:
|
||||||
|
@ -40,14 +41,14 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: SSH_PASSWORD
|
from_secret: SSH_PASSWORD
|
||||||
envs:
|
envs:
|
||||||
- DEV_WWW_PATH
|
- DEV_WWW_PATH
|
||||||
script:
|
script:
|
||||||
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
||||||
- cd "$DEV_WWW_PATH"
|
- cd "$DEV_WWW_PATH"
|
||||||
- rm -rf *
|
- rm -rf *
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ master ]
|
branch: [master]
|
||||||
|
|
||||||
- name: Deploy dev.apps.ad5001.eu
|
- name: Deploy dev.apps.ad5001.eu
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
|
@ -62,17 +63,17 @@ steps:
|
||||||
from_secret: DEV_WWW_PATH
|
from_secret: DEV_WWW_PATH
|
||||||
source: public/*
|
source: public/*
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ master ]
|
branch: [master]
|
||||||
|
|
||||||
- name: Build apps.ad5001.eu
|
- name: Build apps.ad5001.eu
|
||||||
image: xdevbase/hugo-builder:latest
|
image: xdevbase/hugo-builder:latest
|
||||||
commands:
|
commands:
|
||||||
- hugo
|
- hugo
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ prod ]
|
branch: [prod]
|
||||||
|
|
||||||
- name: Remove old apps.ad5001.eu
|
- name: Remove old apps.ad5001.eu
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
environment:
|
environment:
|
||||||
|
@ -86,14 +87,14 @@ steps:
|
||||||
password:
|
password:
|
||||||
from_secret: SSH_PASSWORD
|
from_secret: SSH_PASSWORD
|
||||||
envs:
|
envs:
|
||||||
- PROD_WWW_PATH
|
- PROD_WWW_PATH
|
||||||
script:
|
script:
|
||||||
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
- export DEV_WWW_PATH=$DEV_WWW_PATH
|
||||||
- cd "$PROD_WWW_PATH"
|
- cd "$PROD_WWW_PATH"
|
||||||
- rm -rf *
|
- rm -rf *
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ prod ]
|
branch: [prod]
|
||||||
|
|
||||||
- name: Deploy apps.ad5001.eu
|
- name: Deploy apps.ad5001.eu
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
|
@ -108,5 +109,5 @@ steps:
|
||||||
from_secret: PROD_WWW_PATH
|
from_secret: PROD_WWW_PATH
|
||||||
source: public/*
|
source: public/*
|
||||||
when:
|
when:
|
||||||
event: [ push, tag ]
|
event: [push, tag]
|
||||||
branch: [ prod ]
|
branch: [prod]
|
||||||
|
|
Loading…
Reference in a new issue