웹훅 배포 엔드포인트는 Looker 인스턴스에 Git 분기, 커밋 SHA 또는 태그 이름의 변경사항을 배포한 다음 변경사항을 프로젝트의 프로덕션 버전으로 푸시하라는 메시지를 표시합니다. (Looker 배포 웹훅 형식은 웹훅으로 배포 섹션을 참조하세요.) 대부분의 프로젝트에서 Looker는 Git 통합을 처리하고 프로덕션에 업데이트를 배포하므로 배포 웹훅을 설정할 필요가 없습니다.
하지만 다음과 같은 상황에는 배포 웹훅을 사용하여 변경사항을 프로덕션에 푸시해야 합니다.
스테이징 환경에서 개발 워크플로에 일반적으로 사용되는 Looker IDE 외부의 원격 프로덕션 분기로 업데이트를 푸시합니다.
웹훅을 사용하여 고급 배포 모드로 배포하면 Looker 프로젝트의 프로덕션 버전에 사용되는 분기, 커밋 SHA 또는 태그 이름을 지정할 수 있습니다.
Git pull 요청을 사용하여 Looker 프로젝트를 구성했습니다. 즉, Looker 프로덕션 환경으로 변경사항을 푸시하려면 pull 요청을 병합한 후 배포 웹훅을 트리거해야 합니다. Git 제공업체의 인터페이스에 웹훅을 추가하는 경우 대부분의 Git 호스팅 서비스에서 자동화 방법이 있습니다.
Looker 관리자인 경우 승인된 당사자만 트리거할 수 있도록 보안 비밀이 필요한 배포 웹훅을 구성할 수 있습니다. 관리자가 아닌 Looker 개발자는 프로젝트 구성 페이지를 볼 수 있지만 옵션을 변경할 수 없습니다.
배포 보안 비밀 추가
Looker는 GitHub, Bitbucket 서버, GitLab과 같은 Git 제공업체에 대한 웹 보안 비밀을 지원합니다.
프로젝트에 웹훅 배포 보안 비밀을 설정하려면 다음 안내를 따르세요.
개발 모드에서 프로젝트를 열고 IDE 탐색 메뉴에서 설정 아이콘을 선택하여 프로젝트 설정 패널을 엽니다.
프로젝트 설정 패널에서 구성을 선택합니다.
웹훅 배포 보안 비밀 섹션까지 스크롤한 다음 웹훅 보안 비밀 설정을 클릭합니다. Looker가 보안 비밀 토큰을 자동으로 생성합니다. 이 자동 생성된 보안 비밀을 사용하거나 자체 보안 비밀 토큰을 입력할 수 있습니다.
자동으로 생성된 보안 비밀을 사용하거나 자체 보안 비밀을 만드는 여부에 관계없이 웹훅 배포 보안 비밀을 복사하여 텍스트 파일에 붙여넣으면 보안 비밀을 저장소의 웹훅에 추가해야 하는 경우에 사용할 수 있습니다. 이때 복사해야 합니다. 프로젝트 구성 페이지를 나가거나 새로고침하면 웹훅 배포 보안 비밀에 액세스할 수 없으며 프로젝트에 다시 액세스하려면 웹훅 배포 보안 비밀을 변경하거나 삭제해야 합니다.
프로젝트 구성 저장을 클릭합니다.
이제 프로젝트의 배포 웹훅에 이 보안 비밀이 필요합니다. Looker 스테이징 인스턴스를 사용하는 프로젝트의 경우 프로덕션에 배포하려면 HTTP 헤더에 웹훅 배포 보안 비밀을 포함해야 합니다. Git pull 요청 통합이 포함된 프로젝트의 경우 Git 제공업체의 인터페이스로 이동하여 저장소의 웹훅에 보안 비밀을 추가해야 합니다.
Git 저장소의 웹훅에 대한 보안 비밀 구성
Git pull 요청 통합 프로젝트의 경우 LookML 프로젝트에 배포 웹훅 보안 비밀을 추가한 경우 Git 제공업체의 인터페이스로 이동하여 보안 비밀을 저장소의 웹훅에 추가해야 합니다. 예를 들어 GitHub를 사용하여 이를 수행하는 방법은 다음과 같습니다.
Git 제공업체의 웹사이트에서 프로젝트의 저장소 설정으로 이동합니다.
팁: Git 통합을 위해 프로젝트를 설정한 경우 Looker에서 프로젝트의 Git 메뉴에 있는 Git에 프로젝트 보기 옵션을 사용할 수 있습니다.
저장소 설정에서 웹훅을 클릭합니다.
LookML 프로젝트의 웹훅을 찾은 후 수정 버튼을 클릭합니다.
보안 비밀 필드에 Looker의 웹훅 배포 보안 비밀 섹션에서 복사한 웹훅 배포 보안 비밀을 붙여넣습니다.
웹훅 배포 보안 비밀 섹션까지 스크롤하고 보안 비밀 재설정을 클릭합니다. Looker가 새 보안 비밀 토큰을 자동으로 생성합니다. 이 자동 생성된 보안 비밀을 사용하거나 고유한 새 보안 비밀 토큰을 입력할 수 있습니다.
자동으로 생성된 보안 비밀을 사용하거나 자체 보안 비밀을 만드는 여부에 관계없이 웹훅 배포 보안 비밀을 복사하여 텍스트 파일에 붙여넣으면 보안 비밀을 저장소의 웹훅에 추가해야 하는 경우에 사용할 수 있습니다. 이때 클립보드에 복사해야 합니다. 프로젝트 구성 페이지를 나가거나 새로고침하면 웹훅 배포 보안 비밀에 액세스할 수 없으므로 돌아가서 보안 비밀을 변경하거나 완전히 삭제해야 합니다.
웹훅 배포 보안 비밀 섹션까지 스크롤하고 보안 비밀 삭제를 클릭합니다. 이 시점에서 삭제 안함을 클릭하여 작업을 취소하고 배포 보안 비밀을 유지할 수 있습니다.
프로젝트에서 웹훅 배포 보안 비밀을 영구적으로 삭제하려면 프로젝트 구성 저장을 클릭합니다.
프로젝트에 더 이상 배포 웹훅의 보안 비밀이 필요하지 않습니다. 프로젝트가 Git pull 요청 통합으로 구성된 경우, 이제 Git 제공업체의 인터페이스로 이동하여 저장소에서 웹훅 보안 비밀을 삭제할 수 있습니다. Looker 자체는 더 이상 Git 제공업체 측에서 보안 비밀을 확인하지 않으므로 Git 저장소 웹훅에 여전히 보안 비밀이 구성되어 있어도 문제가 발생하지 않습니다. Git 저장소에서 보안 비밀을 삭제하려면 Git 저장소 웹훅의 보안 비밀 구성에서 Git 제공업체의 인터페이스에서 보안 비밀을 수정하는 방법에 대한 정보를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-22(UTC)"],[],[],null,["# Configuring the webhook deploy secret\n\nA webhook deploy endpoint prompts your Looker instance to deploy changes from a Git branch, a commit SHA, or a tag name, and then push the changes to the production version of your project. (See the [Deploying with webhooks](/looker/docs/advanced-deploy-mode#deploying_with_webhooks) section for the Looker deploy webhook formats.) For most projects, Looker handles the Git integrations and [deploys updates to production](/looker/docs/version-control-and-deploying-changes#deploying_to_production), so you don't need to set up a deploy webhook.\n\nHowever, you *do* need to use a deploy webhook to push changes to production if any of the following circumstances applies:\n\n- You push updates to the remote production branch outside of the Looker IDE, which is common in development workflows with staging environments.\n- You want to use a webhook to deploy with [advanced deploy mode](/looker/docs/advanced-deploy-mode), which lets you specify the branch, the commit SHA, or the tag name that is used for your production version of the Looker project.\n- You have configured your Looker project with Git [pull requests](/looker/docs/git-options#integrating_pull_requests_for_your_project), which means that you have to trigger a deploy webhook once you merge a pull request in order to push those changes to your Looker production environment. Most Git hosting services have ways of automating this if you [add the webhook to your Git provider's interface](/looker/docs/git-options#adding_a_webhook_to_your_git_provider).\n\nIf you are a Looker admin, you can configure the deploy webhook to require a secret so that only authorized parties can trigger it. Looker developers who are not admins can view the **Project Configuration** page but cannot change the options there.\n\nAdding a deploy secret\n----------------------\n\nLooker supports web secrets for the following Git providers: GitHub, Bitbucket Server, and GitLab.\n\nTo set a webhook deploy secret to your project:\n\n1. In [Development Mode](/looker/docs/dev-mode-prod-mode), [open your project](/looker/docs/accessing-project-files) and select the settings icon in the IDE navigation bar to open the project settings panel.\n2. Select **Configuration** in the project settings panel.\n3. Scroll to the **Webhook Deploy Secret** section, then click **Set Webhook Secret**. Looker will automatically generate a secret token. You can use this automatically generated secret, or you can type in your own secret token.\n4. Whether you are using the automatically generated secret or creating your own secret, copy the webhook deploy secret and paste it into a text file so you'll have it if you need to [add the secret to the webhook for your repository](#configuring_the_secret_for_your_git_repositorys_webhook). Be sure to copy it at this point. Once you leave or refresh the **Project Configuration** page, you lose access to the webhook deploy secret and will have to [change](#changing_a_deploy_secret) or [remove](#removing_a_deploy_secret) the webhook deploy secret to regain access to your project.\n5. Click **Save Project Configuration**.\n\nThe deploy webhook for your project now requires this secret. For projects that use a Looker staging instance, you need to include the webhook deploy secret in your HTTP header in order to deploy to production. For projects with [Git pull request integration](/looker/docs/git-options#integrating_pull_requests_for_your_project), you need to go to your Git provider's interface to [add the secret to the webhook for your repository](#configuring_the_secret_for_your_git_repositorys_webhook).\n\n### Configuring the secret for your Git repository's webhook\n\nFor projects with [Git pull request integration](/looker/docs/git-options#integrating_pull_requests_for_your_project), if you have added a deploy webhook secret to your LookML project, you need to go to your Git provider's interface to add the secret to the webhook for your repository. As an example, here is how you do that using GitHub:\n\n1. Navigate to your project's repository settings on your Git provider's website.\n\n \u003e **TIP** : If you've set up your project for Git integration, you can use the **View Project on Git** option from your project's Git menu in Looker.\n2. In your repository's settings, click **Webhooks**.\n\n3. Find the webhook for your LookML project, then click its **Edit** button.\n\n4. In the **Secret** field, paste the webhook deploy secret you copied from the **Webhook Deploy Secret** section in Looker.\n\n5. Click **Update webhook**.\n\nThe webhook secret is now required in order to deploy changes to the production version of your project. If you need, you can [change the secret](#changing_a_deploy_secret) or [remove the secret from your project](#removing_a_deploy_secret).\n\nChanging a deploy secret\n------------------------\n\nOnce a webhook deploy secret has been [added](#adding_a_deploy_secret) to your project, if you are a Looker admin, you can change the secret by doing the following:\n\n1. [From your project](/looker/docs/accessing-project-files), select the **Settings** icon from the navigation bar.\n2. Scroll to the **Webhook Deploy Secret** section and click **Reset Secret**. Looker will automatically generate a new secret token. You can use this automatically generated secret, or you can type in your own new secret token.\n3. Whether you are using the automatically generated secret or creating your own secret, copy the webhook deploy secret and paste it into a text file so you'll have it if you need to [add the secret to the webhook for your repository](#configuring_the_secret_for_your_git_repositorys_webhook). Be sure to copy it from your clipboard at this point. Once you leave or refresh the **Project Configuration** page, you will lose access to the webhook deploy secret and will have to go back and change it or [remove](#removing_a_deploy_secret) it entirely.\n4. Click **Save Project Configuration**.\n\nIf your project is configured with [Git pull request integration](/looker/docs/git-options#integrating_pull_requests_for_your_project), you also need to go to your Git provider's interface to [update the webhook secret for your repository](#configuring_the_secret_for_your_git_repositorys_webhook).\n\nRemoving a deploy secret\n------------------------\n\nOnce a webhook deploy secret has been [added](#adding_a_deploy_secret) to your project, if you are a Looker admin, you can remove the secret by doing the following:\n\n1. [From your project](/looker/docs/accessing-project-files), select the **Settings** icon from the navigation bar.\n2. Scroll to the **Webhook Deploy Secret** section and click **Remove Secret** . At this point, you can cancel the operation and keep the deploy secret by clicking **Don't Remove**.\n3. To permanently remove the webhook deploy secret from your project, click **Save Project Configuration**.\n\nYour project no longer requires a secret for the deploy webhook. If your project is configured with [Git pull request integration](/looker/docs/git-options#integrating_pull_requests_for_your_project), you can now go to your Git provider's interface to remove the webhook secret from your repository. Looker itself will no longer check for a secret on the Git provider's end, so it doesn't hurt if your Git repository webhook still has a secret configured. If you do want to remove the secret from your Git repository, see [Configuring the Secret for Your Git Repository's Webhook](#configuring_the_secret_for_your_git_repositorys_webhook) for information on editing the secret on a Git provider's interface."]]