Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions codefresh/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Helm Chart for Codefresh On-Prem
name: codefresh
version: 2.8.1
version: 2.8.2
keywords:
- codefresh
home: https://codefresh.io/
Expand All @@ -18,10 +18,8 @@ annotations:
# artifacthub.io/containsSecurityUpdates: "true"
# supported kinds are added, changed, deprecated, removed, fixed and security.
artifacthub.io/changes: |
- kind: added
description: "Documentation about external MongoDB Atlas"
- kind: fixed
description: "Fix postgresql seed job"
description: "Fix createDB function in postgres seed job"
dependencies:
- name: cf-common
repository: oci://quay.io/codefresh/charts
Expand Down
2 changes: 1 addition & 1 deletion codefresh/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Codefresh On-Premises

![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)
![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)

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

Expand Down
8 changes: 6 additions & 2 deletions codefresh/files/postgresSeedJobScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ POSTGRES_SEED_USER="${POSTGRES_SEED_USER:-$POSTGRES_USER}"
POSTGRES_SEED_PASSWORD="${POSTGRES_SEED_PASSWORD:-$POSTGRES_PASSWORD}"

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

function createUser() {
Expand All @@ -37,7 +39,9 @@ function createUser() {
}

function grantPrivileges() {
psql -c "GRANT ALL ON DATABASE ${1} TO ${POSTGRES_USER}"
local db=$1
echo "Granting privileges on $db to ${POSTGRES_USER}"
psql -c "GRANT ALL ON DATABASE ${db} TO ${POSTGRES_USER}"
}

function runSeed() {
Expand Down