Minimal support for 'registry-image' resource type

See: https://github.com/spring-projects/sts4/issues/380
This commit is contained in:
Kris De Volder
2019-10-17 11:29:36 -07:00
parent 5ad69b076d
commit 9a82eafbc5
2 changed files with 28 additions and 3 deletions

View File

@@ -76,6 +76,7 @@ public class PipelineYmlSchema implements YamlSchema {
hint("semver", "The 'semver' resource can set or bump version numbers."),
hint("github-release", "The 'github-release' resource can fetch and publish versioned GitHub resources."),
hint("docker-image", "The 'docker-image' resource can fetch, build, and push Docker images."),
hint("registry-image", "Supports checking, fetching, and pushing of images to Docker registries."),
hint("tracker", "The 'tracker' resource can deliver stories and bugs on Pivotal Tracker."),
hint("pool", "The 'pool' resource allows you to configure how to serialize use of an external system. "
+ "This lets you prevent test interference or overwork on shared systems."),

View File

@@ -72,7 +72,7 @@ public class ConcourseEditorTest {
@Before public void setup() throws Exception {
serverInitializer.setMaxCompletions(100);
}
@Test public void addSingleRequiredPropertiesQuickfix() throws Exception {
Editor editor = harness.newEditor(
"resources:\n" +
@@ -777,7 +777,9 @@ public class ConcourseEditorTest {
public void valueCompletions() throws Exception {
String [] builtInResourceTypes = {
"git", "hg", "time", "s3", "archive",
"semver", "github-release", "docker-image", "tracker",
"semver", "github-release",
"docker-image", "registry-image",
"tracker",
"pool", "cf",
"bosh-io-release", "bosh-io-stemcell", "bosh-deployment",
"vagrant-cloud"
@@ -1905,6 +1907,28 @@ public class ConcourseEditorTest {
"repo^ # <- bad|should define 'branch'"
);
}
@Test public void repositoryImageResourceIsKnown() throws Exception {
Editor editor;
editor = harness.newEditor(
"jobs:\n" +
"- name: noise-maker\n" +
" plan:\n" +
" - task: make-noise\n" +
" config:\n" +
" platform: linux\n" +
" image_resource:\n" +
" type: registry-image\n" +
" source:\n" +
" repository: ubuntu:18.04\n" +
" run:\n" +
" path: echo\n" +
" args:\n" +
" - \"Hello world!\""
);
editor.assertProblems(/*None*/);
}
@Test public void dockerImageResourceSourceReconcileAndHovers() throws Exception {
Editor editor;
@@ -3265,7 +3289,7 @@ public class ConcourseEditorTest {
//built-in:
"git", "hg", "time", "s3",
"archive", "semver", "github-release",
"docker-image", "tracker", "pool", "cf", "bosh-io-release",
"docker-image", "registry-image", "tracker", "pool", "cf", "bosh-io-release",
"bosh-io-stemcell", "bosh-deployment", "vagrant-cloud"
};
Arrays.sort(goodNames);