Skip to content

Commit

Permalink
support having different versions on WM's and standard libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip committed Jul 11, 2024
1 parent 02e2546 commit 2ef7296
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
16 changes: 15 additions & 1 deletion infrastructure/dpladm/bin/sync-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ function getSiteDplCmsRelease {
return
}


function getWebmasterDplCmsRelease {
local wmRelease
wmRelease=$(yq eval ".sites.${1}.webmaster-cms-version" "${2}")
if [[ "${wmRelease}" == "null" ]]; then
echo ""
return
fi

echo "${wmRelease}"
return
}

function getSiteReleaseImageRepository {
local repository
repository=$(yq eval ".sites.${1}.releaseImageRepository" "${2}")
Expand Down Expand Up @@ -138,6 +151,7 @@ primaryDomain=$(getSitePrimaryDomain "${SITE}" "${SITES_CONFIG}")
secondaryDomains=$(getSiteSecondaryDomains "${SITE}" "${SITES_CONFIG}")
autogenerateRoutes=$(getSiteAutogenerateRoutes "${SITE}" "${SITES_CONFIG}")
releaseTag=$(getSiteDplCmsRelease "${SITE}" "${SITES_CONFIG}")
wmReleaseTag=$(getWebmasterDplCmsRelease "${SITE}" "${SITES_CONFIG}")
siteImageRepository=$(getSiteReleaseImageRepository "${SITE}" "${SITES_CONFIG}" || exit 1)
failOnErr $? "${siteImageRepository}"
siteReleaseImageName=$(getSiteReleaseImageName "${SITE}" "${SITES_CONFIG}")
Expand All @@ -150,5 +164,5 @@ set -o errexit
syncEnvRepo "${SITE}" "${releaseTag}" "${BRANCH}" "${siteImageRepository}" "${siteReleaseImageName}" "${importTranslationsCron}" "${autogenerateRoutes}" "${primaryDomain}" "${secondaryDomains}"

if [ "${plan}" = "webmaster" ] && [ "${BRANCH}" = "main" ]; then
syncEnvRepo "${SITE}" "${releaseTag}" "moduletest" "${siteImageRepository}" "${siteReleaseImageName}" "${importTranslationsCron}" "${autogenerateRoutes}" "${primaryDomain}" "${secondaryDomains}"
syncEnvRepo "${SITE}" "${wmReleaseTag}" "moduletest" "${siteImageRepository}" "${siteReleaseImageName}" "${importTranslationsCron}" "${autogenerateRoutes}" "${primaryDomain}" "${secondaryDomains}"
fi
1 change: 1 addition & 0 deletions infrastructure/environments/dplplat01/sites.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ sites:
- nginx.main.kobenhavn.dplplat01.dpl.reload.dk
- varnish.main.kobenhavn.dplplat01.dpl.reload.dk
plan: webmaster
webmaster-cms-version: 2024.27.1
deploy_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHaTkDvjLW/b2qVj8FIvtX9x3TxFFZTENn+w2CFELeoC"
<<: *default-release-image-source
koge:
Expand Down

0 comments on commit 2ef7296

Please sign in to comment.