1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab-runner_ynh.git synced 2024-09-03 19:15:58 +02:00
This commit is contained in:
Kay0u 2020-12-22 11:42:09 +01:00
parent b6c2975a80
commit a6dd68c5a2
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
11 changed files with 48 additions and 51 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
## 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.4.0 **Shipped version:** 13.7.0
## Screenshots ## Screenshots

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
## 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.4.0 **Version incluse:** 13.7.0
## Captures d'écran ## Captures d'écran

View file

@ -17,13 +17,4 @@
port_already_use=0 port_already_use=0
change_url=0 change_url=0
;;; Levels ;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
Level 4=auto
Level 5=auto Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0

View file

@ -6,7 +6,7 @@
"en": "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": "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.4.0~ynh1", "version": "13.7.0~ynh1",
"url": "https://gitlab.com/gitlab-org/gitlab-runner", "url": "https://gitlab.com/gitlab-org/gitlab-runner",
"license": "MIT", "license": "MIT",
"maintainer": { "maintainer": {

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# dependencies used by the app # dependencies used by the app
pkg_dependencies="ca-certificates git curl tar docker-ce" pkg_dependencies="ca-certificates git curl tar docker-ce docker-ce-cli containerd.io"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -47,7 +47,7 @@ fi
#================================================= #=================================================
# BACKUP BEFORE ACTION THEN ACTIVE TRAP # BACKUP BEFORE ACTION THEN ACTIVE TRAP
#================================================= #=================================================
ynh_print_info "Backing up the app before action (may take a while)..." ynh_script_progression "Backing up the app before action (may take a while)..."
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_action ynh_backup_before_action
@ -68,7 +68,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# REGISTER THE RUNNER # REGISTER THE RUNNER
#================================================= #=================================================
ynh_print_info "Register Gitlab Runner..." ynh_script_progression "Register Gitlab Runner..."
# Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma. # Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma.
split_char="," split_char=","
@ -101,7 +101,7 @@ done
#================================================= #=================================================
# STORE SETTINGS # STORE SETTINGS
#================================================= #=================================================
ynh_print_info "Storing settings..." ynh_script_progression "Storing settings..."
ynh_app_setting_set $app gitlab_url $gitlab_url ynh_app_setting_set $app gitlab_url $gitlab_url
ynh_app_setting_set $app token $token ynh_app_setting_set $app token $token
@ -111,4 +111,4 @@ ynh_app_setting_set $app docker_image $docker_image
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info "Action of $app completed" ynh_script_progression "Action of $app completed" --last

View file

@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
ynh_print_info "Validating installation parameters..." ynh_script_progression "Validating installation parameters..."
config_path=/etc/$app config_path=/etc/$app
test ! -e "$config_path" || ynh_die "This path already contains a folder" test ! -e "$config_path" || ynh_die "This path already contains a folder"
@ -71,7 +71,7 @@ fi
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
#================================================= #=================================================
ynh_print_info "Storing installation settings..." ynh_script_progression "Storing installation settings..."
ynh_app_setting_set $app gitlab_url $gitlab_url ynh_app_setting_set $app gitlab_url $gitlab_url
ynh_app_setting_set $app token $token ynh_app_setting_set $app token $token
@ -85,21 +85,21 @@ ynh_app_setting_set $app config_path $config_path
#================================================= #=================================================
# ADD DOCKER REPO # ADD DOCKER REPO
#================================================= #=================================================
ynh_print_info "Adding a new repo..." ynh_script_progression "Adding a new repo..."
ynh_install_extra_repo --repo="https://download.docker.com/linux/debian $(lsb_release -cs) stable" --key="https://download.docker.com/linux/debian/gpg" --name="${app}-docker" ynh_install_extra_repo --repo="https://download.docker.com/linux/debian $(lsb_release -cs) stable" --key="https://download.docker.com/linux/debian/gpg" --name="${app}-docker"
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_print_info "Installing dependencies..." ynh_script_progression "Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_print_info "Setting up source files..." ynh_script_progression "Setting up source files..."
update_src_version() { update_src_version() {
source ./upgrade.d/upgrade.last.sh source ./upgrade.d/upgrade.last.sh
@ -129,7 +129,7 @@ dpkg -i $tempdir/$gitlab_runner_filename
#================================================= #=================================================
# SETUP GITLAB RUNNER # SETUP GITLAB RUNNER
#================================================= #=================================================
ynh_print_info "Configuring Gitlab Runner..." ynh_script_progression "Configuring Gitlab Runner..."
# Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma. # Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma.
split_char="," split_char=","
@ -168,10 +168,10 @@ ynh_store_file_checksum "$config_path/config.toml"
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add $app --log "$app" --log_type="systemd" yunohost service add $app
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info "Installation of $app completed" ynh_script_progression "Installation of $app completed" --last

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info "Loading installation settings..." ynh_script_progression "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -27,28 +27,28 @@ config_path=$(ynh_app_setting_get $app config_path)
# Remove a service from the admin panel, added by `yunohost service add` # Remove a service from the admin panel, added by `yunohost service add`
if yunohost service status $app >/dev/null 2>&1 if yunohost service status $app >/dev/null 2>&1
then then
ynh_print_info "Removing $app service" ynh_script_progression "Removing $app service"
yunohost service remove $app yunohost service remove $app
fi fi
#================================================= #=================================================
# UNREGISTER ALL RUNNERS # UNREGISTER ALL RUNNERS
#================================================= #=================================================
ynh_print_info "Unregistering all runners..." ynh_script_progression "Unregistering all runners..."
ynh_exec_warn_less $app unregister --all-runners ynh_exec_warn_less $app unregister --all-runners
#================================================= #=================================================
# REMOVE GITLAB RUNNER # REMOVE GITLAB RUNNER
#================================================= #=================================================
ynh_print_info "Removing Gitlab Runner" ynh_script_progression "Removing Gitlab Runner"
dpkg --remove $app dpkg --remove $app
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
ynh_print_info "Removing dependencies" ynh_script_progression "Removing dependencies"
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_remove_app_dependencies ynh_remove_app_dependencies
@ -56,14 +56,14 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP CONFIG DIR # REMOVE APP CONFIG DIR
#================================================= #=================================================
ynh_print_info "Removing app config directory" ynh_script_progression "Removing app config directory"
ynh_secure_remove "$config_path" ynh_secure_remove "$config_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_print_info "Removing a repo..." ynh_script_progression "Removing a repo..."
ynh_remove_extra_repo --name="${app}-docker" ynh_remove_extra_repo --name="${app}-docker"
@ -71,4 +71,4 @@ ynh_remove_extra_repo --name="${app}-docker"
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info "Removal of $app completed" ynh_script_progression "Removal of $app completed" --last

View file

@ -24,7 +24,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info "Loading settings..." ynh_script_progression "Loading settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -38,7 +38,7 @@ docker_image=$(ynh_app_setting_get $app docker_image)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
#================================================= #=================================================
ynh_print_info "Validating restoration parameters..." ynh_script_progression "Validating restoration parameters..."
test ! -d $config_path \ test ! -d $config_path \
|| ynh_die "There is already a directory: $config_path " || ynh_die "There is already a directory: $config_path "
@ -48,21 +48,21 @@ test ! -d $config_path \
#================================================= #=================================================
# ADD DOCKER REPO # ADD DOCKER REPO
#================================================= #=================================================
ynh_print_info "Restoring the docker repo..." ynh_script_progression "Restoring the docker repo..."
ynh_install_extra_repo --repo="https://download.docker.com/linux/debian $(lsb_release -cs) stable" --key="https://download.docker.com/linux/debian/gpg" --name="${app}-docker" ynh_install_extra_repo --repo="https://download.docker.com/linux/debian $(lsb_release -cs) stable" --key="https://download.docker.com/linux/debian/gpg" --name="${app}-docker"
#================================================= #=================================================
# INSTALL DEPENDENCIES # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_print_info "Reinstalling dependencies..." ynh_script_progression "Reinstalling dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_print_info "Reinstalling GitLab Runner..." ynh_script_progression "Reinstalling GitLab Runner..."
update_src_version() { update_src_version() {
source ../settings/scripts/upgrade.d/upgrade.last.sh source ../settings/scripts/upgrade.d/upgrade.last.sh
@ -93,7 +93,7 @@ dpkg -i $tempdir/$gitlab_runner_filename
#================================================= #=================================================
# SETUP GITLAB RUNNER # SETUP GITLAB RUNNER
#================================================= #=================================================
ynh_print_info "Configuring Gitlab Runner..." ynh_script_progression "Configuring Gitlab Runner..."
# Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma. # Can be registered several time, to do this give a list of gitlab_url, token and docker_image separated by a comma.
split_char="," split_char=","
@ -123,10 +123,10 @@ done
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL
#================================================= #=================================================
yunohost service add $app --log "$app" --log_type="systemd" yunohost service add $app
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info "Restoration completed for $app" ynh_script_progression "Restoration completed for $app" --last

View file

@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_print_info "Loading installation settings..." ynh_script_progression "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -21,14 +21,14 @@ architecture=$(ynh_app_setting_get $app architecture)
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
ynh_print_info "Ensuring downward compatibility..." ynh_script_progression "Ensuring downward compatibility..."
# NOTING TO DO HERE YET # NOTING TO DO HERE YET
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
ynh_print_info "Backing up the app before upgrading (may take a while)..." ynh_script_progression "Backing up the app before upgrading (may take a while)..."
# Backup the current version of the app # Backup the current version of the app
ynh_backup_before_upgrade ynh_backup_before_upgrade
@ -44,7 +44,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_print_info "Upgrading source files..." ynh_script_progression "Upgrading source files..."
update_src_version() { update_src_version() {
source ./upgrade.d/upgrade.last.sh source ./upgrade.d/upgrade.last.sh
@ -72,12 +72,18 @@ dpkg -i $tempdir/$gitlab_runner_filename
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
ynh_print_info "Upgrading dependencies..." ynh_script_progression "Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL
#=================================================
yunohost service add $app
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================
ynh_print_info "Upgrade of $app completed" ynh_script_progression "Upgrade of $app completed" --last

View file

@ -1,9 +1,9 @@
gitlab_runner_version="13.4.0" gitlab_runner_version="13.7.0"
gitlab_runner_x86_64_source_sha256="0973148cfde3ded43efa0c3901c62f01a31f5b0ecf7bda5190671497588dfc0f" gitlab_runner_x86_64_source_sha256="708b26cd83eab0617ac8dc4d91cbbe0d2310a9a3c61cb8037623d08fff7001f6"
gitlab_runner_i386_source_sha256="7e8f0c10f5e1609d36d6eef6b721af75d5fcd7fc5cc7895855a870e0203e31e8" gitlab_runner_i386_source_sha256="dd866c39ec10c2c7e0a2ebe1bca4e47211defd3072290a4420459cfde40d270c"
gitlab_runner_arm_source_sha256="29b7479e2629ad507cd49f9169e9bc22f49cb451f823a240043d9c0dada14ee4" gitlab_runner_arm_source_sha256="9f2285916c8dd16c237852a72f03015db14115b7b809b71aad9d0fcac534fb72"
gitlab_runner_filename="gitlab-runner-${gitlab_runner_version}.deb" gitlab_runner_filename="gitlab-runner-${gitlab_runner_version}.deb"