Closed rawlingsj closed 5 years ago
I just created a BC using a unit test but I used the values from this example https://docs.openshift.com/container-platform/3.3/dev_guide/builds.html#defining-a-buildconfig
@Test
public void testCreateBuildConfig() throws Exception {
DefaultOpenShiftClient oc = new DefaultOpenShiftClient();
//oc.buildConfigs().createOrReplaceWithNew().withNewMetadata().withName("test2").withNamespace("online-tenant").endMetadata().done();
oc.buildConfigs().createNew().withNewMetadata().withName("ruby-sample-build1").endMetadata()
.withNewSpec()
.withRunPolicy("Serial")
.addNewTrigger()
.withNewGithub()
.withSecret("secret101")
.endGithub()
.withNewGeneric()
.withSecret("secret101")
.endGeneric()
.endTrigger()
.withNewSource()
.withNewGit()
.withUri("https://github.com/openshift/ruby-hello-world")
.endGit()
.withDockerfile("FROM openshift/ruby-22-centos7\nUSER example")
.endSource()
.withNewStrategy()
.withNewSourceStrategy()
.withNewFrom()
.withKind("ImageStreamTag")
.withName("ruby-20-centos7:latest")
.endFrom()
.endSourceStrategy()
.endStrategy()
.withNewOutput()
.withNewTo()
.withKind("ImageStreamTag")
.withName("origin-ruby-sample:latest")
.endTo()
.endOutput()
.withNewPostCommit()
.withScript("bundle exec rake test")
.endPostCommit()
.endSpec()
.done();
}
So I'm guessing the original error is related to some defaults not being populated.
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
To recreate I'm using minishift 1.0.0-beta.3, logged in as system:admin.
Checking who can create BuildConfigs I can see my
system:admin
user can:Using a little junit test:
I get the error that the user doesn't have permissions to create BuildConfigs in the namespace:
Forbidden! User system:admin/192-168-64-151:8443 doesn't have permission
Am I doing something wrong? It seems only to be BuildConfigs I can't create.
Full exception: