blob: 29b4a4d75e6037129fc2f2ad2d49a581dba88af4 [file] [log] [blame]
Mohammed Nasere04accd2023-01-15 20:07:27 -05001#!/bin/bash
2
3# Copyright (c) 2023 VEXXHOST, Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may
6# not use this file except in compliance with the License. You may obtain
7# a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations
15# under the License.
16
17# This script is used to sync the charts from the upstream repositories into
18# the charts directory. It is used to update the charts to the versions which
19# are defined in this file.
20
21set -xe
22
23# Determine the root path for Atmosphere
24ATMOSPHERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )"
25
26# Create work directory to avoid cluttering up workspace
27WORKDIR=$(mktemp -d)
28function cleanup {
29 rm -rfv ${WORKDIR}
30}
31trap cleanup EXIT
32
33# Clean-up all of the existing charts
34rm -rfv ${ATMOSPHERE}/charts/*
35
36# Switch to folder where we will be syncing charts
37pushd ${WORKDIR}
38
39PERCONA_REF="25d8099e1e1f807b6bc90d8d92b6a31a6dff082b"
40curl -LO https://github.com/percona/percona-helm-charts/archive/${PERCONA_REF}.tar.gz
41tar --strip-components=2 -C ${ATMOSPHERE}/charts -xvzf ${PERCONA_REF}.tar.gz percona-helm-charts-${PERCONA_REF}/charts/pxc-operator
42
43# Switch back to original directory
44popd