
This patch set updates the ability to package (and subsequent publish) of the charts in the OpenStack-Helm-Infra repository. Change-Id: I6175325b0e7a668c22a7ec3ab08cae51ad4f9ab8 Signed-off-by: Tin Lam <tin@irrational.io>
53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
---
|
|
# Copyright 2020 VEXXHOST, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- hosts: all
|
|
tasks:
|
|
- name: Download current index
|
|
register: _get_url
|
|
failed_when: _get_url.status_code not in (200, 404)
|
|
get_url:
|
|
url: https://tarballs.opendev.org/openstack/openstack-helm-infra/index.yaml
|
|
dest: "{{ zuul.project.src_dir }}/index.yaml"
|
|
|
|
- name: Create a new index
|
|
when: _get_url.status_code == 404
|
|
shell: helm repo index {{ zuul.project.src_dir }} --url https://tarballs.opendev.org/openstack/openstack-helm-infra
|
|
|
|
- name: Merge into existing index
|
|
when: _get_url.status_code == 200
|
|
shell: helm repo index {{ zuul.project.src_dir }} --merge {{ zuul.project.src_dir }}/index.yaml --url https://tarballs.opendev.org/openstack/openstack-helm-infra
|
|
|
|
# TODO: Remove this once HTK is seeded in tarballs.o.o
|
|
- name: Update the HTK dependencies
|
|
shell: |
|
|
sed -i 's#file://../helm-toolkit#https://tarballs.opendev.org/openstack/openstack-helm-infra#g' index.yaml
|
|
chdir:
|
|
args:
|
|
executable: /bin/bash
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
|
|
- name: Update Helm repository
|
|
synchronize:
|
|
mode: pull
|
|
src: "{{ zuul.project.src_dir }}"
|
|
dest: "{{ zuul.executor.work_root }}/artifacts/"
|
|
verify_host: true
|
|
rsync_opts:
|
|
- "--include=index.yaml"
|
|
- "--include=*.tgz"
|
|
- "--exclude=*"
|
|
...
|