Slide 24
Slide 24 text
import json
# Zapier Ͱઃఆͨ͠ڥม input_data ͰऔಘՄೳ
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
auth = (input_data['circleci_token'], '')
response = requests.post(
"https://circleci.com/api/v2/project/gh/org/repo/pipeline",
data=json.dumps({
"branch": "master",
"parameters": {
"run_device_registration_from_ci": True,
"device_name": input_data['device_name'],
"device_udid": input_data['device_udid']
}}),
headers = headers,
auth = auth)
response.raise_for_status()
output = response.json()
parameters:
run_device_registration_from_ci:
type: boolean
default: false
workflows:
version: 2.1
# --- API ܦ༝ͷΈ
# fastlane register_device Λ࣮ߦ͢Δ
add_new_device_from_ci:
when: << pipeline.parameters.run_device_registration_from_ci >>
steps:
- checkout
- run: *build
- run: bundle exec fastlane add_new_device
name:<< pipeline.parameters.device_name >>
udid:<< pipeline.parameters.device_udid >>
config.yml
CI ্Ͱ fastlane ࣮ߦ