Commit 926f11f9 authored by Alexandre MERLIN's avatar Alexandre MERLIN
Browse files

[microstrops] Add the KADEPLOY_VERSION env variable

parent f1bad614
Pipeline #274211 passed with stages
in 16 minutes and 49 seconds
......@@ -2311,6 +2311,7 @@ On an \emph{Other} environment, you eventually have to update your bootloader in
\subsection{Kadeploy3 Environment variables}\label{sec:env_vars}
When writing a script for an admin pre-install, an admin/user post-install or some custom operations, you can use the following environment variables :
\begin{itemize}
\item \texttt{KADEPLOY\_VERSION} : the version of the Kadeploy3 server running
\item \texttt{KADEPLOY\_CLUSTER} : cluster on which the pre/post install is launched
\item \texttt{KADEPLOY\_ENV} : environment deployed
\item \texttt{KADEPLOY\_ENV\_KERNEL} : the path to the kernel file inside the deployed environment directory
......
......@@ -1357,6 +1357,7 @@ class Microstep < Automata::QueueTask
ret = {
'KADEPLOY_CLUSTER' => vals[:cluster],
'KADEPLOY_VERSION' => vals[:version],
'KADEPLOY_DEPLOY_PART' => vals[:deploy_part],
'KADEPLOY_SWAP_PART' => vals[:swap_part],
'KADEPLOY_TMP_PART' => vals[:tmp_part],
......@@ -1413,6 +1414,7 @@ class Microstep < Automata::QueueTask
end
self.class.load_deploy_context({
:cluster => context[:cluster].name,
:version => context[:common].version,
:env => env,
:deploy_part_label => get_deploy_label,
:deploy_part => get_deploy_part_path,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment