-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·86 lines (75 loc) · 1.9 KB
/
install.sh
File metadata and controls
executable file
·86 lines (75 loc) · 1.9 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_python' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
# make sure this script runs at the repo root
cd "$(dirname "$(realpath -e "$0")")"/../../..
REPO_ROOT="$PWD"
set -euv
if [ "${GITHUB_REF##refs/tags/}" = "${GITHUB_REF}" ]
then
TAG_BUILD=0
else
TAG_BUILD=1
fi
if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then
pip install -r ../pulpcore/doc_requirements.txt
pip install -r doc_requirements.txt
fi
pip install -r functest_requirements.txt
cd .ci/ansible/
TAG=ci_build
if [[ "$TEST" == "plugin-from-pypi" ]]; then
PLUGIN_NAME=pulp_python
else
PLUGIN_NAME=./pulp_python
fi
if [ "${TAG_BUILD}" = "1" ]; then
# Install the plugin only and use published PyPI packages for the rest
# Quoting ${TAG} ensures Ansible casts the tag as a string.
cat >> vars/main.yaml << VARSYAML
image:
name: pulp
tag: "${TAG}"
plugins:
- name: pulpcore
source: pulpcore
- name: pulp_python
source: "${PLUGIN_NAME}"
services:
- name: pulp
image: "pulp:${TAG}"
volumes:
- ./settings:/etc/pulp
VARSYAML
else
cat >> vars/main.yaml << VARSYAML
image:
name: pulp
tag: "${TAG}"
plugins:
- name: pulp_python
source: "${PLUGIN_NAME}"
- name: pulpcore
source: ./pulpcore
services:
- name: pulp
image: "pulp:${TAG}"
volumes:
- ./settings:/etc/pulp
VARSYAML
fi
cat >> vars/main.yaml << VARSYAML
pulp_settings: null
VARSYAML
if [[ "$TEST" == "pulp" || "$TEST" == "performance" || "$TEST" == "s3" || "$TEST" == "plugin-from-pypi" ]]; then
sed -i -e '/^services:/a \
- name: pulp-fixtures\
image: docker.io/pulp/pulp-fixtures:latest\
env: {BASE_URL: "http://pulp-fixtures"}' vars/main.yaml
fi
ansible-playbook build_container.yaml
ansible-playbook start_container.yaml