Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterizes default branch for repo #937

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions dockerfiles/centos-7-pg10/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-7-pg11/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-7-pg12/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-7-pg13/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-7-pg14/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-8-pg10/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-8-pg11/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-8-pg12/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-8-pg13/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
11 changes: 8 additions & 3 deletions dockerfiles/centos-8-pg14/scripts/fetch_and_build_rpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage: fetch_and_build_rpm build_type build_directory

fetch_and_build_rpm builds Red Hat packages using local build files. The build
type 'release' builds the latest release tag, 'nightly' builds a nightly from
the latest 'master' commit, and any other type is interpreted as a git ref to
the latest on default branch commit, and any other type is interpreted as a git ref to
facilitate building one-off packages for customers.
E_O_USAGE

Expand Down Expand Up @@ -58,7 +58,12 @@ source /buildfiles/pkgvars
declare pkglatest # to make shellcheck happy
pkgname="${rpm_pkgname:-${pkgname}}"
hubproj="${hubproj:-${pkgname}}"
nightlyref="${nightlyref:-master}"

repopath="citusdata/${hubproj}"
default_branch=$(curl -s "https://api.github.com/repos/${repopath}" | \
jq -r '.object.sha')
nightlyref="${nightlyref:-${default_branch}}"

releasepg="${releasepg:-11,12,13}"
nightlypg="${nightlypg:-${releasepg}}"
versioning="${versioning:-simple}"
Expand All @@ -80,7 +85,6 @@ email=$(determine_email)
export RPM_PACKAGER="${name} <${email}>"

cp "/buildfiles/${pkgname}.spec" /buildfiles/rpmlintrc "${builddir}"
repopath="citusdata/${hubproj}"

case "${1}" in
release)
Expand Down Expand Up @@ -115,6 +119,7 @@ case "${1}" in
if [ "${1}" == 'nightly' ]; then
ref=${nightlyref}
infix='git'
echo "Nightly build is using the branch ${ref}"
else
ref=${1}
infix='pre'
Expand Down
Loading