-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathzuul-deploy.yml
More file actions
67 lines (62 loc) · 2.34 KB
/
Copy pathzuul-deploy.yml
File metadata and controls
67 lines (62 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
---
- name: Create vars/packit/dev.yml and deploy
hosts: all
tasks:
- name: Install packages for deployment
ansible.builtin.package:
name:
- ansible
- python-openshift
- python-pip
- python-passlib # for using htpasswd ansible module
- make
become: true
# For the "equalto" test we need Jinja2>=2.8.x, there's 2.7.2 in centos7
# Needs to be installed before running the set-facts.yml playbook
- name: Install Jinja-2.8.1
ansible.builtin.pip:
name: Jinja2==2.8.1
become: true
when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
- name: Get token
ansible.builtin.command: oc whoami -t
register: kubeconfig_token
become: true
changed_when: false
- name: Create packit/dev.yml
ansible.builtin.copy:
content: |
# See https://github.com/packit/deployment/blob/main/vars/packit/dev_template.yml
project: myproject
host: https://127.0.0.1:8443
api_key: {{ kubeconfig_token.stdout }}
validate_certs: false
check_up_to_date: false
# Whether to deploy and check that pod
with_tokman: true
with_beat: true
with_fedmsg: true
# TODO: why these two (dashboard, pushgateway) don't work in Zuul? Error msg:
# "The task includes an option with an undefined variable. The error was: the inline
# if-expression on line 92/95 evaluated to false and no else section was defined."
with_dashboard: false
with_pushgateway: false
# Use stg images
image: quay.io/packit/packit-service:stg
image_worker: quay.io/packit/packit-worker:stg
image_fedmsg: quay.io/packit/packit-service-fedmsg:stg
image_dashboard: quay.io/packit/dashboard:stg
image_tokman: quay.io/packit/tokman:stg
dest: "{{ zuul.project.src_dir }}/vars/packit/dev.yml"
mode: 0644
- name: Actually deploy
ansible.builtin.command: make deploy
environment:
DEPLOYMENT: dev
ANSIBLE_STDOUT_CALLBACK: debug
args:
chdir: "{{ zuul.project.src_dir }}"
become: true
changed_when: true