-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*feat: Make it possible to define the used PostgreSQL version
*feat: Adjust the docs and the release process
- Loading branch information
Showing
14 changed files
with
133 additions
and
17 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
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
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
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,34 @@ | ||
#!/usr/bin/env bash | ||
NEED_COMMIT=false | ||
|
||
set -euo pipefail | ||
|
||
echo "${PRIVATE_YML}" > postgres-release/config/private.yml | ||
|
||
pushd postgres-release | ||
CURRENT_BLOBS=$(bosh blobs) | ||
CURRENT_VERSION=$(curl -s -L https://api.github.com/repos/mikefarah/yq/releases/latest | grep "tag_name" | sed s/\"tag_name\":\//g | sed s/\"//g | sed s/\,//g | sed s/v//g | xargs) | ||
mv ../yq-src/yq_darwin_amd64 ../yq-src/yq-${CURRENT_VERSION} | ||
BLOB_PATH=$(ls ../yq-src/yq-${CURRENT_VERSION}) | ||
FILENAME=$( basename ${BLOB_PATH} ) | ||
OLD_BLOB_PATH=$(cat config/blobs.yml | grep "yq-${MAJOR_VERSION}" | cut -f1 -d:) | ||
if ! echo "${CURRENT_BLOBS}" | grep "${FILENAME}" ; then | ||
NEED_COMMIT=true | ||
echo "adding ${FILENAME}" | ||
bosh add-blob --sha2 "${BLOB_PATH}" "yq/${FILENAME}" | ||
bosh remove-blob ${OLD_BLOB_PATH} | ||
bosh upload-blobs | ||
fi | ||
|
||
if ${NEED_COMMIT}; then | ||
echo "-----> $(date): Creating git commit" | ||
git config user.name "$GIT_USER_NAME" | ||
git config user.email "$GIT_USER_EMAIL" | ||
git add . | ||
|
||
git --no-pager diff --cached | ||
if [[ "$( git status --porcelain )" != "" ]]; then | ||
git commit -am "Bump packages" | ||
fi | ||
fi | ||
popd |
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,17 @@ | ||
--- | ||
platform: linux | ||
|
||
inputs: | ||
- name: yq-src | ||
|
||
outputs: | ||
- name: postgres-release | ||
|
||
run: | ||
path: postgres-release/ci/tasks/bump-yq-packages/task.sh | ||
|
||
params: | ||
PRIVATE_YML: | ||
MAJOR_VERSION: | ||
GIT_USER_NAME: CI Bot | ||
GIT_USER_EMAIL: bots@cloudfoundry.org |
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
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
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ packages: | |
- postgres-13 | ||
- postgres-15 | ||
- postgres-16 | ||
- yq-4 | ||
|
||
consumes: | ||
- name: database | ||
|
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
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
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
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 @@ | ||
postgresql: | ||
default: 16 | ||
major_version: | ||
16: | ||
minor_version: "16.3" | ||
15: | ||
minor_version: "15.6" | ||
13: | ||
minor_version: "13.14" | ||
11: | ||
minor_version: "11.22" |
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,17 @@ | ||
#!/bin/bash -exu | ||
|
||
function main() { | ||
install | ||
|
||
} | ||
|
||
function install() { | ||
|
||
echo "Install yq..." | ||
mkdir -p "${BOSH_INSTALL_TARGET}/bin" | ||
cp -a yq/yq-4.* "${BOSH_INSTALL_TARGET}/bin/yq" | ||
chmod +x "${BOSH_INSTALL_TARGET}/bin/yq" | ||
|
||
} | ||
|
||
main |
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,4 @@ | ||
--- | ||
name: yq-4 | ||
files: | ||
- yq/yq-4.* |