You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This provides a nice feature that if the application code needs to access the Git Hash of the current build it has it accessible in an environment variable LAGOON_GIT_SHA.
Unfortunately though this also means that every deploymentconfig will redeploy it's containers even if the docker image itself has not changed. That can cause much longer deployments and even sometimes service interruptions where they would not be needed.
Therefore the idea is to somehow define within .lagoon.yml globally for all services or in docker-compose.yml per service if the application needs the LAGOON_GIT_SHA env variable and only if it is requested by the service actually inject it into the deploymentconfig.
It probably is possible to have the default to not inject it anymore as I don't think many applications today actually use LAGOON_GIT_SHA, definitely the lagoon internal tests are using it, but there we could just adapt the docker-compose.yml
The text was updated successfully, but these errors were encountered:
Ok, after discussion with Michael, we will have the git_sha injection disabled by default. We will add a project-level entry to the .lagoon.yml, which will then allow the git_sha to be injected into the deployment configs of services which need it.
Currently we inject the GIT SHA of the current build into the deploymentconfig of many services:
https://github.com/amazeeio/lagoon/blob/master/images/oc-build-deploy-dind/openshift-templates/node/deployment.yml#L98-L99
https://github.com/amazeeio/lagoon/blob/master/images/oc-build-deploy-dind/openshift-templates/node-persistent/deployment.yml#L114-L115
https://github.com/amazeeio/lagoon/blob/master/images/oc-build-deploy-dind/openshift-templates/nginx/deployment.yml#L101-L102
This provides a nice feature that if the application code needs to access the Git Hash of the current build it has it accessible in an environment variable
LAGOON_GIT_SHA
.Unfortunately though this also means that every deploymentconfig will redeploy it's containers even if the docker image itself has not changed. That can cause much longer deployments and even sometimes service interruptions where they would not be needed.
Therefore the idea is to somehow define within
.lagoon.yml
globally for all services or indocker-compose.yml
per service if the application needs theLAGOON_GIT_SHA
env variable and only if it is requested by the service actually inject it into the deploymentconfig.It probably is possible to have the default to not inject it anymore as I don't think many applications today actually use
LAGOON_GIT_SHA
, definitely the lagoon internal tests are using it, but there we could just adapt thedocker-compose.yml
The text was updated successfully, but these errors were encountered: