Compare commits

...

5 Commits

Author SHA1 Message Date
Danny Bessems e8822fc8da chore(release): 0.8.1 [skip ci]
## [0.8.1](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.8.0...v0.8.1) (2023-07-14)

### Bug Fixes

* Add missing dependency ([6270499](6270499efe))
* Fix linebreak ([fa2c72c](fa2c72cb68))
* Refactor update script for bash interpreter ([2725f36](2725f36017))
* Workaround for set locale warning ([0af8f2a](0af8f2ac5e))
2023-07-14 13:29:52 +00:00
Danny Bessems fa2c72cb68 fix: Fix linebreak
continuous-integration/drone/push Build is passing Details
2023-07-14 15:27:18 +02:00
Danny Bessems 2725f36017 fix: Refactor update script for bash interpreter
continuous-integration/drone/push Build is failing Details
2023-07-14 15:25:42 +02:00
Danny Bessems 0af8f2ac5e fix: Workaround for set locale warning 2023-07-14 15:25:00 +02:00
Danny Bessems 6270499efe fix: Add missing dependency 2023-07-14 14:57:31 +02:00
3 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,13 @@
## [0.8.1](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.8.0...v0.8.1) (2023-07-14)
### Bug Fixes
* Add missing dependency ([6270499](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/6270499efecb8ae1474f1ce29c8f4003da3916df))
* Fix linebreak ([fa2c72c](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/fa2c72cb68254dd0e27f12220f8056b9223223ed))
* Refactor update script for bash interpreter ([2725f36](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/2725f360179b3dab1d77d5f429b2f60d4aabcd4a))
* Workaround for set locale warning ([0af8f2a](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/commit/0af8f2ac5ea0f8453fdb7120aeb7eff15aa88e42))
# [0.8.0](https://code.spamasaurus.com/djpbessems/ContainerImage.JSONServer/compare/v0.7.3...v0.8.0) (2023-07-14)

View File

@ -17,7 +17,11 @@ ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
jq && \
curl \
jq \
locales && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen && \
npm install -g --omit=optional --omit=dev \
json-server && \
npm cache clean --force && \

View File

@ -55,7 +55,7 @@ data:
</body>
</html>
update.sh: |
#!/bin/sh
#!/bin/bash
while getopts u: flag
do
@ -75,18 +75,18 @@ data:
do
echo '['$(date "+%Y-%m-%d %H:%M:%S")']' $(curl -ks https://$URL/components | jq length) 'known releases in database'
echo -n $(helm list --all-namespaces --output json | jq -c '.[]') | while IFS= read -r release;
do
APP_NAME=$(echo $release | jq -r '.name')
for entry in $(helm list --all-namespaces --output json | jq -r '.[] | @base64'); do
RELEASE=$(echo $entry | base64 -d)
APP_NAME=$(echo $RELEASE | jq -r '.name')
APP_ID=$(curl -ks https://$URL/components?name=$APP_NAME | jq -r '.[0].id')
# Release is not yet in database
[ "$APP_ID" == null ] && {
curl -ks -X POST https://$URL/components -H 'Content-Type: application/json' --data "$release"
curl -ks -X POST https://$URL/components -H 'Content-Type: application/json' --data "$RELEASE" -o /dev/null
}
# Release is already in database
[ "$APP_ID" != null ] && {
curl -ks -X PATCH https://$URL/components/$APP_ID -H 'Content-Type: application/json' --data "$release"
curl -ks -X PATCH https://$URL/components/$APP_ID -H 'Content-Type: application/json' --data "$RELEASE" -o /dev/null
}
done