mirror of
https://github.com/YunoHost-Apps/gitlab-runner_ynh.git
synced 2024-09-03 19:15:58 +02:00
commit
966c913f09
9 changed files with 25 additions and 217 deletions
17
README.md
17
README.md
|
@ -1,17 +1,17 @@
|
||||||
# GitLab Runner for YunoHost
|
# GitLab Runner for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/gitlab-runner)
|
[](https://dash.yunohost.org/appci/app/gitlab-runner)  
|
||||||
[](https://install-app.yunohost.org/?app=gitlab-runner)
|
[](https://install-app.yunohost.org/?app=gitlab-runner)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allow you to install gitlab-runner quickly and simply on a YunoHost server.
|
> *This package allow you to install GitLab Runner quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
GitLab Runner is a continuous integration tool to use with a GitLab instance (YNH or not).
|
GitLab Runner is a continuous integration tool to use with a GitLab instance (YNH or not).
|
||||||
|
|
||||||
**Shipped version:** 13.0.0
|
**Shipped version:** 13.1.0
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
@ -29,17 +29,13 @@ How to configure this app: by the admin panel of GitLab or the settings "CI/CD"
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/gitlab-runner/)
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/gitlab-runner/)
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/gitlab-runner/)
|
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/gitlab-runner/)
|
||||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/gitlab-runner/)
|
|
||||||
|
|
||||||
## Additional information
|
## Additional information
|
||||||
|
|
||||||
* To retrieve the information to be provided to the installation such as the `token` or the `gitlab's url` you must go here: `Settings->CI/CD->Runners->"Set up a specific Runner manually"` in the project or admin section of the GitLab instance to link to this runner.
|
* To retrieve the information to be provided to the installation such as the `token` or the `gitlab's url` you must go here: `Settings->CI/CD->Runners->"Set up a specific Runner manually"` in the project or admin section of the GitLab instance to link to this runner.
|
||||||
|
|
||||||
**More information on the documentation page:**
|
|
||||||
https://yunohost.org/packaging_apps
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/gitlab-runner_ynh/issues
|
* Report a bug: https://github.com/YunoHost-Apps/gitlab-runner_ynh/issues
|
||||||
|
@ -51,7 +47,6 @@ https://yunohost.org/packaging_apps
|
||||||
Developers info
|
Developers info
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
|
|
||||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/gitlab-runner_ynh/tree/testing).
|
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/gitlab-runner_ynh/tree/testing).
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
|
|
27
README_fr.md
27
README_fr.md
|
@ -1,17 +1,17 @@
|
||||||
# GitLab Runner pour YunoHost
|
# GitLab Runner pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/gitlab-runner)
|
[](https://dash.yunohost.org/appci/app/gitlab-runner)  
|
||||||
[](https://install-app.yunohost.org/?app=gitlab-runner)
|
[](https://install-app.yunohost.org/?app=gitlab-runner)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer gitlab-runner rapidement et simplement sur un serveur Yunohost.
|
> *Ce package vous permet d'installer GitLab Runner rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
GitLab Runner est un outil d'intégration continue à utiliser avec une instance GitLab (YNH ou non).
|
GitLab Runner est un outil d'intégration continue à utiliser avec une instance GitLab (YNH ou non).
|
||||||
|
|
||||||
**Version incluse:** 13.0.0
|
**Version incluse:** 13.1.0
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
@ -23,36 +23,31 @@ Comment configurer cette application: via le panneau d'administration de GitLab
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* Documentation officielle: https://docs.gitlab.com/runner/
|
* Documentation officielle : https://docs.gitlab.com/runner/
|
||||||
|
|
||||||
## Caractéristiques spécifiques YunoHost
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/gitlab-runner/)
|
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/gitlab-runner/)
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/gitlab-runner/)
|
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/gitlab-runner/)
|
||||||
* Jessie x86-64b - [](https://ci-stretch.nohost.me/ci/apps/gitlab-runner/)
|
|
||||||
|
|
||||||
## Informations additionnelles
|
## Informations additionnelles
|
||||||
|
|
||||||
* Pour récupérer les informations à fournir à l'installation comme le `token` ou `l'url gitlab` vous devez vous rendre ici: `Settings->CI/CD->Runners->"Set up a specific Runner manually"` dans le projet
|
* Pour récupérer les informations à fournir à l'installation comme le `token` ou `l'url gitlab` vous devez vous rendre ici : `Settings->CI/CD->Runners->"Set up a specific Runner manually"` dans le projet
|
||||||
ou la section admin de l'instance GitLab à relier à ce runner.
|
ou la section admin de l'instance GitLab à relier à ce runner.
|
||||||
|
|
||||||
**Plus d'informations sur la page de documentation:**
|
|
||||||
https://yunohost.org/packaging_apps
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Signaler un bug: https://github.com/YunoHost-Apps/gitlab-runner_ynh/issues
|
* Signaler un bug : https://github.com/YunoHost-Apps/gitlab-runner_ynh/issues
|
||||||
* Site de l'application: https://about.gitlab.com/product/continuous-integration/
|
* Site de l'application : https://about.gitlab.com/product/continuous-integration/
|
||||||
* Site web YunoHost: https://yunohost.org/
|
* Site web YunoHost : https://yunohost.org/
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Informations pour les développeurs
|
Informations pour les développeurs
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.**
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/gitlab-runner_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/gitlab-runner_ynh/tree/testing).
|
||||||
|
|
||||||
Pour essayer la branche testing, procédez comme suit.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"id": "gitlab-runner",
|
"id": "gitlab-runner",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "GitLab Runner is a continuous integration tool to use with a GitLab instance (YNH or not).",
|
"en": "Continuous integration tool to use with a GitLab instance (YNH or not).",
|
||||||
"fr": "GitLab Runner est un outil d'intégration continue à utiliser avec une instance GitLab (YNH ou non)."
|
"fr": "Outil d'intégration continue à utiliser avec une instance GitLab (YNH ou non)."
|
||||||
},
|
},
|
||||||
"version": "13.0.0~ynh1",
|
"version": "13.1.0~ynh1",
|
||||||
"url": "https://gitlab.com/gitlab-org/gitlab-runner",
|
"url": "https://gitlab.com/gitlab-org/gitlab-runner",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.4"
|
"yunohost": ">= 3.8.1"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -92,8 +92,6 @@ ynh_backup_before_action () {
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Moved to _experimental.sh because of a bug of linter
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,177 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# EXPERIMENTAL HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Pin a repository.
|
|
||||||
#
|
|
||||||
# usage: ynh_pin_repo --package=packages --pin=pin_filter --priority=priority_value [--name=name] [--append]
|
|
||||||
# | arg: -p, --package - Packages concerned by the pin. Or all, *.
|
|
||||||
# | arg: -i, --pin - Filter for the pin.
|
|
||||||
# | arg: -p, --priority - Priority for the pin
|
|
||||||
# | arg: -n, --name - Name for the files for this repo, $app as default value.
|
|
||||||
# | arg: -a, --append - Do not overwrite existing files.
|
|
||||||
#
|
|
||||||
# See https://manpages.debian.org/stretch/apt/apt_preferences.5.en.html for information about pinning.
|
|
||||||
#
|
|
||||||
ynh_pin_repo () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=pirna
|
|
||||||
declare -Ar args_array=( [p]=package= [i]=pin= [r]=priority= [n]=name= [a]=append )
|
|
||||||
local package
|
|
||||||
local pin
|
|
||||||
local priority
|
|
||||||
local name
|
|
||||||
local append
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
package="${package:-*}"
|
|
||||||
priority=${priority:-50}
|
|
||||||
name="${name:-$app}"
|
|
||||||
append=${append:-0}
|
|
||||||
|
|
||||||
if [ $append -eq 1 ]
|
|
||||||
then
|
|
||||||
append="tee -a"
|
|
||||||
else
|
|
||||||
append="tee"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "/etc/apt/preferences.d"
|
|
||||||
echo "Package: $package
|
|
||||||
Pin: $pin
|
|
||||||
Pin-Priority: $priority" \
|
|
||||||
| $append "/etc/apt/preferences.d/$name"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add a repository.
|
|
||||||
#
|
|
||||||
# usage: ynh_add_repo --uri=uri --suite=suite --component=component [--name=name] [--append]
|
|
||||||
# | arg: -u, --uri - Uri of the repository.
|
|
||||||
# | arg: -s, --suite - Suite of the repository.
|
|
||||||
# | arg: -c, --component - Component of the repository.
|
|
||||||
# | arg: -n, --name - Name for the files for this repo, $app as default value.
|
|
||||||
# | arg: -a, --append - Do not overwrite existing files.
|
|
||||||
#
|
|
||||||
# Example for a repo like deb http://forge.yunohost.org/debian/ stretch stable
|
|
||||||
# uri suite component
|
|
||||||
# ynh_add_repo --uri=http://forge.yunohost.org/debian/ --suite=stretch --component=stable
|
|
||||||
#
|
|
||||||
ynh_add_repo () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=uscna
|
|
||||||
declare -Ar args_array=( [u]=uri= [s]=suite= [c]=component= [n]=name= [a]=append )
|
|
||||||
local uri
|
|
||||||
local suite
|
|
||||||
local component
|
|
||||||
local name
|
|
||||||
local append
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
name="${name:-$app}"
|
|
||||||
append=${append:-0}
|
|
||||||
|
|
||||||
if [ $append -eq 1 ]
|
|
||||||
then
|
|
||||||
append="tee -a"
|
|
||||||
else
|
|
||||||
append="tee"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "/etc/apt/sources.list.d"
|
|
||||||
# Add the new repo in sources.list.d
|
|
||||||
echo "deb $uri $suite $component" \
|
|
||||||
| $append "/etc/apt/sources.list.d/$name.list"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add an extra repository correctly, pin it and get the key.
|
|
||||||
#
|
|
||||||
# usage: ynh_install_extra_repo --repo="repo" [--key=key_url] [--name=name] [--append]
|
|
||||||
# | arg: -r, --repo - Complete url of the extra repository.
|
|
||||||
# | arg: -k, --key - url to get the public key.
|
|
||||||
# | arg: -n, --name - Name for the files for this repo, $app as default value.
|
|
||||||
# | arg: -a, --append - Do not overwrite existing files.
|
|
||||||
ynh_install_extra_repo () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=rkna
|
|
||||||
declare -Ar args_array=( [r]=repo= [k]=key= [n]=name= [a]=append )
|
|
||||||
local repo
|
|
||||||
local key
|
|
||||||
local name
|
|
||||||
local append
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
name="${name:-$app}"
|
|
||||||
append=${append:-0}
|
|
||||||
key=${key:-0}
|
|
||||||
|
|
||||||
if [ $append -eq 1 ]
|
|
||||||
then
|
|
||||||
append="--append"
|
|
||||||
wget_append="tee -a"
|
|
||||||
else
|
|
||||||
append=""
|
|
||||||
wget_append="tee"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Split the repository into uri, suite and components.
|
|
||||||
# Remove "deb " at the beginning of the repo.
|
|
||||||
repo="${repo#deb }"
|
|
||||||
|
|
||||||
# Get the uri
|
|
||||||
local uri="$(echo "$repo" | awk '{ print $1 }')"
|
|
||||||
|
|
||||||
# Get the suite
|
|
||||||
local suite="$(echo "$repo" | awk '{ print $2 }')"
|
|
||||||
|
|
||||||
# Get the components
|
|
||||||
local component="${repo##$uri $suite }"
|
|
||||||
|
|
||||||
# Add the repository into sources.list.d
|
|
||||||
ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append
|
|
||||||
|
|
||||||
# Pin the new repo with the default priority, so it won't be used for upgrades.
|
|
||||||
# Build $pin from the uri without http and any sub path
|
|
||||||
local pin="${uri#*://}"
|
|
||||||
pin="${pin%%/*}"
|
|
||||||
ynh_pin_repo --package="*" --pin="origin \"$pin\"" --name="$name" $append
|
|
||||||
|
|
||||||
# Get the public key for the repo
|
|
||||||
if [ -n "$key" ]
|
|
||||||
then
|
|
||||||
mkdir -p "/etc/apt/trusted.gpg.d"
|
|
||||||
if [[ "$(basename "$key")" =~ ".asc" ]]
|
|
||||||
then
|
|
||||||
local key_ext=asc
|
|
||||||
else
|
|
||||||
local key_ext=gpg
|
|
||||||
fi
|
|
||||||
wget -q "$key" -O - | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.$key_ext > /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update the list of package with the new repo
|
|
||||||
ynh_package_update
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove an extra repository and the assiociated configuration.
|
|
||||||
#
|
|
||||||
# usage: ynh_remove_extra_repo [--name=name]
|
|
||||||
# | arg: -n, --name - Name for the files for this repo, $app as default value.
|
|
||||||
ynh_remove_extra_repo () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=n
|
|
||||||
declare -Ar args_array=( [n]=name= )
|
|
||||||
local name
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
name="${name:-$app}"
|
|
||||||
|
|
||||||
ynh_secure_remove "/etc/apt/sources.list.d/$name.list"
|
|
||||||
ynh_secure_remove "/etc/apt/preferences.d/$name"
|
|
||||||
ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.gpg"
|
|
||||||
ynh_secure_remove "/etc/apt/trusted.gpg.d/$name.asc"
|
|
||||||
|
|
||||||
# Update the list of package to exclude the old repo
|
|
||||||
ynh_package_update
|
|
||||||
}
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source _experimental.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source _experimental.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source ../settings/scripts/_experimental.sh
|
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
gitlab_runner_version="13.0.0"
|
gitlab_runner_version="13.1.0"
|
||||||
|
|
||||||
gitlab_runner_x86_64_source_sha256="94f52d0de6a5d4c7d669df76f096166dac158bee60d6b1e668780245f582a1f9"
|
gitlab_runner_x86_64_source_sha256="24a966617b2d26ce33c83f6d7f60b0b69c5d53bdd163818ff96a4020fa43b81a"
|
||||||
|
|
||||||
gitlab_runner_i386_source_sha256="cc5a85b50eae71b3edafe36595563156d390ac70f3871e789774a0363f7aa473"
|
gitlab_runner_i386_source_sha256="f1f88804f731e41e7888f31ca56b739b1ec222a6648e139519626e48940b9a97"
|
||||||
|
|
||||||
gitlab_runner_arm_source_sha256="48608be91bc96136502993e178271d35ab9a5dc8de2d8f26e6f6aca40d91a622"
|
gitlab_runner_arm_source_sha256="cceca3d53f328ae5e06df4018d652052c5433887579cc70702b83310b82f2245"
|
||||||
|
|
||||||
gitlab_runner_filename="gitlab-runner-${gitlab_runner_version}.deb"
|
gitlab_runner_filename="gitlab-runner-${gitlab_runner_version}.deb"
|
||||||
|
|
Loading…
Add table
Reference in a new issue