From 3c3da600888b395fba4354d40a453313ad814fd4 Mon Sep 17 00:00:00 2001 From: Kim Seung-yeop Date: Thu, 28 Nov 2024 17:56:49 +0900 Subject: [PATCH] setup_jenkins.yml --- .../playbooks/setup_jenkins.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 k8s-cluster-config/playbooks/setup_jenkins.yml diff --git a/k8s-cluster-config/playbooks/setup_jenkins.yml b/k8s-cluster-config/playbooks/setup_jenkins.yml new file mode 100644 index 0000000..e10f4d0 --- /dev/null +++ b/k8s-cluster-config/playbooks/setup_jenkins.yml @@ -0,0 +1,29 @@ +- name: Setup Jenkins with Helm + hosts: master + vars: + repo_url: "https://github.com/Parrotalk/Parrotalk-Manifests.git" + branch: "main" # 사용할 브랜치 (예: main) + environment: "dev" # 설치할 환경 (dev/prod) + manifests_path: "/tmp/Parrotalk-Manifests" # 로컬 임시 경로 + tasks: + - name: Clone Parrotalk-Manifests repository + git: + repo: "{{ repo_url }}" + dest: "{{ manifests_path }}" + version: "{{ branch }}" + + - name: Add Jenkins Helm Repository + shell: | + helm repo add jenkins https://charts.jenkins.io + helm repo update + args: + executable: /bin/bash + + - name: Install Jenkins with Helm + shell: | + helm upgrade --install jenkins-{{ environment }} jenkins/jenkins \ + --namespace jenkins-{{ environment }} \ + --create-namespace \ + -f {{ manifests_path }}/bootstrap/jenkins/values-{{ environment }}.yaml + args: + executable: /bin/bash