-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
s.goubaud
authored and
s.goubaud
committed
Nov 5, 2019
1 parent
568924e
commit 0f1ad2b
Showing
4 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.deploy | ||
.tmp | ||
.toindex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Helm Repository</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# helmrepo | ||
My personnal helm repo | ||
# Gsyltc's Helm Repository | ||
|
||
It-s my personnal helm repository for Jeedom and others |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
CHARTS_DIR=$HOME/workspace/projects/jeedom/helm/charts | ||
WORKING_DIR=$HOME/workspace/repositories/my-helm-repo | ||
|
||
TMP_DIR=$WORKING_DIR/.tmp | ||
DEPLOY_DIR=$WORKING_DIR/.deploy | ||
INDEX_DIR=$WORKING_DIR/.toindex | ||
|
||
# Updatye local repositorie | ||
cd $WORKING_DIR | ||
git pull | ||
|
||
mkdir -p $TMP_DIR | ||
mkdir -p $INDEX_DIR | ||
|
||
for currentDirectory in `find $CHARTS_DIR -maxdepth 1 -mindepth 1 -type d` | ||
do | ||
echo "Current directory : $currentDirectory" | ||
helm package $currentDirectory --destination $TMP_DIR | ||
|
||
cd $TMP_DIR | ||
for currentFile in `find -type f` | ||
do | ||
echo "Current file : $currentFile" | ||
if [ -f $DEPLOY_DIR/$currentFile ] ; then | ||
echo "\033[33;1m [WARNING] $currentFile already exist\033[0;1m" | ||
rm $currentFile | ||
else | ||
echo "Moving file" | ||
mv $currentFile $WORKING_DIR/.toindex | ||
echo "\033[35;1m [INFO] $currentFile updated\033[0;1m" | ||
fi | ||
done | ||
done | ||
|
||
if [ "$(ls -A $INDEX_DIR)" ] ; then | ||
echo "CR Upload" | ||
cr upload -p $WORKING_DIR/.toindex | ||
echo "======> Updating index.yaml" | ||
cr index -i $WORKING_DIR/index.yaml -p $INDEX_DIR | ||
mv $INDEX_DIR/*.tgz $DEPLOY_DIR | ||
else | ||
echo "Nothing to update" | ||
fi | ||
|
||
git add -A . | ||
git commit -a -m "Updating repository" | ||
git push origin version | ||
helm repo update |