File tree Expand file tree Collapse file tree 12 files changed +125
-1
lines changed
Expand file tree Collapse file tree 12 files changed +125
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ kind : pipeline
3+ type : docker
4+ name : production pipeline
5+
6+ clone :
7+ depth : 1
8+
9+ steps :
10+
11+ - name : deploy
12+ image : plugins/ansible:3
13+ settings :
14+ playbook : deploy.yaml
15+ galaxy : roles/requirements.yaml
16+ inventory : inventories/production/hosts
17+ private_key :
18+ from_secret : ansible_private_key
19+ vault_password :
20+ from_secret : ansible_vault_password
21+
22+ trigger :
23+ branch :
24+ event :
25+ - tag
26+ ...
Original file line number Diff line number Diff line change 1+ roles /docker-deploy
Original file line number Diff line number Diff line change 11# nexus
2- Sonatype Nexus Repository Manager 3
2+ Sonatype Nexus Repository Manager 3 on Docker Swarm
3+
4+ ## Requirements
5+ - Ansible 2.10+
6+
7+ ## Installing Dependencies
8+ ``` bash
9+ ansible-galaxy install -r roles/requirements.yaml -p ./roles --force
10+ ```
11+
12+ ## Deploy to Docker Swarm
13+ ``` bash
14+ ansible-playbook deploy.yaml -i inventories/production/hosts --vault-id ~ /.tokens/master_id
15+ ```
16+
Original file line number Diff line number Diff line change 1+ # ansible-playbook deploy.yaml -i inventories/prod/hosts --vault-id ~/.tokens/master_id
2+
3+ - hosts : all
4+ strategy : free
5+ roles :
6+ - docker-deploy
7+
8+
Original file line number Diff line number Diff line change 1+ drone_branch : ' {{ lookup("env", "DRONE_BRANCH") }}'
2+ drone_build_created : ' {{ lookup("env", "DRONE_BUILD_CREATED") }}'
3+ drone_build_event : ' {{ lookup("env", "DRONE_BUILD_EVENT") }}'
4+ drone_build_link : ' {{ lookup("env", "DRONE_BUILD_LINK") }}'
5+ drone_build_number : ' {{ lookup("env", "DRONE_BUILD_NUMBER") }}'
6+ drone_build_started : ' {{ lookup("env", "DRONE_BUILD_STARTED") }}'
7+ drone_commit : ' {{ lookup("env", "DRONE_COMMIT") }}'
8+ drone_commit_link : ' {{ lookup("env", "DRONE_COMMIT_LINK") }}'
9+ drone_tag : ' {{ lookup("env", "DRONE_TAG") }}'
10+ drone_repo_visibility : ' {{ lookup("env", "DRONE_REPO_VISIBILITY") }}'
Original file line number Diff line number Diff line change 1+ git_owner : ' {{ lookup("env", "DRONE_REPO_NAMESPACE") }}'
2+ git_repository : ' {{ lookup("env", "DRONE_REPO_NAME") }}'
3+ git_branch : ' {{ "production" if git_tag else drone_branch }}'
4+ git_version : ' {{ git_tag if git_tag else drone_branch }}'
5+ git_tag : ' {{ drone_tag }}'
6+ git_commit : ' {{ drone_commit }}'
7+ git_commit_link : ' {{ drone_commit_link }}'
8+ git_repository_url : ' {{ lookup("env", "DRONE_REPO_LINK") }}'
Original file line number Diff line number Diff line change 1+ # directories
2+ directories_ansible : ' {{ playbook_dir }}'
3+ directories_build : ~/drone_builds
4+ directories_docker_socket : /var/run/docker.sock
5+ directories_files : ' {{ directories_home }}/.diesel/{{ git_repository }}/{{ git_branch }}/files'
6+ directories_home : ' {{ ansible_env.HOME }}'
7+ directories_roles : ' {{ directories_ansible }}/roles'
8+ directories_src : /drone/src/
9+ directories_ssl_certificates : ' /etc/ssl/certs/'
10+ directories_ssl_certificates_file : ' {{ directories_ssl_certificates }}ca-certificates.crt'
11+ directories_ssl_certificates_host : ' {{ directories_ssl_certificates }}'
12+
13+ proxy_router_main : ' {{ git_repository }}-main'
Original file line number Diff line number Diff line change 1+ env : " prod"
2+
3+ proxy_domains :
4+ - ' {{ env }}.diesel.net'
Original file line number Diff line number Diff line change 1+ proxy_domains :
2+ - nexus.diesel.net
Original file line number Diff line number Diff line change 1+ all:
2+ children:
3+
4+ tools:
5+ hosts:
6+ tools.diesel.net
7+
8+ vars:
9+ ansible_user: automation
10+ ansible_python_interpreter: /usr/bin/python3
You can’t perform that action at this time.
0 commit comments