diff --git a/.expeditor/automate_build.sh b/.expeditor/automate_build.sh index fd0a7cf165..3abd97a5cf 100755 --- a/.expeditor/automate_build.sh +++ b/.expeditor/automate_build.sh @@ -14,6 +14,7 @@ export HAB_FEAT_OFFLINE_INSTALL=true export HAB_BLDR_CHANNEL="LTS-2024" export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL="LTS-2024" export HAB_FALLBACK_CHANNEL="dev" +export DEFAULT_AUTOMATE_REPO="https://github.com/chef/automate-private.git" curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash @@ -44,8 +45,16 @@ echo "generating package for nginx" openresty_hart=$(ls -1t results/*openresty*.hart | head -1) HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $openresty_hart; export HAB_REFRESH_CHANNEL=LTS-2024; hab pkg build src/nginx" -git clone https://github.com/chef/automate-private.git -cd automate +if [ -z "$AUTOMATE_REPO" ]; +then + AUTOMATE_REPO="$DEFAULT_AUTOMATE_REPO" +fi + +git clone $AUTOMATE_REPO + +repo_dir=`basename -s .git $AUTOMATE_REPO` + +cd ${repo_dir} if [ "${AUTOMATE_BRANCH}" != "" ] then git checkout "${AUTOMATE_BRANCH}" diff --git a/.expeditor/chef_server.sh b/.expeditor/chef_server.sh index ad3ada604d..6b8e274f27 100755 --- a/.expeditor/chef_server.sh +++ b/.expeditor/chef_server.sh @@ -3,9 +3,19 @@ #=============================================================================== #Downloading the automate repo #=============================================================================== +export DEFAULT_AUTOMATE_REPO="https://github.com/chef/automate-private.git" + +if [ -z "$AUTOMATE_REPO" ]; +then + AUTOMATE_REPO="$DEFAULT_AUTOMATE_REPO" +fi + +git clone $AUTOMATE_REPO + +repo_dir=`basename -s .git $AUTOMATE_REPO` + +cd ${repo_dir} -git clone https://github.com/chef/automate-private.git -cd automate if [ "${AUTOMATE_BRANCH}" != "" ] then git checkout "${AUTOMATE_BRANCH}" diff --git a/.expeditor/chef_server_only.sh b/.expeditor/chef_server_only.sh index 7456cccfa0..670c62b93c 100755 --- a/.expeditor/chef_server_only.sh +++ b/.expeditor/chef_server_only.sh @@ -4,8 +4,19 @@ #Downloading the automate repo #=============================================================================== -git clone https://github.com/chef/automate-private.git -cd automate +export DEFAULT_AUTOMATE_REPO="https://github.com/chef/automate-private.git" + +if [ -z "$AUTOMATE_REPO" ]; +then + AUTOMATE_REPO="$DEFAULT_AUTOMATE_REPO" +fi + +git clone $AUTOMATE_REPO + +repo_dir=`basename -s .git $AUTOMATE_REPO` + +cd ${repo_dir} + if [ "${AUTOMATE_BRANCH}" != "" ] then git checkout "${AUTOMATE_BRANCH}" diff --git a/.expeditor/ha_chef_server.sh b/.expeditor/ha_chef_server.sh index d58d9d4784..b71c6296e4 100644 --- a/.expeditor/ha_chef_server.sh +++ b/.expeditor/ha_chef_server.sh @@ -4,8 +4,19 @@ #Downloading the automate repo #=============================================================================== -git clone https://github.com/chef/automate-private.git -cd automate +export DEFAULT_AUTOMATE_REPO="https://github.com/chef/automate-private.git" + +if [ -z "$AUTOMATE_REPO" ]; +then + AUTOMATE_REPO="$DEFAULT_AUTOMATE_REPO" +fi + +git clone $AUTOMATE_REPO + +repo_dir=`basename -s .git $AUTOMATE_REPO` + +cd ${repo_dir} + if [ "${AUTOMATE_BRANCH}" != "" ] then git checkout "${AUTOMATE_BRANCH}"