Skip to content

Commit 61e1c53

Browse files
onprem: 2.8.2 (#72)
1 parent e633aba commit 61e1c53

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

codefresh/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: Helm Chart for Codefresh On-Prem
33
name: codefresh
4-
version: 2.8.1
4+
version: 2.8.2
55
keywords:
66
- codefresh
77
home: https://codefresh.io/
@@ -18,10 +18,8 @@ annotations:
1818
# artifacthub.io/containsSecurityUpdates: "true"
1919
# supported kinds are added, changed, deprecated, removed, fixed and security.
2020
artifacthub.io/changes: |
21-
- kind: added
22-
description: "Documentation about external MongoDB Atlas"
2321
- kind: fixed
24-
description: "Fix postgresql seed job"
22+
description: "Fix createDB function in postgres seed job"
2523
dependencies:
2624
- name: cf-common
2725
repository: oci://quay.io/codefresh/charts

codefresh/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh On-Premises
22

3-
![Version: 2.8.1](https://img.shields.io/badge/Version-2.8.1-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
3+
![Version: 2.8.2](https://img.shields.io/badge/Version-2.8.2-informational?style=flat-square) ![AppVersion: 2.8.0](https://img.shields.io/badge/AppVersion-2.8.0-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/getting-started/intro-to-codefresh/) to Kubernetes.
66

codefresh/files/postgresSeedJobScript.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ POSTGRES_SEED_USER="${POSTGRES_SEED_USER:-$POSTGRES_USER}"
2828
POSTGRES_SEED_PASSWORD="${POSTGRES_SEED_PASSWORD:-$POSTGRES_PASSWORD}"
2929

3030
function createDB() {
31-
psql -tc "SELECT 1 FROM pg_database WHERE datname = '${1}'" | grep -q 1 || psql -c "CREATE DATABASE ${1}"
31+
local db=$1
32+
echo "Creating ${db} database"
33+
psql -c "CREATE DATABASE ${db}" 2>&1 || true
3234
}
3335

3436
function createUser() {
@@ -37,7 +39,9 @@ function createUser() {
3739
}
3840

3941
function grantPrivileges() {
40-
psql -c "GRANT ALL ON DATABASE ${1} TO ${POSTGRES_USER}"
42+
local db=$1
43+
echo "Granting privileges on $db to ${POSTGRES_USER}"
44+
psql -c "GRANT ALL ON DATABASE ${db} TO ${POSTGRES_USER}"
4145
}
4246

4347
function runSeed() {

0 commit comments

Comments
 (0)