feat(ci): added yamllint
This commit is contained in:
parent
c32fc57834
commit
6c69b8fa61
2 changed files with 29 additions and 14 deletions
|
|
@ -8,24 +8,25 @@ deployment:
|
|||
rules:
|
||||
|
||||
# run only on push to default branch
|
||||
- if:
|
||||
'$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH ==
|
||||
$CI_DEFAULT_BRANCH'
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||
- when: "never"
|
||||
|
||||
# prepare ssh
|
||||
before_script:
|
||||
|
||||
# prepare ssh
|
||||
- |
|
||||
# prepare ssh
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$SSH_CONFIG" > ~/.ssh/config
|
||||
echo "$SSH_DEPLOYMENT_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
# prepare ssh
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$SSH_CONFIG" > ~/.ssh/config
|
||||
echo "$SSH_DEPLOYMENT_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
# deployment commands
|
||||
script:
|
||||
|
||||
- |
|
||||
# install ansible roles dependancies
|
||||
ssh $SSH_DEPLOYMENT_USER@$ANSIBLE_SERVER "sudo /usr/local/bin/ansible-galaxy install -r /etc/ansible/roles/requirements.yaml --force"
|
||||
# install ansible roles dependancies
|
||||
ssh $SSH_DEPLOYMENT_USER@$ANSIBLE_SERVER \
|
||||
"sudo /usr/local/bin/ansible-galaxy install -r /etc/ansible/roles/requirements.yaml --force"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue