บันทึก
การพัฒนาที่ใช้งานอยู่ของโครงการนี้ได้ย้ายภายใน prefecthq/นายอำเภอ รหัสสามารถพบได้ที่นี่และเอกสารที่นี่ กรุณาเปิดปัญหาและ PRS กับ prefecthq/นายอำเภอแทนที่เก็บนี้
การบูรณาการของนายอำเภอสำหรับการทำงานกับที่เก็บ BitBucket
ต้องมีการติดตั้ง Python 3.7+
เราขอแนะนำให้ใช้ตัวจัดการสภาพแวดล้อมเสมือนจริงของ Python เช่น Pipenv, Conda หรือ Virtualenv
งานเหล่านี้ได้รับการออกแบบให้ทำงานกับนายอำเภอ 2.0 สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีการใช้ PREFECT โปรดดูเอกสารประกอบของนายอำเภอ
ติดตั้ง prefect-bitbucket
ด้วย pip
:
PIP ติดตั้ง PREFECT-BITBUCKET
จากนั้นลงทะเบียนเพื่อดูบล็อกบนพรีเฟ็คคลาวด์:
Prefect Block Register -m Prefect_bitbucket
หมายเหตุในการใช้วิธี load
บนบล็อกคุณต้องมีเอกสารบล็อกที่บันทึกผ่านรหัสหรือบันทึกผ่าน UI
จากการนำเข้า Prefect flowfrom prefect_bitbucket.credentials นำเข้า bitbucketcredentials@flowdef use_stored_bitbucket_creds_flow (): bitbucket_credentials_block = bitbucketcredentials.load ("block_name"
จากการนำเข้า Prefect flowfrom prefect_bitbucket.credentials นำเข้า bitbucketcredentials@flowdef create_new_bitbucket_creds_flow (): bitbucket_credentials_block = bitbucketcredentials (token = "my-token"
จาก prefect_bitbucket นำเข้า bitbucketrepositorypublic_repo = "https://bitbucket.org/my-workspace/my-repository.git"# สร้าง Bitbuckitory Bitbuckitory FECT WORKSPACE (ใน แท็บบล็อก) public_bitbucket_block.save ("My-bitbucket-block")
จาก prefect_bitbucket นำเข้า bitbucketrepositorypublic_repo = "https://bitbucket.org/my-workspace/my-repository.git"# สร้าง bitbucket publicitory ต้นแบบ "repository = public_repo)# บันทึก bitbucketrepository block ไปยังพื้นที่ทำงานของนายอำเภอ (ในแท็บบล็อก) branch_bitbucket_block.save (" My-bitbucket-branch-block "))
จากการนำเข้า bitbucketcredentials, bitbucketrepository# สำหรับ repo ส่วนตัวเราต้องการข้อมูลรับรองเพื่อเข้าถึง itbitbucket_credentials_block = bitbucketcredentials (โทเค็น = "my-token" แท็บบล็อก) bitbucket_credentials_block.save (name = "my-bitbucket-credentials-block")# สร้างที่เก็บ bitbucket ส่วนตัว bitbucketrepository_repo-repistorybuckbuck.orgbuck.orgbuck. BitBucketRepository (repository = private_repo, bitbucket_credentials = bitbucket_credentials_block)# บันทึก bitbucketrepository ไปยังพื้นที่ทำงานของนายอำเภอ
จากการนำเข้า bitbucketcredential, bitbucketrepository# โหลด bitbucketcredentials bitbucketbucketcredentials.load -ความไม่ลงรอยกัน .git "private_bitbucket_block = bitbucketrepository (repository = private_repo, bitbucket_credentials = bitbucket_credentials_block)# บันทึก bitbucketrepository ลงในพื้นที่ทำงานของคุณ
- ข้อมูล "ความแตกต่างระหว่าง 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
หากคุณมีคำถามหรือปัญหาใด ๆ ในขณะที่ใช้ prefect-bitbucket
คุณสามารถขอความช่วยเหลือในฟอรัมวาทกรรมของนายอำเภอหรือชุมชน Slack Prefect
อย่าลังเลที่จะ️หรือดู prefect-bitbucket
สำหรับการอัปเดตด้วย!
หากคุณต้องการติดตั้งเวอร์ชันของ prefect-bitbucket
เพื่อการพัฒนาให้โคลนที่เก็บและทำการติดตั้งที่แก้ไขได้ด้วย pip
:
git clone https://github.com/prefecthq/prefect-bitbucket.gitcd Prefect-itbucket/ PIP Install -e ". [dev]"# ติดตั้งการตั้งค่าการตั้งค่าล่วงหน้าของการติดตั้ง hookspre-comme-commit-commit