AWS

[패스트캠퍼스 수강 후기] 올인원 패키지 : AWS/Docker 클라우드 서버구축👉AWS강의 100% 환급 챌린지 23 회차 미션

복습 3일 차 


Jira API

Jira API를 사용하여 jira를 제어 가능 하다. 

docs.atlassian.com/software/jira/docs/api/REST/8.4.2/#api/2/issue-createIssue

 

JIRA 8.4.2

Change the node's state to offline if the node is reporting as active, but is not alive. Don't use this method as an equivalent of running ./stop-jira.sh. This method doesn't shut down a node, but only changes its state, so that other nodes don't communica

docs.atlassian.com

이슈에 대한 api중 create, get, delete, edit를 복습하려 한다. API 호출에 사용할 프로그램은 postman을 사용하였다. 

www.postman.com/

 

Postman | The Collaboration Platform for API Development

Postman makes API development easy. Our platform offers the tools to simplify each step of the API building process and streamlines collaboration so you can create better APIs faster.

www.postman.com

GET API

get api 사용법은 아래와 같은 주소로 호출한다.

GET /rest/api/2/issue/{issueIdOrKey}

api 호출에 대한 응답으로 아래와 같은 형태의 데이터를 받을 수 있다. 호출한 이슈 정보를 확인 가능하다.

{
	"key" : "blo-1",
	"fields" : {
		"issuetype" : {
			"id" : "10100",
			"description" : "개발 목적 및 상태",
			"name" : "관리 이슈"
		}
	}
}

 

Create API

다음으로.create api 사용법은 아래 주소로 이슈에 대한 데이터를 첨부하여 POST 방식으로 호출하면 된다.

[ip주소:포트번호]/api/2/issue

첨부 가능한 데이터의 예시 형태이다. 

{
    "update": {
        "worklog": [
            {
                "add": {
                    "timeSpent": "60m",
                    "started": "2011-07-05T11:05:00.000+0000"
                }
            }
        ]
    },
    "fields": {
        "project": {
            "id": "10000"
        },
        "summary": "something's wrong",
        "issuetype": {
            "id": "10000"
        },
        "assignee": {
            "name": "homer"
        },
        "reporter": {
            "name": "smithers"
        },
        "priority": {
            "id": "20000"
        },
        "labels": [
            "bugfix",
            "blitz_test"
        ],
        "timetracking": {
            "originalEstimate": "10",
            "remainingEstimate": "5"
        },
        "security": {
            "id": "10000"
        },
        "versions": [
            {
                "id": "10000"
            }
        ],
        "environment": "environment",
        "description": "description",
        "duedate": "2011-03-11",
        "fixVersions": [
            {
                "id": "10001"
            }
        ],
        "components": [
            {
                "id": "10000"
            }
        ],
        "customfield_30000": [
            "10000",
            "10002"
        ],
        "customfield_80000": {
            "value": "red"
        },
        "customfield_20000": "06/Jul/11 3:25 PM",
        "customfield_40000": "this is a text field",
        "customfield_70000": [
            "jira-administrators",
            "jira-software-users"
        ],
        "customfield_60000": "jira-software-users",
        "customfield_50000": "this is a text area. big text.",
        "customfield_10000": "09/Jun/81"
    }
}

api 호출에 대한 응답은 아래와 같다.

{
    "id": "10000",
    "key": "TST-24",
    "self": "http://www.example.com/jira/rest/api/2/issue/10000"
}

 

Edit API

issue edit api를 살펴본다. 형태는 아래와 같다. 이슈 id를 사용하며 수정정보를 첨부하여 호출 가능하다.

PUT /rest/api/2/issue/{issueIdOrKey}

수정할 issue의 데이터 형태는 아래를 참고하면 된다.

{
   "update":{
      "summary":[
         {
            "set":"Bug in business logic"
         }
      ],
      "components":[
         {
            "set":""
         }
      ],
      "timetracking":[
         {
            "edit":{
               "originalEstimate":"1w 1d",
               "remainingEstimate":"4d"
            }
         }
      ],
      "labels":[
         {
            "add":"triaged"
         },
         {
            "remove":"blocker"
         }
      ]
   },
   "fields":{
      "summary":"This is a shorthand for a set operation on the summary field",
      "customfield_10010":1,
      "customfield_10000":"This is a shorthand for a set operation on a text custom field"
   },
   "historyMetadata":{
      "type":"myplugin:type",
      "description":"text description",
      "descriptionKey":"plugin.changereason.i18.key",
      "activityDescription":"text description",
      "activityDescriptionKey":"plugin.activity.i18.key",
      "actor":{
         "id":"tony",
         "displayName":"Tony",
         "type":"mysystem-user",
         "avatarUrl":"http://mysystem/avatar/tony.jpg",
         "url":"http://mysystem/users/tony"
      },
      "generator":{
         "id":"mysystem-1",
         "type":"mysystem-application"
      },
      "cause":{
         "id":"myevent",
         "type":"mysystem-event"
      },
      "extraData":{
         "keyvalue":"extra data",
         "goes":"here"
      }
   },
   "properties":[
      {
         "key":"key1",
         "value":"properties":"can be set at issue create or update time"
      },
      {
         "key":"key2",
         "value":"and":"there can be multiple properties"
      }
   ]
}

 

Delete API

issue 삭제를 담당하는 delete api 를 살펴본다. 이슈 id를 사용하여 호출하면 삭제가 완료된다.

DELETE /rest/api/2/issue/{issueIdOrKey}

delete api 호출에 대한 응답종류는 아래와 같다.

Jira API를 사용한 jira issue를 제어 하는 과정을 복습했다. 이부분은 슬랙과 연동하여 메신저 상에서 issue를 확인하고 생성하는 bot을 추가한다면 jira를 좀 더 편하게 사용할 수 있을거라 생각한다.


Bitbucket

bitbucket.org/product/

 

Bitbucket | The Git solution for professional teams

Collaborate on code with inline comments and pull requests. Manage and share your Git repositories to build and ship software, as a team.

bitbucket.org

atlassian의 형상관리 서비스로 github와 같다고 생각하면 된다. atlassian 소프트웨어와 호환성 높게 연동이 가능한 점이 bitbucket의 장점이라 할 수 있다.  atlassian에서 bitbucket과 github을 비교한 문서도 첨부한다.

www.atlassian.com/ko/software/bitbucket/comparison/bitbucket-vs-github

 

Bitbucket vs GitHub | Bitbucket

Bitbucket vs GitHub - Bitbucket Cloud offers everything your team needs to build better software

bitbucket.org

비용적인 면에서 bitbucket 비용이 저렴한걸 강조하고 있다. 아래 주요 장점을 첨부한다.

bitbucket 화면 구성은 아래와 같다. Projects별 Repositories를 나눌수 있어 github보다는 프로젝트 관리면에서 직관적이며 jira issue에 대한 내용도 확인이 가능하다.  

bitbucket사용하면서 주로 사용한 git 명령어를 정리한다. 

git init : git 생성하기
git clone {git 저장소 주소} : 저장소의 코드를 복사
git add file_path : 수정한 코드 선택하기 ( git add * )

git commit -m “commit_description” : 선택한 코드 설명 적기 ( git commit -m “내용”)
git push -u origin master : master branch에 commit한 내용을 업로드 
git pull : git 저장소에서 최신 코드받기
git fetch : git서버에서 최신 코드 받아오기

git checkout branch_name : 브랜치 선택하기
git checkout -t remote_path/branch_name : 원격 브랜치 선택하기
git branch branch_name : 브랜치 생성하기
git branch -d branch_name : 브랜치 삭제하기

git reset — hard HEAD && git pull : git 코드 강제로 모두 받아오기

git을 사용하게 되면 개발 단계 목적에 따라 branch 사용을 구분해야 한다. 회사마다 branch 전략이 다를 테지만 git flow를 사용하여 통일된 branch 전략을 사용하는 증가하고 있다. bibucket을 사용한다면 git-flow를 적용하는 것을 추천한다. 배달의 민족의 git-flow 문서를 첨부한다.

woowabros.github.io/experience/2017/10/30/baemin-mobile-git-branch-strategy.html

 

우린 Git-flow를 사용하고 있어요 - 우아한형제들 기술 블로그

안녕하세요. 우아한형제들 배민프론트개발팀에서 안드로이드 앱 개발을 하고 있는 나동호입니다.오늘은 저희 안드로이드 파트에서 사용하고 있는 Git 브랜치 전략을 소개하려고 합니다. ‘배달

woowabros.github.io

 


23일 마무리 

Jira API 문서를 자세히 본 시간이였다. 다양한 api를 제공하며 활용할 방법은 무궁무진 한 것 같다. 대표적인 get, create, edit, delete만 slack에 연동 해도 jira에 익숙하지 않은 사람들도 편하게 사용할 수 있으리라 생각된다. 

github을 주로 사용하다 bitbucket 사용해보니 대부분의 사용법은 동일하나 jira와 연동이 강점이라 생각한다. 


현재 수강 중인 강의는 아래와 같다
올인원 패키지 : AWS/Docker 클라우드 서버구축👉https://bit.ly/3bFlm0e