{"id":15813708,"url":"https://github.com/markruler/naver-works-plugin","last_synced_at":"2025-07-03T08:07:27.721Z","repository":{"id":57917732,"uuid":"528137978","full_name":"markruler/naver-works-plugin","owner":"markruler","description":"Jenkins Plugin for NAVER Works message bot","archived":false,"fork":false,"pushed_at":"2024-12-02T01:11:07.000Z","size":339,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T01:54:30.247Z","etag":null,"topics":["jenkins","jenkins-plugin","naver","naver-cloud-platform","naver-works"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markruler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T19:38:32.000Z","updated_at":"2024-09-06T08:04:42.000Z","dependencies_parsed_at":"2024-10-26T09:46:33.586Z","dependency_job_id":"a5e77577-488f-4af0-b49c-13737432b59f","html_url":"https://github.com/markruler/naver-works-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/markruler/naver-works-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markruler%2Fnaver-works-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markruler%2Fnaver-works-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markruler%2Fnaver-works-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markruler%2Fnaver-works-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markruler","download_url":"https://codeload.github.com/markruler/naver-works-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markruler%2Fnaver-works-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263287849,"owners_count":23443084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jenkins","jenkins-plugin","naver","naver-cloud-platform","naver-works"],"created_at":"2024-10-05T04:04:53.124Z","updated_at":"2025-07-03T08:07:27.678Z","avatar_url":"https://github.com/markruler.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# naver-works-plugin\n\n## Prerequisite\n\n- Java 17+\n\n## Verify\n\n```shell\n./mvnw clean verify\n```\n\n## Running\n\n````shell\n./mvnw clean hpi:run\n# Jenkins is fully up and running\n````\n\n- [http://localhost:8080/jenkins/](http://localhost:8080/jenkins/) 접속\n- Pipeline 문법을 사용하려면 필요한 [Pipeline 플러그인](https://plugins.jenkins.io/workflow-aggregator/) 설치\n\n```groovy\nnode {\n    stage('Notification') {\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'text',\n                // optional parameters\n                backgroundImageUrl: env.NAVER_WORKS_BG_URL,\n                contentActionLabel: 'Go to Jenkins',\n                contentActionLink: env.BUILD_URL,\n                simpleMessage: \"\"\"test\"\"\".stripMargin()\n        )\n    }\n}\n```\n\n## Build\n\n```shell\n./mvnw clean install\n# target/naver-works.hpi\n```\n\n### Upload\n\n\u003e Manage Jenkins \u003e Manage Plugins \u003e Advanced \u003e Deploy Plugin\n\n![Deploy Plugin](images/deploy-plugin.png)\n\n## Add Credentials\n\n[NAVER Works Developer Console](https://developers.worksmobile.com/kr/console/openapi/v2/app/list/view)에서\n앱 정보를 추가하고, Jenkins Credential을 추가한다.\n\n![NAVER Works App](images/naver-works-client-app.png)\n\n![NAVER Works Credential](images/naver-works-credential.png)\n\n## Pipeline\n\n```groovy\n// Jenkinsfile.groovy\nnode {\n    stage('Notification') {\n        List issues = [\n                [link: \"https://jira.markruler.com/browse/MARK-31\", title: \"MARK-31\", subtitle: \"Jira Issue 31\"],\n                [link: \"https://jira.markruler.com/browse/MARK-32\", title: \"MARK-32\", subtitle: \"Jira Issue 32\"]\n        ]\n\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'list_template',\n                // optional parameters\n                backgroundImageUrl: env.NAVER_WORKS_BG_URL,\n                contentActionLabel: 'Go to Jenkins',\n                contentActionLink: env.BUILD_URL,\n                messages: issues,\n                simpleMessage: \"\"\"${minute}분 뒤 'A'가 재시작됩니다.\n                               |\n                               |'A' will restart in ${minute} minutes.\n                               |\"\"\".stripMargin()\n        )\n    }\n}\n```\n\n`Manage Jenkins \u003e Configure System \u003e Jenkins Location \u003e Jenkins URL`\n구성은 별도로 설정하지 않았다면 기본적으로 `localhost`로 설정된다.\n그럼 `BUILD_URL` 환경 변수는 생성되지 않는다.\n로그를 확인해보면 `unconfigured-jenkins-location`과 같은 메시지를 확인할 수 있다.\n`Jenkins URL`에 젠킨스 서비스 도메인을 입력하거나,\n로컬 환경에서 테스트할 경우 `http://127.0.0.1:8080/jenkins/` 와 같이 Loopback 주소를 입력한다.\n\n![Jenkins Location](images/jenkins-location.png)\n\n## Message Templates\n\n### Text\n\n```groovy\nnode {\n    stage('Notification') {\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'text',\n                // optional parameters\n                simpleMessage: \"\"\"${minute}분 뒤 'A'가 재시작됩니다.\n                               |\n                               |'A' will restart in ${minute} minutes.\n                               |\"\"\".stripMargin()\n        )\n    }\n}\n```\n\n![Text](images/text-content.png)\n\n### Link\n\n```groovy\nnode {\n    stage('Notification') {\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'link',\n                // optional parameters\n                backgroundImageUrl: env.NAVER_WORKS_BG_URL,\n                contentActionLabel: 'Go to Jenkins',\n                contentActionLink: env.BUILD_URL,\n                simpleMessage: 'Changes have been deployed.'\n        )\n    }\n}\n```\n\n![Link](images/link-content.png)\n\n### List Template\n\n```groovy\nnode {\n    stage('Notification') {\n        List issues = [\n                [link: \"https://jira.markruler.com/browse/MARK-31\", title: \"MARK-31\", subtitle: \"Jira Issue 31\"],\n                [link: \"https://jira.markruler.com/browse/MARK-32\", title: \"MARK-32\", subtitle: \"Jira Issue 32\"]\n        ]\n\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'list_template',\n                // optional parameters\n                backgroundImageUrl: env.NAVER_WORKS_BG_URL,\n                contentActionLabel: 'Go to Jenkins',\n                contentActionLink: env.BUILD_URL,\n                messages: issues\n        )\n    }\n}\n```\n\n![List Template](images/list-template-content.png)\n\n### Carousel\n\n```groovy\nnode {\n    stage('Notification') {\n        List issues = [\n                [link: \"https://jira.markruler.com/browse/MARK-1\", title: \"MARK-1\", subtitle: \"not null\"],\n                [link: \"https://jira.markruler.com/browse/MARK-2\", title: \"MARK-2\", subtitle: \"subtitle2\"],\n                [link: \"https://www.jenkins.io/\", title: \"title-3\", subtitle: \"subtitle3\"]\n        ]\n\n        naver(\n                // required parameters\n                credentialId: 'naver-works-credential',\n                botId: env.NAVER_WORKS_BOT_ID,\n                channelId: env.NAVER_WORKS_CHANNEL_ID,\n                messageType: 'carousel',\n                // optional parameters\n                backgroundImageUrl: env.NAVER_WORKS_BG_URL,\n                contentActionLabel: 'Go to Jenkins',\n                contentActionLink: env.BUILD_URL,\n                messages: issues\n        )\n    }\n}\n```\n\n![Carousel](images/carousel-content.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkruler%2Fnaver-works-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkruler%2Fnaver-works-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkruler%2Fnaver-works-plugin/lists"}