def create_deployment(project_file):
    # Todo: make this smoother
    set_artifact_sha_env_variable_from_file_or_image()
    payload = create_deployment_payload()

    with open(project_file) as json_data_file:
        project_data = load_project_configuration(json_data_file)
        url = ApiSchema.url_for_deployments(get_host(), project_data)
        http_post_payload(url, payload, get_api_token())
Exemplo n.º 2
0
 def __call__(self):
     payload = {
         "artifact_sha256": self.fingerprint.sha,
         "build_url": self.ci_build_url.value,
         "description": self.description.value,
         "environment": self.environment.value,
         "user_data": self.user_data.value
     }
     url = ApiSchema.url_for_deployments(self.host.value, self.merkelypipe)
     http_post_payload(url, payload, self.api_token.value)
     return 'Posting', url, payload