use of com.openshift.restclient.model.build.IBuildConfigBuilder in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromImageJob method addToGeneratedResources.
@Override
protected void addToGeneratedResources(Map<String, IResource> resources, final Connection connection, final String name, final IProject project) {
IBuildConfigBuilder builder = connection.getResourceBuilder(IBuildConfigBuilder.class);
IBuildConfig bc = builder.named(name).inNamespace(project.getName()).fromGitSource().fromGitUrl(buildConfigModel.getGitRepositoryUrl()).usingGitReference(buildConfigModel.getGitReference()).inContextDir(buildConfigModel.getContextDir()).end().usingSourceStrategy().fromImageStreamTag(buildConfigModel.getBuilderImageName()).inNamespace(buildConfigModel.getBuilderImageNamespace()).withEnvVars(createEnvVars()).end().buildOnSourceChange(buildConfigModel.isConfigWebHook()).buildOnConfigChange(buildConfigModel.isConfigChangeTrigger()).buildOnImageChange(buildConfigModel.isImageChangeTrigger()).toImageStreamTag(new DockerImageURI(name).getNameAndTag()).build();
resources.put(ResourceKind.BUILD_CONFIG, bc);
}
Aggregations