메모
이 프로젝트의 적극적인 개발은 Prefecthq/Prefect 내에서 이동했습니다. 코드는 여기에서 찾을 수 있습니다. 이 저장소 대신 Prefecthq/Prefect에 대한 문제와 PR을 열어주십시오.
Bitbucket 저장소 작업을위한 지사 통합.
Python 3.7+ 설치가 필요합니다.
Pipenv, Conda 또는 Virtualenv와 같은 Python Virtual Environment Manager를 사용하는 것이 좋습니다.
이 작업은 Prefect 2.0에서 작동하도록 설계되었습니다. Prefect 사용 방법에 대한 자세한 내용은 Prefect 문서를 참조하십시오.
pip
로 prefect-bitbucket
설치하십시오.
PIP를 설치하십시오
그런 다음 Prefect Cloud에서 블록을 볼 수 있도록 등록하십시오.
Prefect Block Register -M Prefect_bitbucket
블록에서 load
메소드를 사용하려면 이미 코드를 통해 저장되거나 UI를 통해 저장된 블록 문서가 있어야합니다.
Prefect import from Prefect_bitbucket.credentials import import import bitbucketcredentials@flowdef use_stored_bitbucket_creds_flow () : bitbucket_credentials_block = bitbucketcredentials.load ( "block_name") return bitbucket_credentitals_blockuse_stored_bitbet.creds_flocke
prefect import from prefect_bitbucket.credentials import import bitbucketcredentials@flowdef create_new_bitbucket_creds_flow () : bitbucket_credentials_block = bitbucketcredentials (token = "my-token", username = "my-username")
prefect_bitbucket import bitbucketrepositorypublic_repo = "https://bitbucket.org/my-workspace/my-repository.git"#은 공개 비트 버킷 리포지토리 BitBucketRepository를 생성합니다 에이스 (in 블록 탭) public_bitbucket_block.save ( "my bitbucket-block")
prefect_bitbucket import에서 bitbucketrepositorypublic_repo = "https://bitbucket.org/my-workspace/my-repository.git"# 공개 비트 벅켓 리포지토리 BitbucketRepository buttbucketrepositority를 만듭니다. Mas
Prefect_bitbucket 가져 오기 BitbucketCredentials, BitbucketRepository#에서 개인 repo의 경우 BitbucketRepository#에서 itbitbucket_credentials_block = bitbucketcredentials에 액세스하려면 자격 증명이 필요합니다 (token = "my-token", username = "my-username"# 옵션)# bitbucketcredcredcredcredcredcredcredcredcredcredcredcredscredcredcredcredcredcredcredcredcredcredcredcredcredscredcredscredcredscredcredscredcredscrede 블록 탭) bitbucket_credentials_block.save (name = "my-bitbucket-credentials-block")# 개인 비트 버킷 리포지토리 BitbucketRepository blockprivate_repo = "https://bitbucket.org/my-workspace/my-repositority를 만듭니다. bitbucketrepository (repository = private_repo, bitbucket_credentials = bitbucket_credentials_block)# bitbucketrepository 블록을 Prefect Workspace (블록 탭에서)에 저장합니다.
from prefect_bitbucket import BitBucketCredentials, BitBucketRepository# Loads a preexisting BitBucketCredentials blockBitBucketCredentials.load("my-bitbucket-credentials-block")# Creates a private BitBucket repository BitBucketRepository blockprivate_repo = "https://bitbucket.org/my-workspace/my-repository .git "private_bitbucket_block = bitbucketrepository (repository = private_repo, bitbucket_credentials = bitbucket_credentials_block)# bitbucketrepositority 블록을 선구 적 작업 공간 (Blocks Tab)에 저장합니다.
!!!!!!! 정보 "Bitbucket Server와 Bitbucket Cloud의 차이점"
For Bitbucket Cloud, only set the `token` to authenticate. For Bitbucket Server, set both the `token` and the `username`.
prefect-bitbucket
사용하는 동안 버그가 발생하면 Prefect Bitbucket Repository에서 문제를 자유롭게 열어주십시오.
prefect-bitbucket
사용하는 동안 궁금한 점이 있거나 문제가있는 경우 Prefect Discourse Forum 또는 Prefect Slack 커뮤니티에서 도움을받을 수 있습니다.
업데이트를 위해 prefect-bitbucket
자유롭게 보거나보십시오!
개발을 위해 prefect-bitbucket
버전을 설치하려면 저장소를 복제하고 pip
로 편집 가능한 설치를 수행하십시오.
git 클론 https://github.com/prefecthq/prefect-bitbucket.gitcd prefect-bitbucket/ PIP 설치 -E "