public void setupCredentials(AbstractBuild build) throws IOException, InterruptedException { this.dockerEnv = dockerHost.newKeyMaterialFactory(build) .plus( registryEndpoint.newKeyMaterialFactory(build)) .materialize(); }
/** * Create a {@link KeyMaterialFactory} for connecting to the docker server/host. */ public KeyMaterialFactory newKeyMaterialFactory(FilePath dir, @Nullable DockerServerCredentials credentials) throws IOException, InterruptedException { return (uri == null ? KeyMaterialFactory.NULL : new ServerHostKeyMaterialFactory(uri)) .plus(AuthenticationTokens.convert(KeyMaterialFactory.class, credentials)) .contextualize(new KeyMaterialContext(dir)); }
/** * Create a {@link KeyMaterialFactory} for connecting to the docker server/host. */ public KeyMaterialFactory newKeyMaterialFactory(FilePath dir, @Nullable DockerServerCredentials credentials) throws IOException, InterruptedException { return (uri == null ? KeyMaterialFactory.NULL : new ServerHostKeyMaterialFactory(uri)) .plus(AuthenticationTokens.convert(KeyMaterialFactory.class, credentials)) .contextualize(new KeyMaterialContext(dir)); }