Skip to content

Commit

Permalink
Automation for moving assets from bintray to github (#277)
Browse files Browse the repository at this point in the history
Travis build script modifications to move helm charts from bintray to github pages using travis github pages provider.
  • Loading branch information
ragsns authored May 10, 2021
1 parent 7692c05 commit 8fbc412
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 21 deletions.
45 changes: 25 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,33 @@ deploy:
- pega-pivotal-pks-example.tar.gz
skip_cleanup: true
on:
repo: pegasystems/pega-helm-charts
repo: $TRAVIS_REPO_SLUG
tags: true
- provider: bintray
file: descriptor.json
user: bintrayautomation
key:
- provider: pages
github-token: $GITHUB_TOKEN
api_key:
secure: >
M1CPmmjJ1OI2luWFRW9Aqregj3b4rQLSnP4ROurkHkewB+HwoZ+
QHAQ4JJD0B+br2AddaGKgN1rdzYpyvg0Cl7ZhWnMb96bE+lVbmD
zYnUc+Iwd8/PWXNoaFuB5sn5LPVESe8H/ZLdP0IyMbBknBDgdNg
KpD9XqH7/UrrNT9jvZSpGFAcMCwLVFiQ1auusnSLOYVr611Jadp
NZarx7QgPLBtlit+cfi/vEGy7GyYTtFzSbM86gBnm1kViSVM4w1
bE4cFs+14KVNiNiwpSzFzK/gBncqQVTz6yaD3bV48Cla5sz3/sD
kh3If7pUhcmMYyy9BPk35176TWTHKcqATv/5GxDvQpgaBMlyl0D
hwhb2d++ZZ6V+kYYj+Uf4m4NaxGV6WNrUnW+IPw9qlBWFHnw17u
80HU5GapXXNedUi2CjzrH25A0Y6DHqfZubDBXJh31RfWKz0r58b
LSGLYxdl96purfLUCeSrsKkZAWS59EmpXiR/f+zSbNmlpG+ryVB
sQIPG+cwdPSVUdGBGVp3QzEjVze6gABSQ/2GaMeRterjzBypi8a
b4vbIyxY905deoMAwcQHUcvybpNJfRcaowToK0BnMNhy8pn26KY
ct3oGLVxQe6rlGbQNZrFePSCyNd/ZfYlkWDcLh/j0OH0gdspHTd
Dfsy8dgS8QzvgNsNKRHk=
GuZqxcgBOueUOJWg6t5NaCTIssfkptgdAjwyWm/6SaVXqs9Kdgy
EawtYSu0WLh815qGmuxgVjMbvvkAvtbBXanKH+BheRl1cQjYnza
XJlL+Oa/xxzCqz1n4txqtDMR7l/loqrMTzCRe2bZ806z3+uXpXh
CO12+LwvMDJAAddDkX+2wRE240/1f/0lVlZ2lNzgBitC63jAf1H
ml3/KrgHsTYvNB5M6qKn8C24DcC6PMe012K3hL0O+F+er9Mb39R
FcSLTjF/6AiLvpK4oDAg8sBgciXVq0FPhCXvjbINGB/AY7jM5Ql
0A6ngngZjsjefn+NbtZ3aK230h2m0XM+dN7FJCbtRQeqvczcwRT
/wpDimpzFR0rf/NdXV4G+UZYI6a3bjqKYP5IPN8BbzVo8KzlbGW
JeJLV40gW7EbdyT57R2dNp46I17c1KL8atQH97n3yv9d9ZaC87O
6tOohLmue7L3lKxPDpY60VFna5BjJwvrhW4gvsd11Ko4c39FSu8
ogBSZ6E1EOlmVZDX+cBjuw4dGihcrHqWW5V3k2X/ksAKb+4A74g
AG8pCr/ifPEj9kTWb71IIF5RHkD6JqeGJdKaWFHDpWlYhKNTLRt
3gmcgdLmM5MN9A5khwBzPYiF5oaWT1COxh/Rjdz5V0+jUvyRvc9
a/rvc6hM6quXSmlAwA0U=
file:
- index.yaml
skip_cleanup: true
target_branch: gh-pages
keep_history: true
verbose: true
on:
all_branches: true
tags: true
repo: $TRAVIS_REPO_SLUG
draft: true
10 changes: 9 additions & 1 deletion before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ export PEGA_FILE_NAME=pega-${CHART_VERSION}.tgz
export ADDONS_FILE_NAME=addons-${CHART_VERSION}.tgz
export BACKINGSERVICES_FILE_NAME=backingservices-${CHART_VERSION}.tgz
cat descriptor-template.json | jq '.files[0].includePattern=env.PEGA_FILE_NAME' | jq '.files[0].uploadPattern=env.PEGA_FILE_NAME' | jq '.files[1].includePattern=env.ADDONS_FILE_NAME' | jq '.files[1].uploadPattern=env.ADDONS_FILE_NAME' | jq '.files[2].includePattern=env.BACKINGSERVICES_FILE_NAME' | jq '.files[2].uploadPattern=env.BACKINGSERVICES_FILE_NAME' > descriptor.json
# Get the latest index.yaml from github.io
curl -o index.yaml https://pegasystems.github.io/pega-helm-charts/index.yaml
# Clone the versions from gh-pages to a temp directory - xyz
# The versions will be re-installed in temporary directory - temp_gh_pages
git clone -b gh-pages https://github.com/${TRAVIS_REPO_SLUG} temp_gh_pages
cp temp_gh-pages/* .
rm -rf temp_gh-pages
# Package up the changed version
helm package --version ${CHART_VERSION} ./charts/pega/
helm package --version ${CHART_VERSION} ./charts/addons/
helm package --version ${CHART_VERSION} ./charts/backingservices/
helm repo index --merge index.yaml --url https://pegasystems.github.io/pega-helm-charts/ .
# and merge it
helm repo index --merge index.yaml --url https://pegasystems.github.io/pega-helm-charts/ .

0 comments on commit 8fbc412

Please sign in to comment.