Neue Pipeline
This commit is contained in:
parent
2e58dc0570
commit
eb6c152143
4 changed files with 13 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- lint
|
- lint
|
||||||
- deploy-dry
|
- deploy-test
|
||||||
- deploy
|
- deploy-prod
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
@ -28,32 +28,33 @@ markdown-lint:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_MERGE_REQUEST_ID
|
- if: $CI_MERGE_REQUEST_ID
|
||||||
|
|
||||||
ansible-deploy-dry:
|
ansible-deploy-test:
|
||||||
image: willhallonline/ansible:2.9-ubuntu-20.04
|
image: willhallonline/ansible:2.9-ubuntu-20.04
|
||||||
stage: deploy-dry
|
stage: deploy-test
|
||||||
interruptible: false
|
interruptible: false
|
||||||
before_script:
|
before_script:
|
||||||
- chmod 0755 /builds/mg/ansible
|
- chmod 0755 /builds/mg/ansible
|
||||||
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
|
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
|
||||||
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
|
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
|
||||||
|
- pip install 'pykeepass>3.2.0' --user
|
||||||
script:
|
script:
|
||||||
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --check --limit test --vault-password-file $ansible_vault_pass
|
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --limit test --vault-password-file $ansible_vault_pass
|
||||||
after_script:
|
after_script:
|
||||||
- rm /builds/mg/ansible/id_rsa_ansible_user
|
- rm /builds/mg/ansible/id_rsa_ansible_user
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_MERGE_REQUEST_ID
|
- if: $CI_MERGE_REQUEST_ID
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
ansible-deploy:
|
ansible-deploy-prod:
|
||||||
image: willhallonline/ansible:2.9-ubuntu-20.04
|
image: willhallonline/ansible:2.9-ubuntu-20.04
|
||||||
stage: deploy
|
stage: deploy-prod
|
||||||
interruptible: false
|
interruptible: false
|
||||||
before_script:
|
before_script:
|
||||||
- chmod 0755 /builds/mg/ansible
|
- chmod 0755 /builds/mg/ansible
|
||||||
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
|
- echo "$id_rsa_ansible_user" > /builds/mg/ansible/id_rsa_ansible_user
|
||||||
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
|
- chmod 0400 /builds/mg/ansible/id_rsa_ansible_user
|
||||||
|
- pip install 'pykeepass>3.2.0' --user
|
||||||
script:
|
script:
|
||||||
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --check --limit test --vault-password-file $ansible_vault_pass
|
- ansible-playbook playbooks/base/0_master.yml playbooks/service/* -i inventory --limit production --vault-password-file $ansible_vault_pass
|
||||||
after_script:
|
after_script:
|
||||||
- rm /builds/mg/ansible/id_rsa_ansible_user
|
- rm /builds/mg/ansible/id_rsa_ansible_user
|
||||||
rules:
|
rules:
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -27,7 +27,7 @@
|
||||||
url = https://github.com/ryandaniels/ansible-role-create-users
|
url = https://github.com/ryandaniels/ansible-role-create-users
|
||||||
[submodule "roles/geerlingguy.dotfiles"]
|
[submodule "roles/geerlingguy.dotfiles"]
|
||||||
path = roles/geerlingguy.dotfiles
|
path = roles/geerlingguy.dotfiles
|
||||||
url = https://git.mgrote.net/mg/geerlingguy.dotfiles
|
url = https://git.mgrote.net/mg/geerlingguy-dotfiles
|
||||||
[submodule "roles/geerlingguy.jenkins"]
|
[submodule "roles/geerlingguy.jenkins"]
|
||||||
path = roles/geerlingguy.jenkins
|
path = roles/geerlingguy.jenkins
|
||||||
url = https://github.com/geerlingguy/ansible-role-jenkins
|
url = https://github.com/geerlingguy/ansible-role-jenkins
|
||||||
|
|
|
@ -45,3 +45,4 @@
|
||||||
/var/lib/docker/volumes/ocrmypdf-auto_scan_output/*
|
/var/lib/docker/volumes/ocrmypdf-auto_scan_output/*
|
||||||
# https://github.com/restic/restic/issues/1005
|
# https://github.com/restic/restic/issues/1005
|
||||||
# https://forum.restic.net/t/exclude-syntax-confusion/1531/12
|
# https://forum.restic.net/t/exclude-syntax-confusion/1531/12
|
||||||
|
|
||||||
|
|
|
@ -18,3 +18,4 @@
|
||||||
# docker_image: 'alpine'
|
# docker_image: 'alpine'
|
||||||
# docker_volumes:
|
# docker_volumes:
|
||||||
# - "/var/run/docker.sock:/var/run/docker.sock"
|
# - "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue