From 18a5e0013fd42e4b431bcbc7eda2de617944b78f Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 9 Jun 2023 12:26:55 +0800 Subject: [PATCH] .github/workflows/setup-gitlab-demo.yml: upgrade gitlab chart version -> 7.0.4 --- .github/workflows/setup-gitlab-demo.yml | 2 +- playbook/jobs/init_gitlab | 1 + playbook/roles/gitlab/files/setup.sh | 32 +++++++++++++------------ playbook/roles/gitlab/tasks/main.yml | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/setup-gitlab-demo.yml b/.github/workflows/setup-gitlab-demo.yml index 5938fb58..c89b02d9 100644 --- a/.github/workflows/setup-gitlab-demo.yml +++ b/.github/workflows/setup-gitlab-demo.yml @@ -58,7 +58,7 @@ jobs: dns_sk=$DNS_SK ingress_ip=35.220.216.69 EOF - ansible-playbook -i hosts/inventory jobs/init_k3s_cluster_artifact -D + ansible-playbook -i hosts/inventory jobs/init_k3s_cluster_artifact -D -C Setup-Gitlab-In-K3S: runs-on: ubuntu-latest needs: diff --git a/playbook/jobs/init_gitlab b/playbook/jobs/init_gitlab index 4f550c34..1eef85ef 100644 --- a/playbook/jobs/init_gitlab +++ b/playbook/jobs/init_gitlab @@ -8,6 +8,7 @@ name: gitlab vars: group: master + gitlab_version: '7.0.4' namespace: gitlab db_namespace: database domain: onwalk.net diff --git a/playbook/roles/gitlab/files/setup.sh b/playbook/roles/gitlab/files/setup.sh index e516797b..ccfadd43 100644 --- a/playbook/roles/gitlab/files/setup.sh +++ b/playbook/roles/gitlab/files/setup.sh @@ -7,21 +7,23 @@ check_empty() { fi } -check_empty "$1" "Please provide a domain name as the first argument" -check_empty "$2" "Please provide a namespace as the second argument" -check_empty "$3" "Please provide a GitLab secret as the third argument" -check_empty "$4" "Please provide a GitLab database secret as the fourth argument" -check_empty "$5" "Please provide a GitLab SSO secret as the fifth argument" -check_empty "$6" "Please provide a GitLab SMTP secret as the sixth argument" -check_empty "$7" "Please provide a GitLab Redis secret as the seventh argument" +check_empty "$1" "Please provide a version name as the first argument" +check_empty "$2" "Please provide a domain name as the second argument" +check_empty "$3" "Please provide a namespace as the third argument" +check_empty "$4" "Please provide a GitLab secret as the fourth argument" +check_empty "$5" "Please provide a GitLab database secret as the fifth argument" +check_empty "$6" "Please provide a GitLab SSO secret as the sixth argument" +check_empty "$7" "Please provide a GitLab SMTP secret as the seventh argument" +check_empty "$8" "Please provide a GitLab Redis secret as the eighth argument" -domain=$1 -namespace=$2 -gitlab_secret=$3 -gitlab_db_secret=$4 -gitlab_sso_secret=$5 -gitlab_smtp_secret=$6 -gitlab_redis_secret=$7 +version=$1 +domain=$2 +namespace=$3 +gitlab_secret=$4 +gitlab_db_secret=$5 +gitlab_sso_secret=$6 +gitlab_smtp_secret=$7 +gitlab_redis_secret=$8 cat > gitlab-values.yaml <