cli-playground / kodo

MIT License
0 stars 6 forks source link

Automatically trigger a build after creation of image stream & Build config #23

Open jaideepr97 opened 4 years ago

jaideepr97 commented 4 years ago

Depends on : https://github.com/cli-playground/kodo/issues/15

kodo build should automatically trigger a build after creation of image stream & Build config

Reference code blocks:

buildRequest := BuildRequest{
        "BuildRequest",
        "build.openshift.io/v1",
        struct {
            Name string `json:"name"`
        }{
            buildConfig,
        },
    }

req, err := http.NewRequest("POST", fmt.Sprintf("%s/apis/build.openshift.io/v1/namespaces/openshift-console/buildconfigs/%s/instantiate", openshiftAPIURL, buildConfig), requestBody)
    req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", token))