Compare commits
3 Commits
gitlab-ci/
...
pike_blue_
Author | SHA1 | Date | |
---|---|---|---|
|
e387bc1bab | ||
|
b8e8949aa9 | ||
|
3e392ea624 |
2
Makefile
2
Makefile
@@ -4,8 +4,6 @@ DEP := \
|
|||||||
config/headfoot.tex \
|
config/headfoot.tex \
|
||||||
config/sourcelst.tex \
|
config/sourcelst.tex \
|
||||||
content.tex \
|
content.tex \
|
||||||
gitlab-runner.tex \
|
|
||||||
title.tex \
|
|
||||||
Makefile
|
Makefile
|
||||||
|
|
||||||
all: $(MAIN)
|
all: $(MAIN)
|
||||||
|
@@ -20,11 +20,8 @@ citecolor = black]{hyperref}%
|
|||||||
\usepackage{amsfonts}%
|
\usepackage{amsfonts}%
|
||||||
\usepackage{mathrsfs}%
|
\usepackage{mathrsfs}%
|
||||||
\usepackage{hyperref}%
|
\usepackage{hyperref}%
|
||||||
\usepackage[dvipsnames]{xcolor}%
|
\usepackage{xcolor}%
|
||||||
\usepackage{scrpage2}%
|
\usepackage{scrpage2}%
|
||||||
\usepackage{multido}
|
|
||||||
\usepackage{pstricks}
|
|
||||||
\usepackage{colortbl}
|
|
||||||
|
|
||||||
\newcommand*\euler{\mathrm{e}}
|
\newcommand*\euler{\mathrm{e}}
|
||||||
\input{title.tex}
|
\input{title.tex}
|
||||||
|
106
content.tex
106
content.tex
@@ -1,66 +1,46 @@
|
|||||||
\section{Introduction}
|
\section*{Pike Blue Release HowTo}
|
||||||
Gitlab-ci uses so called runners to execute the build jobs defined in the build
|
\subsection*{Internal release}
|
||||||
job file of a repository. A runner is a seperate tool and can be installed on
|
A push event to a \textit{release/...} named branch will create release
|
||||||
any machine. The type of connection is configurable. The intentions of these concept are:\\
|
candidates. These release candidates are deployed to the pike blue project svn
|
||||||
\begin{itemize}
|
repository (\texttt{http://dabsvn01.internal.novero.com/svn/\ \\
|
||||||
\item{remove (build) environmental dependency from ci server}
|
0\_31X\_P0610\_pike\_blue/trunk/development/software/\ \\
|
||||||
\item{multipe runners to parallize multiple builds}
|
releases/release\_candidate/}).\\
|
||||||
\end{itemize}
|
The branch can be created eiter by gitlab ui or locally.
|
||||||
The Runner has to be installed on a machine with a proper environment (compiler,
|
\subsubsection*{Local}
|
||||||
...) installed for the dedicated project it is used for. Figure \ref{fig:gitlab-runner-interaction} illustrates
|
Checkout the new release branch:
|
||||||
the interaction of a local workstation, the gitlab(-ci) server and the
|
\lstsetbash
|
||||||
gitlab-ci-multi-runner.
|
|
||||||
\begin{figure}
|
|
||||||
\begin{center}
|
|
||||||
\input{gitlab-runner.tex}
|
|
||||||
\caption{Gitlab-ci - runner interaction}
|
|
||||||
\label{fig:gitlab-runner-interaction}
|
|
||||||
\end{center}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
\section{Installation of gitlab-ci-multi-runner}
|
|
||||||
The Installation of the runner depends on the operating system of the host and
|
|
||||||
is described here: \hyperlink{https://docs.gitlab.com/runner/install/}{\texttt{https://docs.gitlab.com/runner/install}}
|
|
||||||
\section{Installation of a dedicated runner}
|
|
||||||
\subsection{Prerequisites}
|
|
||||||
To install a dedicated runner prerequisites has to be fullfilled:
|
|
||||||
\begin{itemize}
|
|
||||||
\item{Url of gitlab ci coordinator}
|
|
||||||
\item{Registation token of that server}
|
|
||||||
\item{Tags - if the build job defines tags to identify runners}
|
|
||||||
\end{itemize}
|
|
||||||
These two informations can be gathered at the runners section of the project's
|
|
||||||
gitlab repository the runner is installed for. That section is accessible using:\texttt{<gitlab-url>/<project-path>/runners}\\
|
|
||||||
\textbf{Example:}\\
|
|
||||||
\texttt{https://novgit05.novero.com/agricola/agricola/runners}
|
|
||||||
\subsection{Register}
|
|
||||||
Open a shell an type: \texttt{gitlab-ci-multi-runner register}. An interactive
|
|
||||||
shell opens and requests some inputs (see prequisites).
|
|
||||||
\lstsetdefault
|
|
||||||
\begin{lstlisting}
|
\begin{lstlisting}
|
||||||
user@dabbld01:~$ sudo gitlab-ci-multi-runner register
|
git checkout -b release/<release_name>
|
||||||
Running in system-mode.
|
|
||||||
|
|
||||||
Please enter the gitlab-ci coordinator URL
|
|
||||||
(e.g. https://gitlab.com/):
|
|
||||||
https://novgit05.novero.com/ci
|
|
||||||
Please enter the gitlab-ci token for this runner:
|
|
||||||
<secret-token>
|
|
||||||
Please enter the gitlab-ci description for this runner:
|
|
||||||
[dabbld01]:
|
|
||||||
my-runner
|
|
||||||
Please enter the gitlab-ci tags for this runner (comma
|
|
||||||
separated):
|
|
||||||
|
|
||||||
Please enter the executor: shell, docker+machine,
|
|
||||||
docker-ssh+machine, kubernetes, docker, docker-ssh,
|
|
||||||
parallels, ssh, virtualbox:
|
|
||||||
shell
|
|
||||||
Runner registered successfully. Feel free to start it,
|
|
||||||
but if it's running already the config should be
|
|
||||||
automatically reloaded!
|
|
||||||
\end{lstlisting}
|
\end{lstlisting}
|
||||||
|
Prepare build variables in the \textit{variables} section of the build job
|
||||||
\subsection{Start as service}
|
file\\(\texttt{.gitlab-ci.yml} in pike blue's root directory).
|
||||||
Open a shell an type: \texttt{gitlab-ci-multi-runner start}
|
\begin{lstlisting}
|
||||||
|
variables:
|
||||||
|
PRODUCT_NAME: "PI"
|
||||||
|
PRODUCT_VARIANT: "CX"
|
||||||
|
PROJECT_VERSION: "20"
|
||||||
|
SW_MAJOR: "1"
|
||||||
|
SW_MINOR: "0"
|
||||||
|
\end{lstlisting}
|
||||||
|
Push the new branch to the gitlab-server:
|
||||||
|
\begin{lstlisting}
|
||||||
|
git push -u origin release/<release_name>
|
||||||
|
\end{lstlisting}
|
||||||
|
\subsection*{External release}
|
||||||
|
A \textit{release/\_PI\_CX\_20...} named tag in the pike blue repository at the
|
||||||
|
gitlab server will create a release and deploys it to the pike blue project
|
||||||
|
svn repository (\texttt{http://dabsvn01.internal.novero.com/svn/\ \\
|
||||||
|
0\_31X\_P0610\_pike\_blue/trunk/development/software/\ \\
|
||||||
|
releases/release/}).\\
|
||||||
|
The tag can be created eiter by gitlab ui or locally.
|
||||||
|
\subsubsection{Gitlab UI}
|
||||||
|
To create the tag:
|
||||||
|
\begin{itemize}
|
||||||
|
\item go to the pike blue gitlab tags section \\
|
||||||
|
(\texttt{https://novgit05.novero.com/Pike/Blue/tags})
|
||||||
|
\item Hit the \textit{+ New tag} button
|
||||||
|
\item Choose a valid tag name \textit{(release/PI\_CX\_20...)}
|
||||||
|
\item Choose the above created release branch as source for the new tag.
|
||||||
|
\item Hit the \textit{Create tag} button
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
\psset{griddots=0,gridlabels=8pt,subgriddiv=5}
|
|
||||||
\psset{xunit=10mm,yunit=10mm}
|
|
||||||
\newcommand{\clr}{black}
|
|
||||||
\psset{fillcolor=white}
|
|
||||||
\psset{fillstyle=solid}
|
|
||||||
\psset{linecolor=\clr}
|
|
||||||
\psset{framearc=.5}
|
|
||||||
\psset{framesep=20pt}
|
|
||||||
\psset{arrowsize=10pt}
|
|
||||||
\begin{pspicture}(12,6)
|
|
||||||
% \psgrid
|
|
||||||
\rput(2.5,5){\psframebox{\textcolor{\clr}{Gitlab-ci server}}}
|
|
||||||
\rput(2.5,1){\psframebox{\textcolor{\clr}{Local workstation}}}
|
|
||||||
\rput(8.5,3){\psframebox{\textcolor{\clr}{Gitlab-ci-multi-runner}}}
|
|
||||||
\pscurve[fillstyle=none]{->}(4.6,5)(7.2,5)(8.5,3.9)
|
|
||||||
\pscurve[fillstyle=none]{<-}(3,4.1)(4,3.2)(5.8,3)
|
|
||||||
\pscurve[fillstyle=none]{<-}(8,2.1)(7.7,1.4)(8.5,.8)(9.3,1.4)(9,2.1)
|
|
||||||
\psline{->}(1,1.9)(1,4.1)
|
|
||||||
\rput(7,5.3){build trigger}
|
|
||||||
\rput(.5,3){push}
|
|
||||||
\rput(4,2.6){build result}
|
|
||||||
\rput(8.5,.5){build}
|
|
||||||
\end{pspicture}
|
|
@@ -1,4 +1,4 @@
|
|||||||
\newcommand{\docname}{Gitlab-ci}
|
\newcommand{\docname}{HowTo}
|
||||||
\newcommand{\prjname}{gitlab-ci-multi-runner}
|
\newcommand{\prjname}{arch linux on raspberry pi}
|
||||||
\newcommand{\docversion}{0.1}
|
\newcommand{\docversion}{0.1}
|
||||||
\newcommand{\docauthor}{Thomas Klaehn}
|
\newcommand{\docauthor}{Thomas Klaehn}
|
||||||
|
Reference in New Issue
Block a user