4. 4
1. Atlassian add-ons
Custom
Link Menu 추가
Custom 메뉴 &
화면 추가
내부 데이터 및 변
경 event를 외부
시스템으로 전송
Atlassian 내부
데이터를
업무시스템에 표시
업무시스템에서
Jira 이슈 생성
업무시스템에서
Jira 계정 생성/조회
Plugin
add-ons
Connect
add-ons
REST
APIs
Use Case
Atlassian Marketplace
5. 5
2. Developer Environment
Java SDK + Atlassian Plugin SDK + IDE (Eclipse)
ver 1.7 ver 6.1.0
Lunar
Plugin project
생성
Jira 자동 설치
및 실행
Plugin
자동 설치
참고 : https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project
6. 6
2. Developer Environment - Set up the JDK
1. Download and Install JDK
2. JAVA_HOME 환경변수에 JDK 설치경로 등록
3. PATH 환경변수에 JAVA_HOME/bin 경로 추가
7. 7
2. Developer Environment - Set up the Atlassian Plugin SDK
1. Download : https://marketplace.atlassian.com/plugins/atlassian-plugin-sdk-windows/server/overview
2. Run the installer EXE
3. 설치완료후 Window 재시작
4. 윈도우 cmd 창을 열고 ‘atlas-version’ 명령으로 아래와 같이 출력되면 정상임.
8. 8
2. Developer Environment - Set up the Eclipse
1. Download and Install Eclipse IDE for Java EE (Lunar)
2. JDK 설정.
3. Maven 설정
9. 9
3. Atlassian Plugin SDK
참고 : https://developer.atlassian.com/docs/developer-tools/working-with-the-sdk/command-reference
10. 10
3. Atlassian Plugin SDK– Commands
SDK Commands Description
atlas-create-jira-plugin jira plugin project 를 생성한다.
atlas-mvn eclipse:eclipse eclipse project meta data 생성.
atlas-create-jira-plugin-module jira plugin module 을 추가한다.
atlas-run jira plugin project 폴더 안에서 실행되어서 plugin build에서부터
plugin 이 자동 설치된 jira 를 설치 및 실행해준다.
atlas-run-standalone atlassian 제품 를 자동 설치 및 실행해준다.
12. 12
3. Atlassian Plugin SDK - Plugin Modules
• Plugin add-on 은 반드시 하나 이상의 plugin module 을 포함해야 한다.
• atlas-create-<app>-plugin-module or annotation 으로 추가
13. 13
• atlas-create-jira-plugin
• atlas-mvn eclipse:eclipse
• delete .classpath file
• Import Project
• convert Maven Project
• atlas-create-jira-plugin-module
• or using annotation
• atlas-run or atlas-package
• or maven build on Eclipse
• atlas-run ( on Local Jira)
• or add add-ons to Jira (file upload)
4. Plugin Development Steps
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
14. 14
4. Plugin Development Steps – Step #2 : Eclipse import
atlas-mvn eclipse:eclipse
- Eclipse 에서 인식할수 있는 eclipse project metadata 를 생성해준다.
- eclipse java project 로 생성됨.
.classpath 파일 삭제
- old version eclipse 기반 .classpath file 삭제.
Convert to Maven Project
Import Project
15. 15
Example #1 - HelloWorld Plugin
동영상 시연
- JIRA 에 Custom Menu 생성하기 -
https://youtu.be/fgdJ1U52Ypc
16. 16
Example #2 -Telegram 연동 Plugin
참고 :
https://developer.atlassian.com/jiradev/jira-platform/guides/other/tutorial-writing-jira-event-listeners-with-the-atlassian-event-library
https://github.com/vysheng/tg
Issue
Created
- Telegram 으로 이슈생성 메시지 보내기 -
telegram-cli
17. 17
Example #2 -Telegram 연동 Plugin
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
atlas-create-jira-plugin
18. 18
Example #2 -Telegram 연동 Plugin
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
delete
.classpath
19. 19
Example #2 -Telegram 연동 Plugin : annotation 기반
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
atlas-create-jira-plugin-module 대신 annotation 사용
20. 20
Example #2 -Telegram 연동 Plugin : command 기반
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
atlas-create-jira-plugin-module 사용
src/main/resources/atlassian-plugin.xml
@ExportAsService
@Named
@ComponentImport
@Inject
사용안함
21. 21
Example #2 -Telegram 연동 Plugin
Project 생성
Eclipse import
Plugin module 추가
및
기능 구현
Build
Plugin 설치
①
②
③
④
⑤
동영상 시연
https://youtu.be/BEEBblaYyrM
23. 23
REST API Browser
참고 : https://developer.atlassian.com/docs/developer-tools/using-the-rest-api-browser
administration console > System > ADVANCED > REST API Browser
25. 25
Atlassian REST APIs - Example
JIRA Aplication
REST APIs
Example Web
이슈 목록 조회 하기 (GET)
이슈 생성 하기 (POST)
참조 :
https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-query-issues
https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue
26. 26
Atlassian REST APIs - Example
• 이슈 목록 조회하기
• REST API : jira/rest/api/2/search
• request parameter sample
jql=assignee=fred
Apache HttpComponents
27. 27
Atlassian REST APIs - Example
• 이슈 생성하기
• REST API : jira/rest/api/2/issue
• rquest parameter sample