From a6dd68c5a2505173c550b5ca97ecd269552b52fb Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 22 Dec 2020 11:42:09 +0100 Subject: [PATCH] 13.7.0 --- README.md | 2 +- README_fr.md | 2 +- check_process | 9 --------- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/actions/register | 8 ++++---- scripts/install | 16 ++++++++-------- scripts/remove | 16 ++++++++-------- scripts/restore | 16 ++++++++-------- scripts/upgrade | 18 ++++++++++++------ scripts/upgrade.d/upgrade.last.sh | 8 ++++---- 11 files changed, 48 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index ad1aeda..0005258 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview 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 diff --git a/README_fr.md b/README_fr.md index 008fe3f..c40265b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble 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 diff --git a/check_process b/check_process index bbe158c..3ee1793 100644 --- a/check_process +++ b/check_process @@ -17,13 +17,4 @@ port_already_use=0 change_url=0 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=auto Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 diff --git a/manifest.json b/manifest.json index 0b5fc06..aa7e0a4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "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)." }, - "version": "13.4.0~ynh1", + "version": "13.7.0~ynh1", "url": "https://gitlab.com/gitlab-org/gitlab-runner", "license": "MIT", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index b511496..06269bf 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # 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 diff --git a/scripts/actions/register b/scripts/actions/register index d3b52fc..f4f3e56 100644 --- a/scripts/actions/register +++ b/scripts/actions/register @@ -47,7 +47,7 @@ fi #================================================= # 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 ynh_backup_before_action @@ -68,7 +68,7 @@ ynh_abort_if_errors #================================================= # 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. split_char="," @@ -101,7 +101,7 @@ done #================================================= # 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 token $token @@ -111,4 +111,4 @@ ynh_app_setting_set $app docker_image $docker_image # END OF SCRIPT #================================================= -ynh_print_info "Action of $app completed" +ynh_script_progression "Action of $app completed" --last diff --git a/scripts/install b/scripts/install index c039cdf..95e4f0f 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # 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 test ! -e "$config_path" || ynh_die "This path already contains a folder" @@ -71,7 +71,7 @@ fi #================================================= # 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 token $token @@ -85,21 +85,21 @@ ynh_app_setting_set $app config_path $config_path #================================================= # 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" #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_print_info "Installing dependencies..." +ynh_script_progression "Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Setting up source files..." +ynh_script_progression "Setting up source files..." update_src_version() { source ./upgrade.d/upgrade.last.sh @@ -129,7 +129,7 @@ dpkg -i $tempdir/$gitlab_runner_filename #================================================= # 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. split_char="," @@ -168,10 +168,10 @@ ynh_store_file_checksum "$config_path/config.toml" # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add $app --log "$app" --log_type="systemd" +yunohost service add $app #================================================= # END OF SCRIPT #================================================= -ynh_print_info "Installation of $app completed" +ynh_script_progression "Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index ae8a4f1..94eb171 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Loading installation settings..." +ynh_script_progression "Loading installation settings..." 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` if yunohost service status $app >/dev/null 2>&1 then - ynh_print_info "Removing $app service" + ynh_script_progression "Removing $app service" yunohost service remove $app fi #================================================= # UNREGISTER ALL RUNNERS #================================================= -ynh_print_info "Unregistering all runners..." +ynh_script_progression "Unregistering all runners..." ynh_exec_warn_less $app unregister --all-runners #================================================= # REMOVE GITLAB RUNNER #================================================= -ynh_print_info "Removing Gitlab Runner" +ynh_script_progression "Removing Gitlab Runner" dpkg --remove $app #================================================= # REMOVE DEPENDENCIES #================================================= -ynh_print_info "Removing dependencies" +ynh_script_progression "Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies @@ -56,14 +56,14 @@ ynh_remove_app_dependencies #================================================= # REMOVE APP CONFIG DIR #================================================= -ynh_print_info "Removing app config directory" +ynh_script_progression "Removing app config directory" ynh_secure_remove "$config_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_print_info "Removing a repo..." +ynh_script_progression "Removing a repo..." ynh_remove_extra_repo --name="${app}-docker" @@ -71,4 +71,4 @@ ynh_remove_extra_repo --name="${app}-docker" # END OF SCRIPT #================================================= -ynh_print_info "Removal of $app completed" +ynh_script_progression "Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index b42b306..48ee47e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,7 +24,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Loading settings..." +ynh_script_progression "Loading settings..." 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 #================================================= -ynh_print_info "Validating restoration parameters..." +ynh_script_progression "Validating restoration parameters..." test ! -d $config_path \ || ynh_die "There is already a directory: $config_path " @@ -48,21 +48,21 @@ test ! -d $config_path \ #================================================= # 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" #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_print_info "Reinstalling dependencies..." +ynh_script_progression "Reinstalling dependencies..." ynh_install_app_dependencies $pkg_dependencies #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Reinstalling GitLab Runner..." +ynh_script_progression "Reinstalling GitLab Runner..." update_src_version() { source ../settings/scripts/upgrade.d/upgrade.last.sh @@ -93,7 +93,7 @@ dpkg -i $tempdir/$gitlab_runner_filename #================================================= # 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. split_char="," @@ -123,10 +123,10 @@ done # ADVERTISE SERVICE IN ADMIN PANEL #================================================= -yunohost service add $app --log "$app" --log_type="systemd" +yunohost service add $app #================================================= # END OF SCRIPT #================================================= -ynh_print_info "Restoration completed for $app" +ynh_script_progression "Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 2ea4e09..c98a750 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Loading installation settings..." +ynh_script_progression "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -21,14 +21,14 @@ architecture=$(ynh_app_setting_get $app architecture) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_print_info "Ensuring downward compatibility..." +ynh_script_progression "Ensuring downward compatibility..." # NOTING TO DO HERE YET #================================================= # 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 ynh_backup_before_upgrade @@ -44,7 +44,7 @@ ynh_abort_if_errors #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Upgrading source files..." +ynh_script_progression "Upgrading source files..." update_src_version() { source ./upgrade.d/upgrade.last.sh @@ -72,12 +72,18 @@ dpkg -i $tempdir/$gitlab_runner_filename #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_print_info "Upgrading dependencies..." +ynh_script_progression "Upgrading dependencies..." ynh_install_app_dependencies $pkg_dependencies +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +yunohost service add $app + #================================================= # END OF SCRIPT #================================================= -ynh_print_info "Upgrade of $app completed" +ynh_script_progression "Upgrade of $app completed" --last diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 1e134f8..5f15bb3 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -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"