fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.41k stars 1.46k forks source link

Unable to create a BuildConfig: User system:admin/192-168-64-151:8443 doesn't have permission.. #694

Closed rawlingsj closed 5 years ago

rawlingsj commented 7 years ago

To recreate I'm using minishift 1.0.0-beta.3, logged in as system:admin.

oc whoami
system:admin

Checking who can create BuildConfigs I can see my system:admin user can:

oc adm policy who-can create buildconfigs
Namespace: online-tenant
Verb:      create
Resource:  buildconfigs

Users:  developer
        system:admin

Groups: system:cluster-admins
        system:masters

Using a little junit test:

  @Test
  public void testCreateBuildConfig() throws Exception {
    DefaultOpenShiftClient oc = new DefaultOpenShiftClient();
    oc.buildConfigs().createNew().withNewMetadata().withName("test").endMetadata().done();
  }

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:

/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/lib/tools.jar:/Users/jamesrawlings/fabric8/jenkins-sync-plugin/target/test-classes:/Users/jamesrawlings/fabric8/jenkins-sync-plugin/target/classes:/Users/jamesrawlings/.m2/repository/io/fabric8/openshift-client/1.4.25/openshift-client-1.4.25.jar:/Users/jamesrawlings/.m2/repository/io/fabric8/kubernetes-client/1.4.25/kubernetes-client-1.4.25.jar:/Users/jamesrawlings/.m2/repository/io/fabric8/kubernetes-model/1.0.63/kubernetes-model-1.0.63.jar:/Users/jamesrawlings/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.7.5/jackson-module-jaxb-annotations-2.7.5.jar:/Users/jamesrawlings/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/Users/jamesrawlings/.m2/repository/com/squareup/okhttp3/okhttp/3.4.1/okhttp-3.4.1.jar:/Users/jamesrawlings/.m2/repository/com/squareup/okio/okio/1.9.0/okio-1.9.0.jar:/Users/jamesrawlings/.m2/repository/com/squareup/okhttp3/logging-interceptor/3.4.1/logging-interceptor-3.4.1.jar:/Users/jamesrawlings/.m2/repository/com/squareup/okhttp3/okhttp-ws/3.4.1/okhttp-ws-3.4.1.jar:/Users/jamesrawlings/.m2/repository/org/slf4j/jul-to-slf4j/1.7.13/jul-to-slf4j-1.7.13.jar:/Users/jamesrawlings/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.7.5/jackson-dataformat-yaml-2.7.5.jar:/Users/jamesrawlings/.m2/repository/io/fabric8/zjsonpatch/0.2.3/zjsonpatch-0.2.3.jar:/Users/jamesrawlings/.m2/repository/com/github/mifmif/generex/1.0.1/generex-1.0.1.jar:/Users/jamesrawlings/.m2/repository/dk/brics/automaton/automaton/1.11-8/automaton-1.11-8.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-job/2.8/workflow-job-2.8.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/git/3.0.0/git-3.0.0.jar:/Users/jamesrawlings/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Users/jamesrawlings/.m2/repository/com/infradna/tool/bridge-method-annotation/1.14/bridge-method-annotation-1.14.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/credentials/2.1.4/credentials-2.1.4.jar:/Users/jamesrawlings/.m2/repository/org/antlr/antlr4-runtime/4.5/antlr4-runtime-4.5.jar:/Users/jamesrawlings/.m2/repository/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/ssh-credentials/1.12/ssh-credentials-1.12.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/scm-api/1.2/scm-api-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/matrix-project/1.7.1/matrix-project-1.7.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/junit/1.2/junit-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/mailer/1.17/mailer-1.17.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/git-client/2.0.0/git-client-2.0.0.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jgit/org.eclipse.jgit/4.4.1.201607150455-r/org.eclipse.jgit-4.4.1.201607150455-r.jar:/Users/jamesrawlings/.m2/repository/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar:/Users/jamesrawlings/.m2/repository/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jgit/org.eclipse.jgit.http.server/4.4.1.201607150455-r/org.eclipse.jgit.http.server-4.4.1.201607150455-r.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-api/2.5/workflow-api-2.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/pipeline-stage-view/pipeline-rest-api/2.1/pipeline-rest-api-2.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/pipeline-graph-analysis/1.1/pipeline-graph-analysis-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/pipeline-stage-step/2.2/pipeline-stage-step-2.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/pipeline-input-step/2.0/pipeline-input-step-2.0.jar:/Users/jamesrawlings/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.4.0/jackson-annotations-2.4.0.jar:/Users/jamesrawlings/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.4.0/jackson-core-2.4.0.jar:/Users/jamesrawlings/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.4.0/jackson-databind-2.4.0.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-cps/2.21/workflow-cps-2.21.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/script-security/1.24/script-security-1.24.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/groovy-sandbox/1.10/groovy-sandbox-1.10.jar:/Users/jamesrawlings/.m2/repository/com/cloudbees/groovy-cps/1.10/groovy-cps-1.10.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/ui/jquery-detached/1.2.1/jquery-detached-1.2.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/ui/ace-editor/1.0.1/ace-editor-1.0.1.jar:/Users/jamesrawlings/.m2/repository/com/cloudbees/diff4j/1.2/diff4j-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-step-api/2.4/workflow-step-api-2.4.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-durable-task-step/2.5/workflow-durable-task-step-2.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/durable-task/1.12/durable-task-1.12.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-cps-global-lib/2.4/workflow-cps-global-lib-2.4.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/git-server/1.5/git-server-1.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/cloudbees-folder/5.12/cloudbees-folder-5.12.jar:/Users/jamesrawlings/.m2/repository/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-basic-steps/2.2/workflow-basic-steps-2.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-scm-step/2.2/workflow-scm-step-2.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-support/2.10/workflow-support-2.10.jar:/Users/jamesrawlings/.m2/repository/org/jboss/marshalling/jboss-marshalling-river/1.4.9.Final/jboss-marshalling-river-1.4.9.Final.jar:/Users/jamesrawlings/.m2/repository/org/jboss/marshalling/jboss-marshalling/1.4.9.Final/jboss-marshalling-1.4.9.Final.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/structs/1.5/structs-1.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/symbol-annotation/1.5/symbol-annotation-1.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/pipeline-stage-view/pipeline-stage-view/2.1/pipeline-stage-view-2.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/ui/handlebars/1.1/handlebars-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/ui/momentjs/1.1/momentjs-1.1.jar:/Users/jamesrawlings/.m2/repository/com/openshift/jenkins/openshift-pipeline/1.0.28/openshift-pipeline-1.0.28.jar:/Users/jamesrawlings/.m2/repository/org/jboss/jboss-dmr/1.3.0.Final/jboss-dmr-1.3.0.Final.jar:/Users/jamesrawlings/.m2/repository/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar:/Users/jamesrawlings/.m2/repository/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar:/Users/jamesrawlings/.m2/repository/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar:/Users/jamesrawlings/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/Users/jamesrawlings/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/oic-auth/1.0/oic-auth-1.0.jar:/Users/jamesrawlings/.m2/repository/com/google/oauth-client/google-oauth-client/1.21.0/google-oauth-client-1.21.0.jar:/Users/jamesrawlings/.m2/repository/com/google/http-client/google-http-client/1.21.0/google-http-client-1.21.0.jar:/Users/jamesrawlings/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/jamesrawlings/.m2/repository/com/google/http-client/google-http-client-jackson2/1.21.0/google-http-client-jackson2-1.21.0.jar:/Users/jamesrawlings/.m2/repository/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.jar:/Users/jamesrawlings/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/Users/jamesrawlings/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar:/Users/jamesrawlings/.m2/repository/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/jenkins-core/1.651.2/jenkins-core-1.651.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/plugins/icon-shim/icon-set/1.0.5/icon-set-1.0.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/remoting/2.57/remoting-2.57.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/constant-pool-scanner/1.2/constant-pool-scanner-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/cli/1.651.2/cli-1.651.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/version-number/1.1/version-number-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/crypto-util/1.1/crypto-util-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/hudson/jtidy/4aug2000r7-dev-hudson-1/jtidy-4aug2000r7-dev-hudson-1.jar:/Users/jamesrawlings/.m2/repository/com/google/inject/guice/4.0-beta/guice-4.0-beta.jar:/Users/jamesrawlings/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/Users/jamesrawlings/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/jamesrawlings/.m2/repository/org/jruby/ext/posix/jna-posix/1.0.3-jenkins-1/jna-posix-1.0.3-jenkins-1.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jnr-posix/3.0.1/jnr-posix-3.0.1.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jnr-ffi/1.0.7/jnr-ffi-1.0.7.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jffi/1.2.7/jffi-1.2.7.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jffi/1.2.7/jffi-1.2.7-native.jar:/Users/jamesrawlings/.m2/repository/org/ow2/asm/asm/4.0/asm-4.0.jar:/Users/jamesrawlings/.m2/repository/org/ow2/asm/asm-commons/4.0/asm-commons-4.0.jar:/Users/jamesrawlings/.m2/repository/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.jar:/Users/jamesrawlings/.m2/repository/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.jar:/Users/jamesrawlings/.m2/repository/org/ow2/asm/asm-util/4.0/asm-util-4.0.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/Users/jamesrawlings/.m2/repository/com/github/jnr/jnr-constants/0.8.5/jnr-constants-0.8.5.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/trilead-putty-extension/1.2/trilead-putty-extension-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/trilead-ssh2/build217-jenkins-8/trilead-ssh2-build217-jenkins-8.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-groovy/1.239/stapler-groovy-1.239.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-jelly/1.239/stapler-jelly-1.239.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/commons-jelly/1.1-jenkins-20120928/commons-jelly-1.1-jenkins-20120928.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/dom4j/dom4j/1.6.1-jenkins-4/dom4j-1.6.1-jenkins-4.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-jrebel/1.239/stapler-jrebel-1.239.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler/1.239/stapler-1.239.jar:/Users/jamesrawlings/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/Users/jamesrawlings/.m2/repository/commons-discovery/commons-discovery/0.4/commons-discovery-0.4.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/tiger-types/1.3/tiger-types-1.3.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/windows-package-checker/1.0/windows-package-checker-1.0.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-adjunct-zeroclipboard/1.3.5-1/stapler-adjunct-zeroclipboard-1.3.5-1.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-adjunct-timeline/1.4/stapler-adjunct-timeline-1.4.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/stapler-adjunct-codemirror/1.3/stapler-adjunct-codemirror-1.3.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/stapler/json-lib/2.4-jenkins-2/json-lib-2.4-jenkins-2.jar:/Users/jamesrawlings/.m2/repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar:/Users/jamesrawlings/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/jamesrawlings/.m2/repository/args4j/args4j/2.0.31/args4j-2.0.31.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/annotation-indexer/1.7/annotation-indexer-1.7.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/bytecode-compatibility-transformer/1.8/bytecode-compatibility-transformer-1.8.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/asm5/5.0.1/asm5-5.0.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/task-reactor/1.4/task-reactor-1.4.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/localizer/localizer/1.23/localizer-1.23.jar:/Users/jamesrawlings/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/hudson/xstream/1.4.7-jenkins-1/xstream-1.4.7-jenkins-1.jar:/Users/jamesrawlings/.m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar:/Users/jamesrawlings/.m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar:/Users/jamesrawlings/.m2/repository/org/apache/ant/ant/1.8.4/ant-1.8.4.jar:/Users/jamesrawlings/.m2/repository/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.jar:/Users/jamesrawlings/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/jamesrawlings/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/jamesrawlings/.m2/repository/commons-digester/commons-digester/2.1/commons-digester-2.1.jar:/Users/jamesrawlings/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar:/Users/jamesrawlings/.m2/repository/org/apache/commons/commons-compress/1.10/commons-compress-1.10.jar:/Users/jamesrawlings/.m2/repository/javax/mail/mail/1.4.4/mail-1.4.4.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/hudson/activation/1.1.1-hudson-1/activation-1.1.1-hudson-1.jar:/Users/jamesrawlings/.m2/repository/jaxen/jaxen/1.1-beta-11/jaxen-1.1-beta-11.jar:/Users/jamesrawlings/.m2/repository/commons-jelly/commons-jelly-tags-fmt/1.0/commons-jelly-tags-fmt-1.0.jar:/Users/jamesrawlings/.m2/repository/commons-jelly/commons-jelly-tags-xml/1.1/commons-jelly-tags-xml-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/hudson/commons-jelly-tags-define/1.0.1-hudson-20071021/commons-jelly-tags-define-1.0.1-hudson-20071021.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/commons-jexl/1.1-jenkins-20111212/commons-jexl-1.1-jenkins-20111212.jar:/Users/jamesrawlings/.m2/repository/org/acegisecurity/acegi-security/1.0.7/acegi-security-1.0.7.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-jdbc/1.2.9/spring-jdbc-1.2.9.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-dao/1.2.9/spring-dao-1.2.9.jar:/Users/jamesrawlings/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar:/Users/jamesrawlings/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/groovy/groovy-all/1.8.9/groovy-all-1.8.9.jar:/Users/jamesrawlings/.m2/repository/jline/jline/1.0/jline-1.0.jar:/Users/jamesrawlings/.m2/repository/org/fusesource/jansi/jansi/1.9/jansi-1.9.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-webmvc/2.5.6.SEC03/spring-webmvc-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-beans/2.5.6.SEC03/spring-beans-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-context/2.5.6.SEC03/spring-context-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-context-support/2.5.6.SEC03/spring-context-support-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-web/2.5.6.SEC03/spring-web-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-core/2.5.6.SEC03/spring-core-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/org/springframework/spring-aop/2.5.6.SEC03/spring-aop-2.5.6.SEC03.jar:/Users/jamesrawlings/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar:/Users/jamesrawlings/.m2/repository/javax/servlet/jstl/1.1.0/jstl-1.1.0.jar:/Users/jamesrawlings/.m2/repository/com/sun/xml/txw2/txw2/20110809/txw2-20110809.jar:/Users/jamesrawlings/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/jamesrawlings/.m2/repository/relaxngDatatype/relaxngDatatype/20020414/relaxngDatatype-20020414.jar:/Users/jamesrawlings/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/winp/winp/1.22/winp-1.22.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/memory-monitor/1.9/memory-monitor-1.9.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/woodstox/wstx-asl/3.2.9/wstx-asl-3.2.9.jar:/Users/jamesrawlings/.m2/repository/stax/stax-api/1.0.1/stax-api-1.0.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/jmdns/3.4.0-jenkins-3/jmdns-3.4.0-jenkins-3.jar:/Users/jamesrawlings/.m2/repository/net/java/dev/jna/jna/4.2.1/jna-4.2.1.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/akuma/1.10/akuma-1.10.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/libpam4j/1.8/libpam4j-1.8.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/libzfs/libzfs/0.5/libzfs-0.5.jar:/Users/jamesrawlings/.m2/repository/com/sun/solaris/embedded_su4j/1.1/embedded_su4j-1.1.jar:/Users/jamesrawlings/.m2/repository/net/java/sezpoz/sezpoz/1.9/sezpoz-1.9.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/jinterop/j-interop/2.0.6-kohsuke-1/j-interop-2.0.6-kohsuke-1.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/jinterop/j-interopdeps/2.0.6-kohsuke-1/j-interopdeps-2.0.6-kohsuke-1.jar:/Users/jamesrawlings/.m2/repository/org/samba/jcifs/jcifs/1.2.19/jcifs-1.2.19.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/robust-http-client/robust-http-client/1.2/robust-http-client-1.2.jar:/Users/jamesrawlings/.m2/repository/org/kohsuke/access-modifier-annotation/1.4/access-modifier-annotation-1.4.jar:/Users/jamesrawlings/.m2/repository/commons-fileupload/commons-fileupload/1.3.1-jenkins-1/commons-fileupload-1.3.1-jenkins-1.jar:/Users/jamesrawlings/.m2/repository/org/mindrot/jbcrypt/0.3m/jbcrypt-0.3m.jar:/Users/jamesrawlings/.m2/repository/com/google/guava/guava/11.0.1/guava-11.0.1.jar:/Users/jamesrawlings/.m2/repository/com/jcraft/jzlib/1.1.3-kohsuke-1/jzlib-1.1.3-kohsuke-1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/jenkins-war/1.651.2/jenkins-war-1.651.2-war-for-test.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/instance-identity/1.5.1/instance-identity-1.5.1.jar:/Users/jamesrawlings/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.54/bcpkix-jdk15on-1.54.jar:/Users/jamesrawlings/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.54/bcprov-jdk15on-1.54.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/ssh-cli-auth/1.2/ssh-cli-auth-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/slave-installer/1.5/slave-installer-1.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/windows-slave-installer/1.5.1/windows-slave-installer-1.5.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/launchd-slave-installer/1.2/launchd-slave-installer-1.2.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/upstart-slave-installer/1.1/upstart-slave-installer-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/systemd-slave-installer/1.1/systemd-slave-installer-1.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/modules/sshd/1.6/sshd-1.6.jar:/Users/jamesrawlings/.m2/repository/org/apache/sshd/sshd-core/0.8.0/sshd-core-0.8.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/mina/mina-core/2.0.5/mina-core-2.0.5.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/jenkins-war/1.651.2/jenkins-war-1.651.2.war:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/main/jenkins-test-harness/2.1/jenkins-test-harness-2.1.jar:/Users/jamesrawlings/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/Users/jamesrawlings/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/jamesrawlings/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar:/Users/jamesrawlings/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/Users/jamesrawlings/.m2/repository/net/sourceforge/htmlunit/htmlunit/2.18/htmlunit-2.18.jar:/Users/jamesrawlings/.m2/repository/xalan/xalan/2.7.2/xalan-2.7.2.jar:/Users/jamesrawlings/.m2/repository/xalan/serializer/2.7.2/serializer-2.7.2.jar:/Users/jamesrawlings/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/Users/jamesrawlings/.m2/repository/org/apache/httpcomponents/httpmime/4.5/httpmime-4.5.jar:/Users/jamesrawlings/.m2/repository/net/sourceforge/htmlunit/htmlunit-core-js/2.17/htmlunit-core-js-2.17.jar:/Users/jamesrawlings/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/Users/jamesrawlings/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/Users/jamesrawlings/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.22/nekohtml-1.9.22.jar:/Users/jamesrawlings/.m2/repository/net/sourceforge/cssparser/cssparser/0.9.16/cssparser-0.9.16.jar:/Users/jamesrawlings/.m2/repository/org/w3c/css/sac/1.3/sac-1.3.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.2.12.v20150709/websocket-client-9.2.12.v20150709.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jetty/jetty-util/9.2.12.v20150709/jetty-util-9.2.12.v20150709.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jetty/jetty-io/9.2.12.v20150709/jetty-io-9.2.12.v20150709.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.2.12.v20150709/websocket-common-9.2.12.v20150709.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.2.12.v20150709/websocket-api-9.2.12.v20150709.jar:/Users/jamesrawlings/.m2/repository/org/jvnet/hudson/embedded-rhino-debugger/1.2/embedded-rhino-debugger-1.2.jar:/Users/jamesrawlings/.m2/repository/org/netbeans/modules/org-netbeans-insane/RELEASE72/org-netbeans-insane-RELEASE72.jar:/Users/jamesrawlings/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/lib/lib-jenkins-maven-embedder/3.11/lib-jenkins-maven-embedder-3.11.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-core/3.1.0/maven-core-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-model/3.1.0/maven-model-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-settings/3.1.0/maven-settings-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-settings-builder/3.1.0/maven-settings-builder-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-repository-metadata/3.1.0/maven-repository-metadata-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-plugin-api/3.1.0/maven-plugin-api-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-model-builder/3.1.0/maven-model-builder-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.16/plexus-interpolation-1.16.jar:/Users/jamesrawlings/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-artifact/3.1.0/maven-artifact-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-compat/3.1.0/maven-compat-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-embedder/3.1.0/maven-embedder-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/sonatype/plexus/plexus-cipher/1.7/plexus-cipher-1.7.jar:/Users/jamesrawlings/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/maven-aether-provider/3.1.0/maven-aether-provider-3.1.0.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/aether/aether-connector-wagon/0.9.0.M2/aether-connector-wagon-0.9.0.M2.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/aether/aether-api/0.9.0.M2/aether-api-0.9.0.M2.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/aether/aether-impl/0.9.0.M2/aether-impl-0.9.0.M2.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/aether/aether-spi/0.9.0.M2/aether-spi-0.9.0.M2.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar:/Users/jamesrawlings/.m2/repository/org/apache/maven/wagon/wagon-provider-api/2.4/wagon-provider-api-2.4.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.plexus/0.1.0/org.eclipse.sisu.plexus-0.1.0.jar:/Users/jamesrawlings/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar:/Users/jamesrawlings/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar:/Users/jamesrawlings/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.1.0/org.eclipse.sisu.inject-0.1.0.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/plexus/plexus-classworlds/2.4/plexus-classworlds-2.4.jar:/Users/jamesrawlings/.m2/repository/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.jar:/Users/jamesrawlings/.m2/repository/org/jenkins-ci/test-annotations/1.2/test-annotations-1.2.jar:/Users/jamesrawlings/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/jamesrawlings/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/jamesrawlings/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar:/Users/jamesrawlings/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.7/log4j-over-slf4j-1.7.7.jar:/Users/jamesrawlings/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar:/Users/jamesrawlings/.m2/repository/org/slf4j/slf4j-jdk14/1.7.7/slf4j-jdk14-1.7.7.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 io.fabric8.jenkins.openshiftsync.PipeineJobListenerTest

io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://192.168.64.151:8443/oapi/v1/namespaces/online-tenant/buildconfigs. Message: Forbidden! User system:admin/192-168-64-151:8443 doesn't have permission..

    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:315)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:266)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:237)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:230)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:208)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:615)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:275)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation$1.apply(BaseOperation.java:292)
    at io.fabric8.openshift.api.model.DoneableBuildConfig.done(DoneableBuildConfig.java:27)
    at io.fabric8.jenkins.openshiftsync.PipeineJobListenerTest.testCreateBuildConfig(PipeineJobListenerTest.java:30)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

Process finished with exit code 255
rawlingsj commented 7 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.

stale[bot] commented 5 years ago

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!