mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
Start HTTP server to replace Devfile Registry server in the tests (#7154)
This commit is contained in:
@@ -104,7 +104,7 @@ var _ = Describe("doc command reference odo init", Label(helper.LabelNoCluster),
|
||||
Context("Non Interactive Mode", func() {
|
||||
|
||||
It("Fetch Devfile of a specific version", func() {
|
||||
args := []string{"init", "--devfile", "go", "--name", "my-go-app", "--devfile-version", "2.0.0"}
|
||||
args := []string{"init", "--devfile", "go", "--name", "my-go-app", "--devfile-version", "2.2.0"}
|
||||
out := helper.Cmd("odo", args...).ShouldPass().Out()
|
||||
got := fmt.Sprintf(outputStringFormat, strings.Join(args, " "), helper.StripSpinner(out))
|
||||
got = helper.StripGitCommitFromVersion(got)
|
||||
@@ -126,10 +126,11 @@ var _ = Describe("doc command reference odo init", Label(helper.LabelNoCluster),
|
||||
})
|
||||
|
||||
It("Fetch Devfile from a URL", func() {
|
||||
args := []string{"init", "--devfile-path", "https://registry.devfile.io/devfiles/nodejs-angular", "--name", "my-nodejs-app", "--starter", "nodejs-angular-starter"}
|
||||
args := []string{"init", "--devfile-path", fmt.Sprintf("%s/devfiles/nodejs-angular", commonVar.GetDevfileRegistryURL()), "--name", "my-nodejs-app", "--starter", "nodejs-angular-starter"}
|
||||
out := helper.Cmd("odo", args...).ShouldPass().Out()
|
||||
got := fmt.Sprintf(outputStringFormat, strings.Join(args, " "), helper.StripSpinner(out))
|
||||
got = helper.StripGitCommitFromVersion(got)
|
||||
got = helper.ReplaceRegistryUrl(commonVar, got)
|
||||
file := "devfile_from_url_output.mdx"
|
||||
want := helper.GetMDXContent(filepath.Join(commonPath, file))
|
||||
diff := cmp.Diff(want, got)
|
||||
@@ -139,21 +140,19 @@ var _ = Describe("doc command reference odo init", Label(helper.LabelNoCluster),
|
||||
Context("fetching devfile from a registry", func() {
|
||||
When("setting up the registry", func() {
|
||||
const (
|
||||
defaultReg = "DefaultDevfileRegistry"
|
||||
defaultRegURL = "https://registry.devfile.io"
|
||||
stagingReg = "StagingRegistry"
|
||||
stagingRegURL = "https://registry.stage.devfile.io"
|
||||
defaultReg = "DefaultDevfileRegistry"
|
||||
stagingReg = "StagingRegistry"
|
||||
)
|
||||
BeforeEach(func() {
|
||||
helper.Cmd("odo", "preference", "remove", "registry", defaultReg, "-f").ShouldPass()
|
||||
helper.Cmd("odo", "preference", "add", "registry", defaultReg, defaultRegURL).ShouldPass()
|
||||
|
||||
helper.Cmd("odo", "preference", "add", "registry", stagingReg, stagingRegURL).ShouldPass()
|
||||
devfileRegistryURL := commonVar.GetDevfileRegistryURL()
|
||||
helper.Cmd("odo", "preference", "add", "registry", defaultReg, devfileRegistryURL).ShouldPass()
|
||||
helper.Cmd("odo", "preference", "add", "registry", stagingReg, devfileRegistryURL).ShouldPass()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
helper.Cmd("odo", "preference", "remove", "registry", stagingReg, "-f").ShouldPass()
|
||||
helper.SetDefaultDevfileRegistryAsStaging()
|
||||
helper.SetDefaultDevfileRegistry(&commonVar)
|
||||
})
|
||||
|
||||
removePreferenceKeys := func(docString string) string {
|
||||
@@ -165,10 +164,26 @@ var _ = Describe("doc command reference odo init", Label(helper.LabelNoCluster),
|
||||
got := helper.StripAnsi(out)
|
||||
got = removePreferenceKeys(got)
|
||||
got = fmt.Sprintf(outputStringFormat, strings.Join(args, " "), helper.StripSpinner(got))
|
||||
got = helper.ReplaceRegistryUrl(commonVar, got)
|
||||
file := "registry_output.mdx"
|
||||
want := helper.GetMDXContent(filepath.Join(commonPath, file))
|
||||
diff := cmp.Diff(want, got)
|
||||
Expect(diff).To(BeEmpty(), file)
|
||||
want = helper.ReplaceRegistryUrl(commonVar, want)
|
||||
wantLines, err := helper.ExtractLines(want)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
gotLines, err := helper.ExtractLines(got)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
Expect(gotLines).ShouldNot(BeEmpty())
|
||||
Expect(gotLines).Should(HaveLen(len(wantLines)),
|
||||
fmt.Sprintf("%s: unexpected number of lines:\n==want:\n%s\n\n==got:\n%s", file, want, got))
|
||||
for i, line := range wantLines {
|
||||
if strings.Contains(line, "SECURE") {
|
||||
continue
|
||||
}
|
||||
wantFields := strings.Fields(line)
|
||||
gotFields := strings.Fields(gotLines[i])
|
||||
Expect(gotFields).Should(HaveExactElements(wantFields),
|
||||
fmt.Sprintf("%s: mismatch at line %d:\n==want line:\n%s\n\n==got line:\n%s", file, i, line, gotLines[i]))
|
||||
}
|
||||
}
|
||||
|
||||
It("Fetch Devfile from a specific registry of the list", func() {
|
||||
@@ -219,10 +234,11 @@ var _ = Describe("doc command reference odo init", Label(helper.LabelNoCluster),
|
||||
})
|
||||
|
||||
It("Fetch Devfile from a URL", func() {
|
||||
args := []string{"init", "--devfile-path", "https://registry.devfile.io/devfiles/nodejs-angular", "--name", "my-nodejs-app", "--starter", "nodejs-angular-starter"}
|
||||
args := []string{"init", "--devfile-path", fmt.Sprintf("%s/devfiles/nodejs-angular", commonVar.GetDevfileRegistryURL()), "--name", "my-nodejs-app", "--starter", "nodejs-angular-starter"}
|
||||
out := helper.Cmd("odo", args...).ShouldPass().Out()
|
||||
got := fmt.Sprintf(outputStringFormat, strings.Join(args, " "), helper.StripSpinner(out))
|
||||
got = helper.StripGitCommitFromVersion(got)
|
||||
got = helper.ReplaceRegistryUrl(commonVar, got)
|
||||
file := "devfile_from_url_output.mdx"
|
||||
want := helper.GetMDXContent(filepath.Join(commonPath, file))
|
||||
diff := cmp.Diff(want, got)
|
||||
|
||||
@@ -154,3 +154,8 @@ func ReplaceAllForwardedPorts(docString string, cmdEndpointsMap map[string]strin
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ReplaceRegistryUrl replaces the registry URL used for testing by a more static one
|
||||
func ReplaceRegistryUrl(commonVar CommonVar, docString string) string {
|
||||
return strings.ReplaceAll(docString, commonVar.GetDevfileRegistryURL(), "https://registry.stage.devfile.io")
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
envcontext "github.com/redhat-developer/odo/pkg/config/context"
|
||||
"github.com/redhat-developer/odo/pkg/preference"
|
||||
"github.com/redhat-developer/odo/pkg/segment"
|
||||
"github.com/redhat-developer/odo/tests/helper/registry_server"
|
||||
|
||||
dfutil "github.com/devfile/library/v2/pkg/util"
|
||||
|
||||
@@ -179,6 +180,8 @@ type CommonVar struct {
|
||||
// original values to get restored after the test is done
|
||||
OriginalWorkingDirectory string
|
||||
OriginalKubeconfig string
|
||||
registryServer RegistryServer
|
||||
registryUrl string
|
||||
// Ginkgo test realted
|
||||
testFileName string
|
||||
testCase string
|
||||
@@ -256,7 +259,7 @@ func CommonBeforeEach() CommonVar {
|
||||
// Use ephemeral volumes (emptyDir) in tests to make test faster
|
||||
err = cfg.SetConfiguration(preference.EphemeralSetting, "true")
|
||||
Expect(err).To(BeNil())
|
||||
SetDefaultDevfileRegistryAsStaging()
|
||||
SetDefaultDevfileRegistry(&commonVar)
|
||||
return commonVar
|
||||
}
|
||||
|
||||
@@ -299,6 +302,15 @@ func CommonAfterEach(commonVar CommonVar) {
|
||||
}
|
||||
}
|
||||
|
||||
if commonVar.registryServer != nil {
|
||||
err = commonVar.registryServer.Stop()
|
||||
if err != nil {
|
||||
fmt.Fprintf(GinkgoWriter, "[warn] failed to stop mock registry server at %q: %v\n", commonVar.registryServer.GetUrl(), err)
|
||||
}
|
||||
commonVar.registryServer = nil
|
||||
commonVar.registryUrl = ""
|
||||
}
|
||||
|
||||
if commonVar.Project != "" && commonVar.CliRunner.HasNamespaceProject(commonVar.Project) {
|
||||
// delete the random project/namespace created in CommonBeforeEach
|
||||
commonVar.CliRunner.DeleteNamespaceProject(commonVar.Project, false)
|
||||
@@ -394,20 +406,23 @@ type ResourceInfo struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func SetDefaultDevfileRegistryAsStaging() {
|
||||
func SetDefaultDevfileRegistry(commonVar *CommonVar) {
|
||||
commonVar.registryUrl = os.Getenv("DEVFILE_REGISTRY")
|
||||
if commonVar.registryUrl == "" {
|
||||
commonVar.registryServer = registry_server.NewMockRegistryServer()
|
||||
var err error
|
||||
commonVar.registryUrl, err = commonVar.registryServer.Start()
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
}
|
||||
fmt.Printf("Using Devfile Registry URL at: %q\n", commonVar.registryUrl)
|
||||
|
||||
const registryName string = "DefaultDevfileRegistry"
|
||||
Cmd("odo", "preference", "remove", "registry", registryName, "-f").ShouldPass()
|
||||
Cmd("odo", "preference", "add", "registry", registryName, GetDevfileRegistryURL()).ShouldPass()
|
||||
Cmd("odo", "preference", "add", "registry", registryName, commonVar.registryUrl).ShouldPass()
|
||||
}
|
||||
|
||||
func GetDevfileRegistryURL() string {
|
||||
registryURL := "https://registry.stage.devfile.io"
|
||||
customReg := os.Getenv("DEVFILE_REGISTRY")
|
||||
if customReg != "" {
|
||||
registryURL = customReg
|
||||
}
|
||||
fmt.Printf("Using Devfile Registry URL at: %q\n", registryURL)
|
||||
return registryURL
|
||||
func (c CommonVar) GetDevfileRegistryURL() string {
|
||||
return c.registryUrl
|
||||
}
|
||||
|
||||
func GetOdoVersion() (version string, gitCommit string) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
||||
@@ -26,7 +27,7 @@ func NewRegistry(url string) Registry {
|
||||
}
|
||||
|
||||
func (o Registry) GetIndex() ([]api.DevfileStack, error) {
|
||||
url, err := url.JoinPath(o.url, "v2index")
|
||||
url, err := url.JoinPath(strings.TrimSuffix(o.url, "/"), "/v2index")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -82,3 +83,10 @@ func GetVersions(registryName string, stackName string) []string {
|
||||
func HasAtLeastTwoVersions(registryName string, stackName string) bool {
|
||||
return len(GetVersions(registryName, stackName)) >= 2
|
||||
}
|
||||
|
||||
type RegistryServer interface {
|
||||
Start() (url string, err error)
|
||||
Stop() error
|
||||
IsStarted() bool
|
||||
GetUrl() string
|
||||
}
|
||||
|
||||
516
tests/helper/registry_server/mock_registry.go
Normal file
516
tests/helper/registry_server/mock_registry.go
Normal file
@@ -0,0 +1,516 @@
|
||||
package registry_server
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/opencontainers/image-spec/specs-go"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
_singleStackVersionName = "___SINGLE_VERSION__"
|
||||
)
|
||||
|
||||
// MockRegistryServer is an implementation of a Devfile Registry Server,
|
||||
// inspired by the own Devfile Registry tests at https://github.com/devfile/registry-support/blob/main/index/server/pkg/server/endpoint_test.go.
|
||||
type MockRegistryServer struct {
|
||||
started bool
|
||||
server *httptest.Server
|
||||
}
|
||||
|
||||
// DevfileStack is the main struct for devfile stack
|
||||
type DevfileStack struct {
|
||||
Name string `json:"name"`
|
||||
Versions []DevfileStackVersion `json:"versions,omitempty"`
|
||||
}
|
||||
|
||||
type DevfileStackVersion struct {
|
||||
Version string `json:"version,omitempty"`
|
||||
IsDefault bool `json:"default"`
|
||||
SchemaVersion string `json:"schemaVersion,omitempty"`
|
||||
StarterProjects []string `json:"starterProjects"`
|
||||
}
|
||||
|
||||
var manifests map[string]map[string]ocispec.Manifest
|
||||
|
||||
func init() {
|
||||
manifests = make(map[string]map[string]ocispec.Manifest)
|
||||
stackRoot := filepath.Join(getRegistryBasePath(), "stacks")
|
||||
_, err := os.Stat(stackRoot)
|
||||
if err != nil && errors.Is(err, fs.ErrNotExist) {
|
||||
log.Fatalf("file not found: %v - reason: %s. Did you run 'make generate-test-registry-build'?", stackRoot, err)
|
||||
}
|
||||
|
||||
listFilesInDir := func(p string, excludeIf func(f os.FileInfo) bool) (res []string, err error) {
|
||||
file, err := os.Open(p)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
files, err := file.Readdir(0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, f := range files {
|
||||
if excludeIf != nil && excludeIf(f) {
|
||||
continue
|
||||
}
|
||||
res = append(res, f.Name())
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
newManifest := func() ocispec.Manifest {
|
||||
return ocispec.Manifest{
|
||||
Versioned: specs.Versioned{SchemaVersion: 2},
|
||||
Config: ocispec.Descriptor{
|
||||
MediaType: "application/vnd.devfileio.devfile.config.v2+json",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
buildLayerForFile := func(fpath string) (layer ocispec.Descriptor, err error) {
|
||||
stat, err := os.Stat(fpath)
|
||||
if err != nil {
|
||||
return ocispec.Descriptor{}, err
|
||||
}
|
||||
|
||||
dgest, err := digestFile(fpath)
|
||||
if err != nil {
|
||||
return ocispec.Descriptor{}, err
|
||||
}
|
||||
layer.Digest = digest.Digest(dgest)
|
||||
|
||||
f := filepath.Base(filepath.Clean(fpath))
|
||||
if f == "devfile.yaml" {
|
||||
layer.MediaType = "application/vnd.devfileio.devfile.layer.v1"
|
||||
} else if strings.HasSuffix(f, ".tar") {
|
||||
layer.MediaType = "application/x-tar"
|
||||
}
|
||||
|
||||
layer.Size = stat.Size()
|
||||
layer.Annotations = map[string]string{
|
||||
"org.opencontainers.image.title": f,
|
||||
}
|
||||
return layer, nil
|
||||
}
|
||||
|
||||
excludeIfDirFn := func(f os.FileInfo) bool {
|
||||
return f.IsDir()
|
||||
}
|
||||
excludeIfNotDirFn := func(f os.FileInfo) bool {
|
||||
return !f.IsDir()
|
||||
}
|
||||
|
||||
dirsInStacksRoot, err := listFilesInDir(stackRoot, excludeIfNotDirFn)
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
for _, f := range dirsInStacksRoot {
|
||||
manifests[f] = make(map[string]ocispec.Manifest)
|
||||
versionList, err := listFilesInDir(filepath.Join(stackRoot, f), excludeIfNotDirFn)
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
if len(versionList) == 0 {
|
||||
// Possible stack with single unnamed version
|
||||
stackFiles, err := listFilesInDir(filepath.Join(stackRoot, f), excludeIfDirFn)
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
manifest := newManifest()
|
||||
for _, vf := range stackFiles {
|
||||
layer, err := buildLayerForFile(filepath.Join(stackRoot, f, vf))
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
manifest.Layers = append(manifest.Layers, layer)
|
||||
}
|
||||
manifests[f][_singleStackVersionName] = manifest
|
||||
continue
|
||||
}
|
||||
for _, v := range versionList {
|
||||
versionFiles, err := listFilesInDir(filepath.Join(stackRoot, f, v), excludeIfDirFn)
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
manifest := newManifest()
|
||||
for _, vf := range versionFiles {
|
||||
layer, err := buildLayerForFile(filepath.Join(stackRoot, f, v, vf))
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
manifest.Layers = append(manifest.Layers, layer)
|
||||
}
|
||||
manifests[f][v] = manifest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func NewMockRegistryServer() *MockRegistryServer {
|
||||
r := mux.NewRouter()
|
||||
m := MockRegistryServer{
|
||||
server: httptest.NewUnstartedServer(handlers.LoggingHandler(GinkgoWriter, r)),
|
||||
}
|
||||
|
||||
m.setupRoutes(r)
|
||||
return &m
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) Start() (url string, err error) {
|
||||
m.server.Start()
|
||||
m.started = true
|
||||
fmt.Fprintln(GinkgoWriter, "Mock Devfile Registry server started and available at", m.server.URL)
|
||||
return m.server.URL, nil
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) Stop() error {
|
||||
m.server.Close()
|
||||
m.started = false
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) GetUrl() string {
|
||||
return m.server.URL
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) IsStarted() bool {
|
||||
return m.started
|
||||
}
|
||||
|
||||
func notFoundManifest(res http.ResponseWriter, req *http.Request, tag string) {
|
||||
var data string
|
||||
if req.Method == http.MethodGet {
|
||||
data = fmt.Sprintf(`
|
||||
{
|
||||
"code": "MANIFEST_UNKNOWN",
|
||||
"message": "manifest unknown",
|
||||
"detail": {
|
||||
"tag": %s
|
||||
}
|
||||
}
|
||||
`, tag)
|
||||
}
|
||||
res.WriteHeader(http.StatusNotFound)
|
||||
_, err := res.Write([]byte(data))
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
// notFound custom handler for anything not found
|
||||
func notFound(res http.ResponseWriter, req *http.Request, data string) {
|
||||
res.WriteHeader(http.StatusNotFound)
|
||||
_, err := res.Write([]byte(data))
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func internalServerError(res http.ResponseWriter, req *http.Request, data string) {
|
||||
res.WriteHeader(http.StatusInternalServerError)
|
||||
_, err := res.Write([]byte(fmt.Sprintf(`{"detail": %q}`, data)))
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
// setupRoutes setups the routing, based on the OpenAPI Schema defined at:
|
||||
// https://github.com/devfile/registry-support/blob/main/index/server/openapi.yaml
|
||||
func (m *MockRegistryServer) setupRoutes(r *mux.Router) {
|
||||
r.HandleFunc("/v2index", serveV2Index).Methods(http.MethodGet)
|
||||
r.HandleFunc("/v2/devfile-catalog/{stack}/manifests/{ref}", serveManifests).Methods(http.MethodGet, http.MethodHead)
|
||||
r.HandleFunc("/v2/devfile-catalog/{stack}/blobs/{digest}", serveBlobs).Methods(http.MethodGet)
|
||||
r.HandleFunc("/devfiles/{stack}", m.serveDevfileDefaultVersion).Methods(http.MethodGet)
|
||||
r.HandleFunc("/devfiles/{stack}/{version}", m.serveDevfileAtVersion).Methods(http.MethodGet)
|
||||
}
|
||||
|
||||
func getRegistryBasePath() string {
|
||||
_, filename, _, _ := runtime.Caller(1)
|
||||
return filepath.Join(path.Dir(filename), "testdata", "registry-build")
|
||||
}
|
||||
|
||||
func serveV2Index(res http.ResponseWriter, req *http.Request) {
|
||||
index := filepath.Join(getRegistryBasePath(), "index.json")
|
||||
d, err := os.ReadFile(index)
|
||||
if err != nil {
|
||||
internalServerError(res, req, err.Error())
|
||||
return
|
||||
}
|
||||
_, err = res.Write(d)
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func serveManifests(res http.ResponseWriter, req *http.Request) {
|
||||
vars := mux.Vars(req)
|
||||
stack := vars["stack"]
|
||||
ref := vars["ref"]
|
||||
var (
|
||||
stackManifest ocispec.Manifest
|
||||
found bool
|
||||
bytes []byte
|
||||
err error
|
||||
)
|
||||
|
||||
if strings.HasPrefix(ref, "sha256:") {
|
||||
var stackManifests map[string]ocispec.Manifest
|
||||
stackManifests, found = manifests[stack]
|
||||
if !found {
|
||||
notFoundManifest(res, req, ref)
|
||||
return
|
||||
}
|
||||
found = false
|
||||
var dgst string
|
||||
for _, manifest := range stackManifests {
|
||||
dgst, err = digestEntity(manifest)
|
||||
if err != nil {
|
||||
internalServerError(res, req, "")
|
||||
return
|
||||
}
|
||||
if reflect.DeepEqual(ref, dgst) {
|
||||
stackManifest = manifest
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
notFoundManifest(res, req, ref)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
stackManifest, found = manifests[stack][ref]
|
||||
if !found {
|
||||
// Possible single unnamed version
|
||||
stackManifest, found = manifests[stack][_singleStackVersionName]
|
||||
if !found {
|
||||
notFoundManifest(res, req, ref)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var j []byte
|
||||
if j, err = json.MarshalIndent(stackManifest, " ", " "); err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[debug] stackManifest:", stackManifest)
|
||||
} else {
|
||||
fmt.Fprintln(GinkgoWriter, "[debug] stackManifest:", string(j))
|
||||
}
|
||||
|
||||
if req.Method == http.MethodGet {
|
||||
bytes, err = json.Marshal(stackManifest)
|
||||
if err != nil {
|
||||
internalServerError(res, req, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
res.Header().Set("Content-Type", ocispec.MediaTypeImageManifest)
|
||||
res.WriteHeader(http.StatusOK)
|
||||
_, err = res.Write(bytes)
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func serveBlobs(res http.ResponseWriter, req *http.Request) {
|
||||
vars := mux.Vars(req)
|
||||
stack := vars["stack"]
|
||||
sDigest := vars["digest"]
|
||||
stackRoot := filepath.Join(getRegistryBasePath(), "stacks", stack)
|
||||
var (
|
||||
blobPath string
|
||||
found bool
|
||||
err error
|
||||
)
|
||||
|
||||
found = false
|
||||
err = filepath.WalkDir(stackRoot, func(path string, d fs.DirEntry, err error) error {
|
||||
var fdgst string
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if found || d.IsDir() {
|
||||
return nil
|
||||
}
|
||||
|
||||
fdgst, err = digestFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if reflect.DeepEqual(sDigest, fdgst) {
|
||||
blobPath = path
|
||||
found = true
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
if err != nil || !found {
|
||||
notFound(res, req, "")
|
||||
return
|
||||
}
|
||||
|
||||
file, err := os.Open(blobPath)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
defer file.Close()
|
||||
|
||||
bytes, err := io.ReadAll(file)
|
||||
Expect(err).ShouldNot(HaveOccurred())
|
||||
|
||||
res.WriteHeader(http.StatusOK)
|
||||
res.Header().Set("Content-Type", http.DetectContentType(bytes))
|
||||
_, err = res.Write(bytes)
|
||||
if err != nil {
|
||||
fmt.Fprintln(GinkgoWriter, "[warn] failed to write response; cause:", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) serveDevfileDefaultVersion(res http.ResponseWriter, req *http.Request) {
|
||||
vars := mux.Vars(req)
|
||||
stack := vars["stack"]
|
||||
|
||||
defaultVersion, internalErr, err := findStackDefaultVersion(stack)
|
||||
if err != nil {
|
||||
if internalErr {
|
||||
internalServerError(res, req, "")
|
||||
} else {
|
||||
notFound(res, req, "")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
http.Redirect(res, req, fmt.Sprintf("%s/devfiles/%s/%s", m.GetUrl(), stack, defaultVersion), http.StatusSeeOther)
|
||||
}
|
||||
|
||||
func findStackDefaultVersion(stack string) (string, bool, error) {
|
||||
index, err := parseIndex()
|
||||
if index == nil {
|
||||
return "", true, err
|
||||
}
|
||||
for _, d := range index {
|
||||
if d.Name != stack {
|
||||
continue
|
||||
}
|
||||
for _, v := range d.Versions {
|
||||
if v.IsDefault {
|
||||
return v.Version, false, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return "", false, fmt.Errorf("default version not found for %q", stack)
|
||||
}
|
||||
|
||||
func parseIndex() ([]DevfileStack, error) {
|
||||
// find the default version
|
||||
index := filepath.Join(getRegistryBasePath(), "index.json")
|
||||
d, err := os.ReadFile(index)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var objmap []DevfileStack
|
||||
err = json.Unmarshal(d, &objmap)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return objmap, nil
|
||||
}
|
||||
|
||||
func (m *MockRegistryServer) serveDevfileAtVersion(res http.ResponseWriter, req *http.Request) {
|
||||
vars := mux.Vars(req)
|
||||
stack := vars["stack"]
|
||||
version := vars["version"]
|
||||
|
||||
// find layer for this version and redirect to the blob download URL
|
||||
manifestByVersionMap, ok := manifests[stack]
|
||||
if !ok {
|
||||
notFound(res, req, "")
|
||||
return
|
||||
}
|
||||
manifest, ok := manifestByVersionMap[version]
|
||||
if ok {
|
||||
// find blob with devfile
|
||||
for _, layer := range manifest.Layers {
|
||||
if layer.Annotations["org.opencontainers.image.title"] == "devfile.yaml" {
|
||||
http.Redirect(res, req, fmt.Sprintf("%s/v2/devfile-catalog/%s/blobs/%s", m.GetUrl(), stack, layer.Digest), http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
}
|
||||
notFound(res, req, "devfile.yaml not found")
|
||||
return
|
||||
}
|
||||
|
||||
// find if devfile has a single version that matches the default version in index
|
||||
defaultVersion, internalErr, err := findStackDefaultVersion(stack)
|
||||
if err != nil {
|
||||
if internalErr {
|
||||
internalServerError(res, req, "")
|
||||
} else {
|
||||
notFound(res, req, "")
|
||||
}
|
||||
return
|
||||
}
|
||||
if defaultVersion != version {
|
||||
notFound(res, req, "default version for this stack is:"+defaultVersion)
|
||||
return
|
||||
}
|
||||
manifest, ok = manifestByVersionMap[defaultVersion]
|
||||
if ok {
|
||||
// find blob with devfile
|
||||
for _, layer := range manifest.Layers {
|
||||
if layer.Annotations["org.opencontainers.image.title"] == "devfile.yaml" {
|
||||
http.Redirect(res, req, fmt.Sprintf("%s/v2/devfile-catalog/%s/blobs/%s", m.GetUrl(), stack, layer.Digest), http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
}
|
||||
notFound(res, req, "devfile.yaml not found")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// digestEntity generates sha256 digest of any entity type
|
||||
func digestEntity(e interface{}) (string, error) {
|
||||
bytes, err := json.Marshal(e)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return digest.FromBytes(bytes).String(), nil
|
||||
}
|
||||
|
||||
// digestFile generates sha256 digest from file contents
|
||||
func digestFile(filepath string) (string, error) {
|
||||
file, err := os.Open(filepath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
dgst, err := digest.FromReader(file)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return dgst.String(), nil
|
||||
}
|
||||
20
tests/helper/registry_server/testdata/build-registry.sh
vendored
Normal file
20
tests/helper/registry_server/testdata/build-registry.sh
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Wrong number of arguments. Usage: ./build-registry.sh /path/to/registry/dir /path/to/empty/build/dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
registryDir=$1
|
||||
outputDir=$2
|
||||
|
||||
TEMPDIR=$(mktemp -d)
|
||||
(
|
||||
cd ${TEMPDIR} &&
|
||||
git clone -b deterministic_stack_tar_archives_in_build_script --depth 1 --single-branch https://github.com/rm3l/devfile-registry-support .
|
||||
)
|
||||
|
||||
bash "${TEMPDIR}"/build-tools/build.sh "$registryDir" "$outputDir"
|
||||
rm -rf "${TEMPDIR}"
|
||||
6
tests/helper/registry_server/testdata/registry-build/README.md
vendored
Normal file
6
tests/helper/registry_server/testdata/registry-build/README.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
This folder is used to generate and serve artifacts by a Devfile Registry started only for testing.
|
||||
|
||||
To update, simply copy the relevant files from an existing folder from an existing registry stacks folder (see https://github.com/devfile/registry/tree/main/stacks)
|
||||
to this folder.
|
||||
Then, and anytime a change is made to the source `registry/stacks` folder, you need to run 'make generate-test-registry-build'
|
||||
to regenerate the `registry-build` folder with the artifacts that will be served for the tests.
|
||||
737
tests/helper/registry_server/testdata/registry-build/index.json
vendored
Normal file
737
tests/helper/registry_server/testdata/registry-build/index.json
vendored
Normal file
@@ -0,0 +1,737 @@
|
||||
[
|
||||
{
|
||||
"name": "dotnet50",
|
||||
"displayName": ".NET 5.0",
|
||||
"description": ".NET 5.0 application",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
".NET",
|
||||
".NET 5.0"
|
||||
],
|
||||
"icon": "https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png",
|
||||
"projectType": "dotnet",
|
||||
"language": ".NET",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.0.3",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": ".NET 5.0 application",
|
||||
"tags": [
|
||||
".NET",
|
||||
".NET 5.0"
|
||||
],
|
||||
"icon": "https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png",
|
||||
"links": {
|
||||
"self": "devfile-catalog/dotnet50:1.0.3"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"dotnet50-example"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dotnet60",
|
||||
"displayName": ".NET 6.0",
|
||||
"description": ".NET 6.0 application",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
".NET",
|
||||
".NET 6.0"
|
||||
],
|
||||
"icon": "https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png",
|
||||
"projectType": "dotnet",
|
||||
"language": ".NET",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.0.2",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": ".NET 6.0 application",
|
||||
"tags": [
|
||||
".NET",
|
||||
".NET 6.0"
|
||||
],
|
||||
"icon": "https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png",
|
||||
"links": {
|
||||
"self": "devfile-catalog/dotnet60:1.0.2"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"dotnet60-example"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "go",
|
||||
"displayName": "Go Runtime",
|
||||
"description": "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Go",
|
||||
"Deprecated"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg",
|
||||
"projectType": "Go",
|
||||
"language": "Go",
|
||||
"provider": "Red Hat",
|
||||
"versions": [
|
||||
{
|
||||
"version": "2.2.0",
|
||||
"schemaVersion": "2.2.0",
|
||||
"description": "Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.",
|
||||
"tags": [
|
||||
"Go"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/go:2.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": true,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"archive.tar",
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"go-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.2.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.",
|
||||
"tags": [
|
||||
"Go"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/go:1.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"go-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.2",
|
||||
"schemaVersion": "2.1.0",
|
||||
"description": "Go (version 1.18.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.",
|
||||
"tags": [
|
||||
"Go",
|
||||
"Deprecated"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/go:1.0.2"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"go-starter"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "java-maven",
|
||||
"displayName": "Maven Java",
|
||||
"description": "Java application based on Maven and OpenJDK",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Maven"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg",
|
||||
"projectType": "Maven",
|
||||
"language": "Java",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Java application based on Maven 3.6 and OpenJDK 17",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Maven"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-maven:1.3.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"springbootproject"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.2.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"description": "Java application based on Maven 3.6 and OpenJDK 11",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Maven"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-maven:1.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"springbootproject"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "java-openliberty",
|
||||
"displayName": "Open Liberty Maven",
|
||||
"description": "Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Maven"
|
||||
],
|
||||
"architectures": [
|
||||
"amd64",
|
||||
"ppc64le",
|
||||
"s390x"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg",
|
||||
"projectType": "Open Liberty",
|
||||
"language": "Java",
|
||||
"versions": [
|
||||
{
|
||||
"version": "0.9.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Maven"
|
||||
],
|
||||
"architectures": [
|
||||
"amd64",
|
||||
"ppc64le",
|
||||
"s390x"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-openliberty:0.9.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": false,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": true
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"rest"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "java-springboot",
|
||||
"displayName": "Spring Boot",
|
||||
"description": "Spring Boot using Java",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Spring"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg",
|
||||
"projectType": "springboot",
|
||||
"language": "Java",
|
||||
"versions": [
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"schemaVersion": "2.2.0",
|
||||
"description": "Java application using Spring Boot® and OpenJDK 11",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Spring"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-springboot:2.1.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": true,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"archive.tar",
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"springbootproject"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Java application using Spring Boot® and OpenJDK 11",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Spring"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-springboot:1.3.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"springbootproject"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "java-vertx",
|
||||
"displayName": "Vert.x Java",
|
||||
"description": "Java application using Vert.x and OpenJDK 11",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Vert.x"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/vertx-web-site/vertx-logo/master/vertx-logo.svg",
|
||||
"projectType": "Vert.x",
|
||||
"language": "Java",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.2.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Java application using Vert.x and OpenJDK 11",
|
||||
"tags": [
|
||||
"Java",
|
||||
"Vert.x"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/vertx-web-site/vertx-logo/master/vertx-logo.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/java-vertx:1.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"vertx-http-example",
|
||||
"vertx-istio-circuit-breaker-booster",
|
||||
"vertx-istio-routing-booster",
|
||||
"vertx-secured-http-example-redhat",
|
||||
"vertx-crud-example-redhat",
|
||||
"vertx-istio-security-booster",
|
||||
"vertx-crud-example",
|
||||
"vertx-circuit-breaker-example",
|
||||
"vertx-configmap-example",
|
||||
"vertx-circuit-breaker-example-redhat",
|
||||
"vertx-cache-example-redhat",
|
||||
"vertx-cache-example",
|
||||
"vertx-secured-http-example",
|
||||
"vertx-health-checks-example-redhat",
|
||||
"vertx-http-example-redhat",
|
||||
"vertx-health-checks-example",
|
||||
"vertx-configmap-example-redhat",
|
||||
"vertx-messaging-work-queue-booster",
|
||||
"vertx-istio-distributed-tracing-booster"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "nodejs",
|
||||
"displayName": "Node.js Runtime",
|
||||
"description": "Node.js application",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Express",
|
||||
"ubi8"
|
||||
],
|
||||
"icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",
|
||||
"projectType": "Node.js",
|
||||
"language": "JavaScript",
|
||||
"versions": [
|
||||
{
|
||||
"version": "2.2.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"description": "Node.js 18 application",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Express",
|
||||
"ubi8"
|
||||
],
|
||||
"icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs:2.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": true
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.1.1",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Node.js 16 application",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Express",
|
||||
"ubi8"
|
||||
],
|
||||
"icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs:2.1.1"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": true
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-starter"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "nodejs-angular",
|
||||
"displayName": "Angular",
|
||||
"description": "Angular is a development platform, built on TypeScript. As a platform, Angular includes: A component-based framework for building scalable web applications A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more A suite of developer tools to help you develop, build, test, and update your code",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Angular"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg",
|
||||
"projectType": "Angular",
|
||||
"language": "TypeScript",
|
||||
"provider": "Red Hat",
|
||||
"versions": [
|
||||
{
|
||||
"version": "2.2.0",
|
||||
"schemaVersion": "2.2.0",
|
||||
"description": "Angular is a development platform, built on TypeScript. As a platform, Angular includes: A component-based framework for building scalable web applications A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more A suite of developer tools to help you develop, build, test, and update your code",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Angular"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs-angular:2.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-angular-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"description": "Angular is a development platform, built on TypeScript. As a platform, Angular includes: A component-based framework for building scalable web applications A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more A suite of developer tools to help you develop, build, test, and update your code",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Angular"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs-angular:2.1.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-angular-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.2",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Angular is a development platform, built on TypeScript. As a platform, Angular includes: A component-based framework for building scalable web applications A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more A suite of developer tools to help you develop, build, test, and update your code",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"Angular"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs-angular:2.0.2"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-angular-starter"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "nodejs-react",
|
||||
"displayName": "React",
|
||||
"description": "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta and a community of individual developers and companies.",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"React"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg",
|
||||
"projectType": "React",
|
||||
"language": "TypeScript",
|
||||
"provider": "Red Hat",
|
||||
"versions": [
|
||||
{
|
||||
"version": "2.2.0",
|
||||
"schemaVersion": "2.2.0",
|
||||
"description": "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta and a community of individual developers and companies.",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"React"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs-react:2.2.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-react-starter"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.2",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta and a community of individual developers and companies.",
|
||||
"tags": [
|
||||
"Node.js",
|
||||
"React"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/nodejs-react:2.0.2"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": false,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"nodejs-react-starter"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "python",
|
||||
"displayName": "Python",
|
||||
"description": "Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.",
|
||||
"type": "stack",
|
||||
"tags": [
|
||||
"Python",
|
||||
"Pip",
|
||||
"Flask"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg",
|
||||
"projectType": "Python",
|
||||
"language": "Python",
|
||||
"provider": "Red Hat",
|
||||
"versions": [
|
||||
{
|
||||
"version": "3.0.0",
|
||||
"schemaVersion": "2.2.0",
|
||||
"description": "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.",
|
||||
"tags": [
|
||||
"Python",
|
||||
"Pip",
|
||||
"Flask"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/python:3.0.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": true,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"archive.tar",
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"flask-example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.1.0",
|
||||
"schemaVersion": "2.1.0",
|
||||
"default": true,
|
||||
"description": "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.",
|
||||
"tags": [
|
||||
"Python",
|
||||
"Pip",
|
||||
"Flask"
|
||||
],
|
||||
"icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg",
|
||||
"links": {
|
||||
"self": "devfile-catalog/python:2.1.0"
|
||||
},
|
||||
"commandGroups": {
|
||||
"build": true,
|
||||
"debug": true,
|
||||
"deploy": false,
|
||||
"run": true,
|
||||
"test": false
|
||||
},
|
||||
"resources": [
|
||||
"devfile.yaml"
|
||||
],
|
||||
"starterProjects": [
|
||||
"flask-example"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
56
tests/helper/registry_server/testdata/registry-build/stacks/dotnet50/devfile.yaml
vendored
Normal file
56
tests/helper/registry_server/testdata/registry-build/stacks/dotnet50/devfile.yaml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: dotnet50
|
||||
displayName: .NET 5.0
|
||||
description: .NET 5.0 application
|
||||
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
|
||||
tags:
|
||||
- .NET
|
||||
- .NET 5.0
|
||||
projectType: dotnet
|
||||
language: .NET
|
||||
version: 1.0.3
|
||||
starterProjects:
|
||||
- name: dotnet50-example
|
||||
git:
|
||||
checkoutFrom:
|
||||
remote: origin
|
||||
revision: dotnet-5.0
|
||||
remotes:
|
||||
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
|
||||
subDir: app
|
||||
components:
|
||||
- name: dotnet
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/dotnet-50:5.0-39
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
mountSources: true
|
||||
env:
|
||||
- name: CONFIGURATION
|
||||
value: Debug
|
||||
- name: STARTUP_PROJECT
|
||||
value: app.csproj
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: Development
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://*:8080
|
||||
endpoints:
|
||||
- name: http-dotnet50
|
||||
targetPort: 8080
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: kill $(pidof dotnet); dotnet build -c $CONFIGURATION $STARTUP_PROJECT /p:UseSharedCompilation=false
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: dotnet run -c $CONFIGURATION --no-build --project $STARTUP_PROJECT --no-launch-profile
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
56
tests/helper/registry_server/testdata/registry-build/stacks/dotnet60/devfile.yaml
vendored
Normal file
56
tests/helper/registry_server/testdata/registry-build/stacks/dotnet60/devfile.yaml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: dotnet60
|
||||
displayName: .NET 6.0
|
||||
description: .NET 6.0 application
|
||||
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
|
||||
tags:
|
||||
- .NET
|
||||
- .NET 6.0
|
||||
projectType: dotnet
|
||||
language: .NET
|
||||
version: 1.0.2
|
||||
starterProjects:
|
||||
- name: dotnet60-example
|
||||
git:
|
||||
checkoutFrom:
|
||||
remote: origin
|
||||
revision: dotnet-6.0
|
||||
remotes:
|
||||
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
|
||||
subDir: app
|
||||
components:
|
||||
- name: dotnet
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/dotnet-60:6.0-43
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
mountSources: true
|
||||
env:
|
||||
- name: CONFIGURATION
|
||||
value: Debug
|
||||
- name: STARTUP_PROJECT
|
||||
value: app.csproj
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: Development
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://*:8080
|
||||
endpoints:
|
||||
- name: http-dotnet60
|
||||
targetPort: 8080
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: kill $(pidof dotnet); dotnet build -c $CONFIGURATION $STARTUP_PROJECT /p:UseSharedCompilation=false
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: dotnet run -c $CONFIGURATION --no-build --project $STARTUP_PROJECT --no-launch-profile
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
53
tests/helper/registry_server/testdata/registry-build/stacks/go/1.0.2/devfile.yaml
vendored
Normal file
53
tests/helper/registry_server/testdata/registry-build/stacks/go/1.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.18.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
- Deprecated
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 1.0.2
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.18.10-4
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
76
tests/helper/registry_server/testdata/registry-build/stacks/go/1.2.0/devfile.yaml
vendored
Normal file
76
tests/helper/registry_server/testdata/registry-build/stacks/go/1.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
|
||||
- exec:
|
||||
commandLine: |
|
||||
GOPATH=${PROJECT_SOURCE}/.go \
|
||||
GOCACHE=${PROJECT_SOURCE}/.cache \
|
||||
dlv \
|
||||
--listen=127.0.0.1:${DEBUG_PORT} \
|
||||
--only-same-user=false \
|
||||
--headless=true \
|
||||
--api-version=2 \
|
||||
--accept-multiclient \
|
||||
debug --continue main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: debug
|
||||
BIN
tests/helper/registry_server/testdata/registry-build/stacks/go/2.2.0/archive.tar
vendored
Normal file
BIN
tests/helper/registry_server/testdata/registry-build/stacks/go/2.2.0/archive.tar
vendored
Normal file
Binary file not shown.
103
tests/helper/registry_server/testdata/registry-build/stacks/go/2.2.0/devfile.yaml
vendored
Normal file
103
tests/helper/registry_server/testdata/registry-build/stacks/go/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- name: build
|
||||
image:
|
||||
imageName: go-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
|
||||
- exec:
|
||||
commandLine: |
|
||||
GOPATH=${PROJECT_SOURCE}/.go \
|
||||
GOCACHE=${PROJECT_SOURCE}/.cache \
|
||||
dlv \
|
||||
--listen=127.0.0.1:${DEBUG_PORT} \
|
||||
--only-same-user=false \
|
||||
--headless=true \
|
||||
--api-version=2 \
|
||||
--accept-multiclient \
|
||||
debug --continue main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: debug
|
||||
11
tests/helper/registry_server/testdata/registry-build/stacks/go/stack.yaml
vendored
Normal file
11
tests/helper/registry_server/testdata/registry-build/stacks/go/stack.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: go
|
||||
description: 'Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.'
|
||||
displayName: Go Runtime
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
versions:
|
||||
- version: 1.0.2
|
||||
# 1.2.0: debug command via dlv & go 1.19
|
||||
- version: 1.2.0
|
||||
default: true # should have one and only one default version
|
||||
# 2.2.0: debug command via dlv & go 1.19
|
||||
- version: 2.2.0
|
||||
63
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/1.2.0/devfile.yaml
vendored
Normal file
63
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/1.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-maven
|
||||
displayName: Maven Java
|
||||
description: Java application based on Maven 3.6 and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
projectType: Maven
|
||||
language: Java
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/springboot-ex.git'
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/openjdk-11:1.17-9
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-maven
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume: {}
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -jar target/*.jar'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
63
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/1.3.0/devfile.yaml
vendored
Normal file
63
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/1.3.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-maven
|
||||
displayName: Maven Java
|
||||
description: Java application based on Maven 3.6 and OpenJDK 17
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
projectType: Maven
|
||||
language: Java
|
||||
version: 1.3.0
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/springboot-ex.git'
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-maven
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume: {}
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -jar target/*.jar'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
9
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/stack.yaml
vendored
Normal file
9
tests/helper/registry_server/testdata/registry-build/stacks/java-maven/stack.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: java-maven
|
||||
description: 'Java application based on Maven and OpenJDK'
|
||||
displayName: Maven Java
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
versions:
|
||||
- version: 1.2.0
|
||||
# 1.3.0: with JDK 17
|
||||
- version: 1.3.0
|
||||
default: true # should have one and only one default version
|
||||
103
tests/helper/registry_server/testdata/registry-build/stacks/java-openliberty/devfile.yaml
vendored
Normal file
103
tests/helper/registry_server/testdata/registry-build/stacks/java-openliberty/devfile.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
# Copyright (c) 2021,2022 IBM Corporation and others
|
||||
#
|
||||
# See the NOTICE file(s) distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# You may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-openliberty
|
||||
displayName: Open Liberty Maven
|
||||
description: Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1
|
||||
icon: https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
architectures:
|
||||
- amd64
|
||||
- ppc64le
|
||||
- s390x
|
||||
projectType: Open Liberty
|
||||
language: Java
|
||||
version: 0.9.0
|
||||
alpha.build-dockerfile: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-maven-0.8.1/Dockerfile
|
||||
alpha.deployment-manifest: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-maven-0.8.1/app-deploy.yaml
|
||||
starterProjects:
|
||||
- name: rest
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/OpenLiberty/devfile-stack-starters.git
|
||||
variables:
|
||||
# Liberty runtime version. Minimum recommended: 21.0.0.9
|
||||
liberty-version: '22.0.0.1'
|
||||
liberty-plugin-version: '3.5.1'
|
||||
mvn-cmd: 'mvn'
|
||||
components:
|
||||
- name: dev
|
||||
container:
|
||||
# In the original upstream of this devfile, the image used is openliberty/devfile-stack:<x.y.z>, which is built from the repository: https://github.com/OpenLiberty/devfile-stack
|
||||
image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}}
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- exposure: public
|
||||
path: /
|
||||
name: http-openlib
|
||||
targetPort: 9080
|
||||
protocol: http
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
commands:
|
||||
- id: run
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "run command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -Ddebug=false -DhotTests=true -DcompileWait=3 io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: run-test-off
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "run-test-off command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -Ddebug=false io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: run
|
||||
isDefault: false
|
||||
- id: debug
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "debug command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -DdebugPort=${DEBUG_PORT} io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev -Dliberty.env.WLP_DEBUG_REMOTE=y
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
# The 'test' command requires an already active container. Multi-module apps require compilation prior to test processing.
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "test command "; {{mvn-cmd}} compiler:compile failsafe:integration-test failsafe:verify
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
65
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/1.3.0/devfile.yaml
vendored
Normal file
65
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/1.3.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-springboot
|
||||
displayName: Spring Boot®
|
||||
description: Java application using Spring Boot® and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
tags:
|
||||
- Java
|
||||
- Spring
|
||||
projectType: springboot
|
||||
language: Java
|
||||
version: 1.3.0
|
||||
globalMemoryLimit: 2674Mi
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: "https://github.com/odo-devfiles/springboot-ex.git"
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-springboot
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: "5858"
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true"
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run"
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar"
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
BIN
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/2.1.0/archive.tar
vendored
Normal file
BIN
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/2.1.0/archive.tar
vendored
Normal file
Binary file not shown.
92
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/2.1.0/devfile.yaml
vendored
Normal file
92
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: java-springboot
|
||||
displayName: Spring Boot®
|
||||
description: Java application using Spring Boot® and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
tags:
|
||||
- Java
|
||||
- Spring
|
||||
projectType: springboot
|
||||
language: Java
|
||||
version: 2.1.0
|
||||
globalMemoryLimit: 2674Mi
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: "https://github.com/odo-devfiles/springboot-ex.git"
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-springboot
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: "5858"
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
- name: build
|
||||
image:
|
||||
imageName: java-springboot-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
10
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/stack.yaml
vendored
Normal file
10
tests/helper/registry_server/testdata/registry-build/stacks/java-springboot/stack.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: java-springboot
|
||||
description: Spring Boot using Java
|
||||
displayName: Spring Boot
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
versions:
|
||||
# 1.3.0: with JDK 17
|
||||
- version: 1.3.0
|
||||
default: true # should have one and only one default version
|
||||
# 2.1.0: with JDK 17
|
||||
- version: 2.1.0
|
||||
138
tests/helper/registry_server/testdata/registry-build/stacks/java-vertx/devfile.yaml
vendored
Normal file
138
tests/helper/registry_server/testdata/registry-build/stacks/java-vertx/devfile.yaml
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-vertx
|
||||
displayName: Vert.x Java
|
||||
description: Java application using Vert.x and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/vertx-web-site/vertx-logo/master/vertx-logo.svg
|
||||
tags:
|
||||
- Java
|
||||
- Vert.x
|
||||
projectType: Vert.x
|
||||
language: Java
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: vertx-http-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-http-example
|
||||
- name: vertx-istio-circuit-breaker-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-circuit-breaker-booster
|
||||
- name: vertx-istio-routing-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-routing-booster
|
||||
- name: vertx-secured-http-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-secured-http-example-redhat
|
||||
- name: vertx-crud-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-crud-example-redhat
|
||||
- name: vertx-istio-security-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-security-booster
|
||||
- name: vertx-crud-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-crud-example
|
||||
- name: vertx-circuit-breaker-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-circuit-breaker-example
|
||||
- name: vertx-configmap-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-configmap-example
|
||||
- name: vertx-circuit-breaker-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-circuit-breaker-example-redhat
|
||||
- name: vertx-cache-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-cache-example-redhat
|
||||
- name: vertx-cache-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-cache-example
|
||||
- name: vertx-secured-http-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-secured-http-example
|
||||
- name: vertx-health-checks-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-health-checks-example-redhat
|
||||
- name: vertx-http-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-http-example-redhat
|
||||
- name: vertx-health-checks-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-health-checks-example
|
||||
- name: vertx-configmap-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-configmap-example-redhat
|
||||
- name: vertx-messaging-work-queue-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-messaging-work-queue-booster
|
||||
- name: vertx-istio-distributed-tracing-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-distributed-tracing-booster
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
endpoints:
|
||||
- exposure: public
|
||||
path: /
|
||||
name: http-vertx
|
||||
targetPort: 8080
|
||||
protocol: http
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: quay.io/eclipse/che-java11-maven:7.37.2
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
commandLine: mvn package -Dmaven.test.skip=true
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
commandLine: mvn io.reactiverse:vertx-maven-plugin:run
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
- id: debug
|
||||
exec:
|
||||
commandLine: mvn io.reactiverse:vertx-maven-plugin:debug -Ddebug.port=${DEBUG_PORT}
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.0.2/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.0.2
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:1-139
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.1.0/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.1.0
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.2.0/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
13
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/stack.yaml
vendored
Normal file
13
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-angular/stack.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: nodejs-angular
|
||||
description:
|
||||
"Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
displayName: Angular
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
versions:
|
||||
- version: 2.0.2
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.1.0
|
||||
- version: 2.2.0
|
||||
47
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/2.0.2/devfile.yaml
vendored
Normal file
47
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/2.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-react
|
||||
displayName: React
|
||||
description: "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- React
|
||||
projectType: React
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.0.2
|
||||
starterProjects:
|
||||
- name: nodejs-react-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stacks-nodejs-react.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-react
|
||||
targetPort: 3000
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:1-139
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run dev
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
47
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/2.2.0/devfile.yaml
vendored
Normal file
47
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: nodejs-react
|
||||
displayName: React
|
||||
description: "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- React
|
||||
projectType: React
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-react-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stacks-nodejs-react.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-react
|
||||
targetPort: 3000
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run dev
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
10
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/stack.yaml
vendored
Normal file
10
tests/helper/registry_server/testdata/registry-build/stacks/nodejs-react/stack.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: nodejs-react
|
||||
description:
|
||||
'React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies.'
|
||||
displayName: React
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
versions:
|
||||
- version: 2.0.2
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.2.0
|
||||
67
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/2.1.1/devfile.yaml
vendored
Normal file
67
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/2.1.1/devfile.yaml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs
|
||||
displayName: Node.js Runtime
|
||||
description: Node.js 16 application
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Express
|
||||
- ubi8
|
||||
projectType: Node.js
|
||||
language: JavaScript
|
||||
version: 2.1.1
|
||||
starterProjects:
|
||||
- name: nodejs-starter
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/nodejs-ex.git'
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:latest
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
endpoints:
|
||||
- name: http-node
|
||||
targetPort: 3000
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
commands:
|
||||
- id: install
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm run debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm test
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
67
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/2.2.0/devfile.yaml
vendored
Normal file
67
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs
|
||||
displayName: Node.js Runtime
|
||||
description: Node.js 18 application
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Express
|
||||
- ubi8
|
||||
projectType: Node.js
|
||||
language: JavaScript
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-starter
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/nodejs-ex.git'
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-32
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
endpoints:
|
||||
- name: http-node
|
||||
targetPort: 3000
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
commands:
|
||||
- id: install
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm run debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm test
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
8
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/stack.yaml
vendored
Normal file
8
tests/helper/registry_server/testdata/registry-build/stacks/nodejs/stack.yaml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
name: nodejs
|
||||
description: 'Node.js application'
|
||||
displayName: Node.js Runtime
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
versions:
|
||||
- version: 2.1.1
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.2.0
|
||||
62
tests/helper/registry_server/testdata/registry-build/stacks/python/2.1.0/devfile.yaml
vendored
Normal file
62
tests/helper/registry_server/testdata/registry-build/stacks/python/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: python
|
||||
displayName: Python
|
||||
description: "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
tags:
|
||||
- Python
|
||||
- Pip
|
||||
- Flask
|
||||
projectType: Python
|
||||
language: Python
|
||||
provider: Red Hat
|
||||
version: 2.1.0
|
||||
starterProjects:
|
||||
- name: flask-example
|
||||
description:
|
||||
'Flask is a web framework, it’s a Python module that lets you develop web applications easily.
|
||||
It’s has a small and easy-to-extend core: it’s a microframework that doesn’t include an ORM (Object Relational Manager) or such features.'
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/python-ex
|
||||
components:
|
||||
- name: py
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/python-39:1-153.1699551718
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-python
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
commands:
|
||||
- id: pip-install-requirements
|
||||
exec:
|
||||
commandLine: pip install -r requirements.txt
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
component: py
|
||||
- id: run-app
|
||||
exec:
|
||||
commandLine: 'python app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug-py
|
||||
exec:
|
||||
commandLine: 'pip install debugpy && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: debug
|
||||
BIN
tests/helper/registry_server/testdata/registry-build/stacks/python/3.0.0/archive.tar
vendored
Normal file
BIN
tests/helper/registry_server/testdata/registry-build/stacks/python/3.0.0/archive.tar
vendored
Normal file
Binary file not shown.
89
tests/helper/registry_server/testdata/registry-build/stacks/python/3.0.0/devfile.yaml
vendored
Normal file
89
tests/helper/registry_server/testdata/registry-build/stacks/python/3.0.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: python
|
||||
displayName: Python
|
||||
description: "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
tags:
|
||||
- Python
|
||||
- Pip
|
||||
- Flask
|
||||
projectType: Python
|
||||
language: Python
|
||||
provider: Red Hat
|
||||
version: 3.0.0
|
||||
starterProjects:
|
||||
- name: flask-example
|
||||
description:
|
||||
'Flask is a web framework, it’s a Python module that lets you develop web applications easily.
|
||||
It’s has a small and easy-to-extend core: it’s a microframework that doesn’t include an ORM (Object Relational Manager) or such features.'
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/python-ex
|
||||
components:
|
||||
- name: py
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/python-39:1-153.1699551718
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-python
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: build
|
||||
image:
|
||||
imageName: python-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
commands:
|
||||
- id: pip-install-requirements
|
||||
exec:
|
||||
commandLine: pip install -r requirements.txt
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
component: py
|
||||
- id: run-app
|
||||
exec:
|
||||
commandLine: 'python app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug-py
|
||||
exec:
|
||||
commandLine: 'pip install debugpy && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: debug
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
9
tests/helper/registry_server/testdata/registry-build/stacks/python/stack.yaml
vendored
Normal file
9
tests/helper/registry_server/testdata/registry-build/stacks/python/stack.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: python
|
||||
description: 'Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.'
|
||||
displayName: Python
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
versions:
|
||||
- version: 2.1.0
|
||||
default: true # should have one and only one default version
|
||||
- version: 3.0.0
|
||||
6
tests/helper/registry_server/testdata/registry/README.md
vendored
Normal file
6
tests/helper/registry_server/testdata/registry/README.md
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
This folder is used to generate and serve artifacts by a Devfile Registry started only for testing.
|
||||
|
||||
To update, simply copy the relevant files from an existing folder from an existing registry stacks folder (see https://github.com/devfile/registry/tree/main/stacks)
|
||||
to this folder.
|
||||
Then, and anytime a change is made to the source `registry/stacks` folder, you need to run 'make generate-test-registry-build'
|
||||
to regenerate the `registry-build` folder with the artifacts that will be served for the tests.
|
||||
56
tests/helper/registry_server/testdata/registry/stacks/dotnet50/devfile.yaml
vendored
Normal file
56
tests/helper/registry_server/testdata/registry/stacks/dotnet50/devfile.yaml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: dotnet50
|
||||
displayName: .NET 5.0
|
||||
description: .NET 5.0 application
|
||||
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
|
||||
tags:
|
||||
- .NET
|
||||
- .NET 5.0
|
||||
projectType: dotnet
|
||||
language: .NET
|
||||
version: 1.0.3
|
||||
starterProjects:
|
||||
- name: dotnet50-example
|
||||
git:
|
||||
checkoutFrom:
|
||||
remote: origin
|
||||
revision: dotnet-5.0
|
||||
remotes:
|
||||
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
|
||||
subDir: app
|
||||
components:
|
||||
- name: dotnet
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/dotnet-50:5.0-39
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
mountSources: true
|
||||
env:
|
||||
- name: CONFIGURATION
|
||||
value: Debug
|
||||
- name: STARTUP_PROJECT
|
||||
value: app.csproj
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: Development
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://*:8080
|
||||
endpoints:
|
||||
- name: http-dotnet50
|
||||
targetPort: 8080
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: kill $(pidof dotnet); dotnet build -c $CONFIGURATION $STARTUP_PROJECT /p:UseSharedCompilation=false
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: dotnet run -c $CONFIGURATION --no-build --project $STARTUP_PROJECT --no-launch-profile
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
56
tests/helper/registry_server/testdata/registry/stacks/dotnet60/devfile.yaml
vendored
Normal file
56
tests/helper/registry_server/testdata/registry/stacks/dotnet60/devfile.yaml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: dotnet60
|
||||
displayName: .NET 6.0
|
||||
description: .NET 6.0 application
|
||||
icon: https://github.com/dotnet/brand/raw/main/logo/dotnet-logo.png
|
||||
tags:
|
||||
- .NET
|
||||
- .NET 6.0
|
||||
projectType: dotnet
|
||||
language: .NET
|
||||
version: 1.0.2
|
||||
starterProjects:
|
||||
- name: dotnet60-example
|
||||
git:
|
||||
checkoutFrom:
|
||||
remote: origin
|
||||
revision: dotnet-6.0
|
||||
remotes:
|
||||
origin: https://github.com/redhat-developer/s2i-dotnetcore-ex
|
||||
subDir: app
|
||||
components:
|
||||
- name: dotnet
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/dotnet-60:6.0-43
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
mountSources: true
|
||||
env:
|
||||
- name: CONFIGURATION
|
||||
value: Debug
|
||||
- name: STARTUP_PROJECT
|
||||
value: app.csproj
|
||||
- name: ASPNETCORE_ENVIRONMENT
|
||||
value: Development
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://*:8080
|
||||
endpoints:
|
||||
- name: http-dotnet60
|
||||
targetPort: 8080
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: kill $(pidof dotnet); dotnet build -c $CONFIGURATION $STARTUP_PROJECT /p:UseSharedCompilation=false
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: dotnet run -c $CONFIGURATION --no-build --project $STARTUP_PROJECT --no-launch-profile
|
||||
component: dotnet
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
53
tests/helper/registry_server/testdata/registry/stacks/go/1.0.2/devfile.yaml
vendored
Normal file
53
tests/helper/registry_server/testdata/registry/stacks/go/1.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.18.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
- Deprecated
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 1.0.2
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.18.10-4
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
76
tests/helper/registry_server/testdata/registry/stacks/go/1.2.0/devfile.yaml
vendored
Normal file
76
tests/helper/registry_server/testdata/registry/stacks/go/1.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
|
||||
- exec:
|
||||
commandLine: |
|
||||
GOPATH=${PROJECT_SOURCE}/.go \
|
||||
GOCACHE=${PROJECT_SOURCE}/.cache \
|
||||
dlv \
|
||||
--listen=127.0.0.1:${DEBUG_PORT} \
|
||||
--only-same-user=false \
|
||||
--headless=true \
|
||||
--api-version=2 \
|
||||
--accept-multiclient \
|
||||
debug --continue main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: debug
|
||||
103
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/devfile.yaml
vendored
Normal file
103
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: go
|
||||
displayName: Go Runtime
|
||||
description: Go (version 1.19.x) is an open source programming language that makes it easy to build simple, reliable, and efficient software.
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
tags:
|
||||
- Go
|
||||
projectType: Go
|
||||
language: Go
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: go-starter
|
||||
description: A Go project with a simple HTTP server
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-go.git
|
||||
components:
|
||||
- name: build
|
||||
image:
|
||||
imageName: go-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-go
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
name: runtime
|
||||
commands:
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
- exec:
|
||||
env:
|
||||
- name: GOPATH
|
||||
value: ${PROJECT_SOURCE}/.go
|
||||
- name: GOCACHE
|
||||
value: ${PROJECT_SOURCE}/.cache
|
||||
commandLine: go build main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: build
|
||||
- exec:
|
||||
commandLine: ./main
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
|
||||
- exec:
|
||||
commandLine: |
|
||||
GOPATH=${PROJECT_SOURCE}/.go \
|
||||
GOCACHE=${PROJECT_SOURCE}/.cache \
|
||||
dlv \
|
||||
--listen=127.0.0.1:${DEBUG_PORT} \
|
||||
--only-same-user=false \
|
||||
--headless=true \
|
||||
--api-version=2 \
|
||||
--accept-multiclient \
|
||||
debug --continue main.go
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: debug
|
||||
12
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/docker/Dockerfile
vendored
Normal file
12
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM registry.access.redhat.com/ubi9/go-toolset:1.19.13-4.1697647145
|
||||
|
||||
COPY go.mod ./
|
||||
RUN go mod download
|
||||
|
||||
COPY *.go ./
|
||||
|
||||
RUN go build -o ./main
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
CMD [ "./main" , "-p=8081"]
|
||||
41
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/kubernetes/deploy.yaml
vendored
Normal file
41
tests/helper/registry_server/testdata/registry/stacks/go/2.2.0/kubernetes/deploy.yaml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: my-go-svc
|
||||
spec:
|
||||
ports:
|
||||
- name: http-8081
|
||||
port: 8081
|
||||
protocol: TCP
|
||||
targetPort: 8081
|
||||
selector:
|
||||
app: go-app
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: my-go
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: go-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: go-app
|
||||
spec:
|
||||
containers:
|
||||
- name: my-go
|
||||
image: go-image:latest
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8081
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
memory: "10Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
11
tests/helper/registry_server/testdata/registry/stacks/go/stack.yaml
vendored
Normal file
11
tests/helper/registry_server/testdata/registry/stacks/go/stack.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: go
|
||||
description: 'Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.'
|
||||
displayName: Go Runtime
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg
|
||||
versions:
|
||||
- version: 1.0.2
|
||||
# 1.2.0: debug command via dlv & go 1.19
|
||||
- version: 1.2.0
|
||||
default: true # should have one and only one default version
|
||||
# 2.2.0: debug command via dlv & go 1.19
|
||||
- version: 2.2.0
|
||||
63
tests/helper/registry_server/testdata/registry/stacks/java-maven/1.2.0/devfile.yaml
vendored
Normal file
63
tests/helper/registry_server/testdata/registry/stacks/java-maven/1.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-maven
|
||||
displayName: Maven Java
|
||||
description: Java application based on Maven 3.6 and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
projectType: Maven
|
||||
language: Java
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/springboot-ex.git'
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/openjdk-11:1.17-9
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-maven
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume: {}
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -jar target/*.jar'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
63
tests/helper/registry_server/testdata/registry/stacks/java-maven/1.3.0/devfile.yaml
vendored
Normal file
63
tests/helper/registry_server/testdata/registry/stacks/java-maven/1.3.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-maven
|
||||
displayName: Maven Java
|
||||
description: Java application based on Maven 3.6 and OpenJDK 17
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
projectType: Maven
|
||||
language: Java
|
||||
version: 1.3.0
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/springboot-ex.git'
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-maven
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume: {}
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository package'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -jar target/*.jar'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
9
tests/helper/registry_server/testdata/registry/stacks/java-maven/stack.yaml
vendored
Normal file
9
tests/helper/registry_server/testdata/registry/stacks/java-maven/stack.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: java-maven
|
||||
description: 'Java application based on Maven and OpenJDK'
|
||||
displayName: Maven Java
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg
|
||||
versions:
|
||||
- version: 1.2.0
|
||||
# 1.3.0: with JDK 17
|
||||
- version: 1.3.0
|
||||
default: true # should have one and only one default version
|
||||
103
tests/helper/registry_server/testdata/registry/stacks/java-openliberty/devfile.yaml
vendored
Normal file
103
tests/helper/registry_server/testdata/registry/stacks/java-openliberty/devfile.yaml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
# Copyright (c) 2021,2022 IBM Corporation and others
|
||||
#
|
||||
# See the NOTICE file(s) distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# You may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-openliberty
|
||||
displayName: Open Liberty Maven
|
||||
description: Java application based on Java 11 and Maven 3.8, using the Open Liberty runtime 22.0.0.1
|
||||
icon: https://raw.githubusercontent.com/OpenLiberty/logos/7fbb132949b9b2589e18c8d5665c1b107028a21d/logomark/svg/OL_logomark.svg
|
||||
tags:
|
||||
- Java
|
||||
- Maven
|
||||
architectures:
|
||||
- amd64
|
||||
- ppc64le
|
||||
- s390x
|
||||
projectType: Open Liberty
|
||||
language: Java
|
||||
version: 0.9.0
|
||||
alpha.build-dockerfile: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-maven-0.8.1/Dockerfile
|
||||
alpha.deployment-manifest: https://github.com/OpenLiberty/devfile-stack/releases/download/open-liberty-maven-0.8.1/app-deploy.yaml
|
||||
starterProjects:
|
||||
- name: rest
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/OpenLiberty/devfile-stack-starters.git
|
||||
variables:
|
||||
# Liberty runtime version. Minimum recommended: 21.0.0.9
|
||||
liberty-version: '22.0.0.1'
|
||||
liberty-plugin-version: '3.5.1'
|
||||
mvn-cmd: 'mvn'
|
||||
components:
|
||||
- name: dev
|
||||
container:
|
||||
# In the original upstream of this devfile, the image used is openliberty/devfile-stack:<x.y.z>, which is built from the repository: https://github.com/OpenLiberty/devfile-stack
|
||||
image: icr.io/appcafe/open-liberty-devfile-stack:{{liberty-version}}
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- exposure: public
|
||||
path: /
|
||||
name: http-openlib
|
||||
targetPort: 9080
|
||||
protocol: http
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
commands:
|
||||
- id: run
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "run command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -Ddebug=false -DhotTests=true -DcompileWait=3 io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: run-test-off
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "run-test-off command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -Ddebug=false io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: run
|
||||
isDefault: false
|
||||
- id: debug
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "debug command "; {{mvn-cmd}} -DinstallDirectory=/opt/ol/wlp -DdebugPort=${DEBUG_PORT} io.openliberty.tools:liberty-maven-plugin:{{liberty-plugin-version}}:dev -Dliberty.env.WLP_DEBUG_REMOTE=y
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
# The 'test' command requires an already active container. Multi-module apps require compilation prior to test processing.
|
||||
exec:
|
||||
component: dev
|
||||
commandLine: echo "test command "; {{mvn-cmd}} compiler:compile failsafe:integration-test failsafe:verify
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
hotReloadCapable: true
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
65
tests/helper/registry_server/testdata/registry/stacks/java-springboot/1.3.0/devfile.yaml
vendored
Normal file
65
tests/helper/registry_server/testdata/registry/stacks/java-springboot/1.3.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-springboot
|
||||
displayName: Spring Boot®
|
||||
description: Java application using Spring Boot® and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
tags:
|
||||
- Java
|
||||
- Spring
|
||||
projectType: springboot
|
||||
language: Java
|
||||
version: 1.3.0
|
||||
globalMemoryLimit: 2674Mi
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: "https://github.com/odo-devfiles/springboot-ex.git"
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-springboot
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: "5858"
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true"
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run"
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar"
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
92
tests/helper/registry_server/testdata/registry/stacks/java-springboot/2.1.0/devfile.yaml
vendored
Normal file
92
tests/helper/registry_server/testdata/registry/stacks/java-springboot/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: java-springboot
|
||||
displayName: Spring Boot®
|
||||
description: Java application using Spring Boot® and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
tags:
|
||||
- Java
|
||||
- Spring
|
||||
projectType: springboot
|
||||
language: Java
|
||||
version: 2.1.0
|
||||
globalMemoryLimit: 2674Mi
|
||||
starterProjects:
|
||||
- name: springbootproject
|
||||
git:
|
||||
remotes:
|
||||
origin: "https://github.com/odo-devfiles/springboot-ex.git"
|
||||
components:
|
||||
- name: tools
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/openjdk-17:1.17-1
|
||||
command: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 768Mi
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-springboot
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: "5858"
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
- name: build
|
||||
image:
|
||||
imageName: java-springboot-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
commands:
|
||||
- id: build
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true'
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run'
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: tools
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
commandLine: 'java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar'
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
27
tests/helper/registry_server/testdata/registry/stacks/java-springboot/2.1.0/docker/Dockerfile
vendored
Normal file
27
tests/helper/registry_server/testdata/registry/stacks/java-springboot/2.1.0/docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
####
|
||||
# This Dockerfile is used in order to build a container that runs the Spring Boot application
|
||||
#
|
||||
# Build the image with:
|
||||
#
|
||||
# docker build -f docker/Dockerfile -t springboot/sample-demo .
|
||||
#
|
||||
# Then run the container using:
|
||||
#
|
||||
# docker run -i --rm -p 8081:8081 springboot/sample-demo
|
||||
####
|
||||
FROM quay.io/devfile/maven:3.8.1-openjdk-17-slim
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Build dependency offline to streamline build
|
||||
COPY pom.xml .
|
||||
RUN mvn dependency:go-offline
|
||||
|
||||
COPY src src
|
||||
RUN mvn package -Dmaven.test.skip=true
|
||||
|
||||
FROM registry.access.redhat.com/ubi9/openjdk-17-runtime:latest
|
||||
COPY --from=0 /build/target/demo-0.0.1-SNAPSHOT.jar /app/target/demo-0.0.1-SNAPSHOT.jar
|
||||
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT [ "java", "-jar", "/app/target/demo-0.0.1-SNAPSHOT.jar", "--server.port=8081" ]
|
||||
@@ -0,0 +1,41 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: my-java-springboot-svc
|
||||
spec:
|
||||
ports:
|
||||
- name: http-8081
|
||||
port: 8081
|
||||
protocol: TCP
|
||||
targetPort: 8081
|
||||
selector:
|
||||
app: java-springboot-app
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: my-java-springboot
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: java-springboot-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: java-springboot-app
|
||||
spec:
|
||||
containers:
|
||||
- name: my-java-springboot
|
||||
image: java-springboot-image:latest
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8081
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
memory: "180Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "300Mi"
|
||||
cpu: "100m"
|
||||
10
tests/helper/registry_server/testdata/registry/stacks/java-springboot/stack.yaml
vendored
Normal file
10
tests/helper/registry_server/testdata/registry/stacks/java-springboot/stack.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: java-springboot
|
||||
description: Spring Boot using Java
|
||||
displayName: Spring Boot
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
|
||||
versions:
|
||||
# 1.3.0: with JDK 17
|
||||
- version: 1.3.0
|
||||
default: true # should have one and only one default version
|
||||
# 2.1.0: with JDK 17
|
||||
- version: 2.1.0
|
||||
138
tests/helper/registry_server/testdata/registry/stacks/java-vertx/devfile.yaml
vendored
Normal file
138
tests/helper/registry_server/testdata/registry/stacks/java-vertx/devfile.yaml
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: java-vertx
|
||||
displayName: Vert.x Java
|
||||
description: Java application using Vert.x and OpenJDK 11
|
||||
icon: https://raw.githubusercontent.com/vertx-web-site/vertx-logo/master/vertx-logo.svg
|
||||
tags:
|
||||
- Java
|
||||
- Vert.x
|
||||
projectType: Vert.x
|
||||
language: Java
|
||||
version: 1.2.0
|
||||
starterProjects:
|
||||
- name: vertx-http-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-http-example
|
||||
- name: vertx-istio-circuit-breaker-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-circuit-breaker-booster
|
||||
- name: vertx-istio-routing-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-routing-booster
|
||||
- name: vertx-secured-http-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-secured-http-example-redhat
|
||||
- name: vertx-crud-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-crud-example-redhat
|
||||
- name: vertx-istio-security-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-security-booster
|
||||
- name: vertx-crud-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-crud-example
|
||||
- name: vertx-circuit-breaker-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-circuit-breaker-example
|
||||
- name: vertx-configmap-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-configmap-example
|
||||
- name: vertx-circuit-breaker-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-circuit-breaker-example-redhat
|
||||
- name: vertx-cache-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-cache-example-redhat
|
||||
- name: vertx-cache-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-cache-example
|
||||
- name: vertx-secured-http-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-secured-http-example
|
||||
- name: vertx-health-checks-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-health-checks-example-redhat
|
||||
- name: vertx-http-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-http-example-redhat
|
||||
- name: vertx-health-checks-example
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-health-checks-example
|
||||
- name: vertx-configmap-example-redhat
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-configmap-example-redhat
|
||||
- name: vertx-messaging-work-queue-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-messaging-work-queue-booster
|
||||
- name: vertx-istio-distributed-tracing-booster
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/openshift-vertx-examples/vertx-istio-distributed-tracing-booster
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
endpoints:
|
||||
- exposure: public
|
||||
path: /
|
||||
name: http-vertx
|
||||
targetPort: 8080
|
||||
protocol: http
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
image: quay.io/eclipse/che-java11-maven:7.37.2
|
||||
memoryLimit: 512Mi
|
||||
mountSources: true
|
||||
volumeMounts:
|
||||
- name: m2
|
||||
path: /home/user/.m2
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: m2
|
||||
volume:
|
||||
size: 3Gi
|
||||
commands:
|
||||
- id: mvn-package
|
||||
exec:
|
||||
commandLine: mvn package -Dmaven.test.skip=true
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
- id: run
|
||||
exec:
|
||||
commandLine: mvn io.reactiverse:vertx-maven-plugin:run
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
- id: debug
|
||||
exec:
|
||||
commandLine: mvn io.reactiverse:vertx-maven-plugin:debug -Ddebug.port=${DEBUG_PORT}
|
||||
component: runtime
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
isDefault: true
|
||||
kind: debug
|
||||
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.0.2/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.0.2
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:1-139
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.1.0/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.1.0
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.2.0/devfile.yaml
vendored
Normal file
50
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: nodejs-angular
|
||||
displayName: Angular
|
||||
description: "Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Angular
|
||||
projectType: Angular
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-angular-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stack-nodejs-angular.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-angular
|
||||
targetPort: 4200
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ["tail", "-f", "/dev/null"]
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run start
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
hotReloadCapable: true
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
13
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/stack.yaml
vendored
Normal file
13
tests/helper/registry_server/testdata/registry/stacks/nodejs-angular/stack.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: nodejs-angular
|
||||
description:
|
||||
"Angular is a development platform, built on TypeScript. As a platform, Angular includes:
|
||||
A component-based framework for building scalable web applications
|
||||
A collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more
|
||||
A suite of developer tools to help you develop, build, test, and update your code"
|
||||
displayName: Angular
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/angular.svg
|
||||
versions:
|
||||
- version: 2.0.2
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.1.0
|
||||
- version: 2.2.0
|
||||
47
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/2.0.2/devfile.yaml
vendored
Normal file
47
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/2.0.2/devfile.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs-react
|
||||
displayName: React
|
||||
description: "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- React
|
||||
projectType: React
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.0.2
|
||||
starterProjects:
|
||||
- name: nodejs-react-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stacks-nodejs-react.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-react
|
||||
targetPort: 3000
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:1-139
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run dev
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
47
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/2.2.0/devfile.yaml
vendored
Normal file
47
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: nodejs-react
|
||||
displayName: React
|
||||
description: "React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- React
|
||||
projectType: React
|
||||
language: TypeScript
|
||||
provider: Red Hat
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-react-starter
|
||||
git:
|
||||
checkoutFrom:
|
||||
revision: main
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/devfile-stacks-nodejs-react.git
|
||||
components:
|
||||
- container:
|
||||
endpoints:
|
||||
- name: http-react
|
||||
targetPort: 3000
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-81
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
name: runtime
|
||||
commands:
|
||||
- exec:
|
||||
commandLine: npm install
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: build
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: install
|
||||
- exec:
|
||||
commandLine: npm run dev
|
||||
component: runtime
|
||||
group:
|
||||
isDefault: true
|
||||
kind: run
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
id: run
|
||||
10
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/stack.yaml
vendored
Normal file
10
tests/helper/registry_server/testdata/registry/stacks/nodejs-react/stack.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
name: nodejs-react
|
||||
description:
|
||||
'React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
|
||||
It is maintained by Meta and a community of individual developers and companies.'
|
||||
displayName: React
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/react.svg
|
||||
versions:
|
||||
- version: 2.0.2
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.2.0
|
||||
67
tests/helper/registry_server/testdata/registry/stacks/nodejs/2.1.1/devfile.yaml
vendored
Normal file
67
tests/helper/registry_server/testdata/registry/stacks/nodejs/2.1.1/devfile.yaml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs
|
||||
displayName: Node.js Runtime
|
||||
description: Node.js 16 application
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Express
|
||||
- ubi8
|
||||
projectType: Node.js
|
||||
language: JavaScript
|
||||
version: 2.1.1
|
||||
starterProjects:
|
||||
- name: nodejs-starter
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/nodejs-ex.git'
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/nodejs-16:latest
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
endpoints:
|
||||
- name: http-node
|
||||
targetPort: 3000
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
commands:
|
||||
- id: install
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm run debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm test
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
67
tests/helper/registry_server/testdata/registry/stacks/nodejs/2.2.0/devfile.yaml
vendored
Normal file
67
tests/helper/registry_server/testdata/registry/stacks/nodejs/2.2.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: nodejs
|
||||
displayName: Node.js Runtime
|
||||
description: Node.js 18 application
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
tags:
|
||||
- Node.js
|
||||
- Express
|
||||
- ubi8
|
||||
projectType: Node.js
|
||||
language: JavaScript
|
||||
version: 2.2.0
|
||||
starterProjects:
|
||||
- name: nodejs-starter
|
||||
git:
|
||||
remotes:
|
||||
origin: 'https://github.com/odo-devfiles/nodejs-ex.git'
|
||||
components:
|
||||
- name: runtime
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi8/nodejs-18:1-32
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
memoryLimit: 1024Mi
|
||||
mountSources: true
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
endpoints:
|
||||
- name: http-node
|
||||
targetPort: 3000
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
commands:
|
||||
- id: install
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm install
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
- id: run
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm start
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm run debug
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: debug
|
||||
isDefault: true
|
||||
- id: test
|
||||
exec:
|
||||
component: runtime
|
||||
commandLine: npm test
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: test
|
||||
isDefault: true
|
||||
8
tests/helper/registry_server/testdata/registry/stacks/nodejs/stack.yaml
vendored
Normal file
8
tests/helper/registry_server/testdata/registry/stacks/nodejs/stack.yaml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
name: nodejs
|
||||
description: 'Node.js application'
|
||||
displayName: Node.js Runtime
|
||||
icon: https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg
|
||||
versions:
|
||||
- version: 2.1.1
|
||||
default: true # should have one and only one default version
|
||||
- version: 2.2.0
|
||||
62
tests/helper/registry_server/testdata/registry/stacks/python/2.1.0/devfile.yaml
vendored
Normal file
62
tests/helper/registry_server/testdata/registry/stacks/python/2.1.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
schemaVersion: 2.1.0
|
||||
metadata:
|
||||
name: python
|
||||
displayName: Python
|
||||
description: "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
tags:
|
||||
- Python
|
||||
- Pip
|
||||
- Flask
|
||||
projectType: Python
|
||||
language: Python
|
||||
provider: Red Hat
|
||||
version: 2.1.0
|
||||
starterProjects:
|
||||
- name: flask-example
|
||||
description:
|
||||
'Flask is a web framework, it’s a Python module that lets you develop web applications easily.
|
||||
It’s has a small and easy-to-extend core: it’s a microframework that doesn’t include an ORM (Object Relational Manager) or such features.'
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/python-ex
|
||||
components:
|
||||
- name: py
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/python-39:1-153.1699551718
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-python
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
commands:
|
||||
- id: pip-install-requirements
|
||||
exec:
|
||||
commandLine: pip install -r requirements.txt
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
component: py
|
||||
- id: run-app
|
||||
exec:
|
||||
commandLine: 'python app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug-py
|
||||
exec:
|
||||
commandLine: 'pip install debugpy && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: debug
|
||||
89
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/devfile.yaml
vendored
Normal file
89
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/devfile.yaml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
schemaVersion: 2.2.0
|
||||
metadata:
|
||||
name: python
|
||||
displayName: Python
|
||||
description: "Python (version 3.9.x) is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together."
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
tags:
|
||||
- Python
|
||||
- Pip
|
||||
- Flask
|
||||
projectType: Python
|
||||
language: Python
|
||||
provider: Red Hat
|
||||
version: 3.0.0
|
||||
starterProjects:
|
||||
- name: flask-example
|
||||
description:
|
||||
'Flask is a web framework, it’s a Python module that lets you develop web applications easily.
|
||||
It’s has a small and easy-to-extend core: it’s a microframework that doesn’t include an ORM (Object Relational Manager) or such features.'
|
||||
git:
|
||||
remotes:
|
||||
origin: https://github.com/devfile-samples/python-ex
|
||||
components:
|
||||
- name: py
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi9/python-39:1-153.1699551718
|
||||
args: ['tail', '-f', '/dev/null']
|
||||
mountSources: true
|
||||
endpoints:
|
||||
- name: http-python
|
||||
targetPort: 8080
|
||||
- exposure: none
|
||||
name: debug
|
||||
targetPort: 5858
|
||||
env:
|
||||
- name: DEBUG_PORT
|
||||
value: '5858'
|
||||
- name: build
|
||||
image:
|
||||
imageName: python-image:latest
|
||||
dockerfile:
|
||||
uri: docker/Dockerfile
|
||||
buildContext: .
|
||||
rootRequired: false
|
||||
- name: deploy
|
||||
kubernetes:
|
||||
uri: kubernetes/deploy.yaml
|
||||
endpoints:
|
||||
- name: http-8081
|
||||
targetPort: 8081
|
||||
commands:
|
||||
- id: pip-install-requirements
|
||||
exec:
|
||||
commandLine: pip install -r requirements.txt
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
group:
|
||||
kind: build
|
||||
isDefault: true
|
||||
component: py
|
||||
- id: run-app
|
||||
exec:
|
||||
commandLine: 'python app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: run
|
||||
isDefault: true
|
||||
- id: debug-py
|
||||
exec:
|
||||
commandLine: 'pip install debugpy && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} app.py'
|
||||
workingDir: ${PROJECT_SOURCE}
|
||||
component: py
|
||||
group:
|
||||
kind: debug
|
||||
- id: build-image
|
||||
apply:
|
||||
component: build
|
||||
- id: deployk8s
|
||||
apply:
|
||||
component: deploy
|
||||
- id: deploy
|
||||
composite:
|
||||
commands:
|
||||
- build-image
|
||||
- deployk8s
|
||||
group:
|
||||
kind: deploy
|
||||
isDefault: true
|
||||
20
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/docker/Dockerfile
vendored
Normal file
20
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM registry.access.redhat.com/ubi9/python-39:latest
|
||||
|
||||
# By default, listen on port 8081
|
||||
EXPOSE 8081/tcp
|
||||
ENV FLASK_PORT=8081
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /projects
|
||||
|
||||
# Copy the dependencies file to the working directory
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install any dependencies
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Copy the content of the local src directory to the working directory
|
||||
COPY . .
|
||||
|
||||
# Specify the command to run on container start
|
||||
CMD [ "python", "./app.py" ]
|
||||
41
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/kubernetes/deploy.yaml
vendored
Normal file
41
tests/helper/registry_server/testdata/registry/stacks/python/3.0.0/kubernetes/deploy.yaml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: my-python
|
||||
spec:
|
||||
ports:
|
||||
- name: http-8081
|
||||
port: 8081
|
||||
protocol: TCP
|
||||
targetPort: 8081
|
||||
selector:
|
||||
app: python-app
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: my-python
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: python-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: python-app
|
||||
spec:
|
||||
containers:
|
||||
- name: my-python
|
||||
image: python-image:latest
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8081
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
memory: "50Mi"
|
||||
cpu: "10m"
|
||||
limits:
|
||||
memory: "100Mi"
|
||||
cpu: "100m"
|
||||
9
tests/helper/registry_server/testdata/registry/stacks/python/stack.yaml
vendored
Normal file
9
tests/helper/registry_server/testdata/registry/stacks/python/stack.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: python
|
||||
description: 'Python is an interpreted, object-oriented, high-level programming language with dynamic semantics.
|
||||
Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.'
|
||||
displayName: Python
|
||||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/python.svg
|
||||
versions:
|
||||
- version: 2.1.0
|
||||
default: true # should have one and only one default version
|
||||
- version: 3.0.0
|
||||
@@ -156,7 +156,7 @@ var _ = Describe("odo devfile init command tests", func() {
|
||||
helper.JsonPathContentIs(stdout, "devfilePath", filepath.Join(commonVar.Context, "devfile.yaml"))
|
||||
helper.JsonPathContentIs(stdout, "devfileData.devfile.metadata.name", compName)
|
||||
helper.JsonPathContentIs(stdout, "devfileData.supportedOdoFeatures.dev", "true")
|
||||
helper.JsonPathContentIs(stdout, "devfileData.supportedOdoFeatures.debug", "false")
|
||||
helper.JsonPathContentIs(stdout, "devfileData.supportedOdoFeatures.debug", "true")
|
||||
helper.JsonPathContentIs(stdout, "devfileData.supportedOdoFeatures.deploy", "false")
|
||||
helper.JsonPathContentIs(stdout, "managedBy", "odo")
|
||||
})
|
||||
@@ -173,7 +173,7 @@ var _ = Describe("odo devfile init command tests", func() {
|
||||
title: "to download the latest version",
|
||||
devfileVersion: "latest",
|
||||
checkVersion: func(metadataVersion string) {
|
||||
reg := helper.NewRegistry(helper.GetDevfileRegistryURL())
|
||||
reg := helper.NewRegistry(commonVar.GetDevfileRegistryURL())
|
||||
stack, err := reg.GetStack(devfileName)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(stack.Versions)).ToNot(BeZero())
|
||||
@@ -604,7 +604,7 @@ spec:
|
||||
devfileRegistries:
|
||||
- name: ns-devfile-reg
|
||||
url: %q
|
||||
`, helper.GetDevfileRegistryURL()))
|
||||
`, commonVar.GetDevfileRegistryURL()))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
command := commonVar.CliRunner.Run("-n", commonVar.Project, "apply", "-f", manifestFilePath)
|
||||
Expect(command.ExitCode()).To(BeEquivalentTo(0))
|
||||
|
||||
@@ -35,9 +35,6 @@ var _ = Describe("odo devfile registry command tests", func() {
|
||||
|
||||
const registryName string = "RegistryName"
|
||||
|
||||
// Use staging OCI-based registry for tests to avoid overload
|
||||
addRegistryURL := helper.GetDevfileRegistryURL()
|
||||
|
||||
It("Should list all default registries", func() {
|
||||
output := helper.Cmd("odo", "preference", "view").ShouldPass().Out()
|
||||
helper.MatchAllInOutput(output, []string{"DefaultDevfileRegistry"})
|
||||
@@ -165,12 +162,12 @@ var _ = Describe("odo devfile registry command tests", func() {
|
||||
|
||||
When("adding a registry", func() {
|
||||
BeforeEach(func() {
|
||||
helper.Cmd("odo", "preference", "add", "registry", registryName, addRegistryURL).ShouldPass()
|
||||
helper.Cmd("odo", "preference", "add", "registry", registryName, commonVar.GetDevfileRegistryURL()).ShouldPass()
|
||||
})
|
||||
|
||||
It("should list newly added registry", func() {
|
||||
output := helper.Cmd("odo", "preference", "view").ShouldPass().Out()
|
||||
helper.MatchAllInOutput(output, []string{registryName, addRegistryURL})
|
||||
helper.MatchAllInOutput(output, []string{registryName, commonVar.GetDevfileRegistryURL()})
|
||||
})
|
||||
|
||||
It("should pass, when doing odo init with --devfile-registry flag", func() {
|
||||
@@ -179,7 +176,7 @@ var _ = Describe("odo devfile registry command tests", func() {
|
||||
})
|
||||
|
||||
It("should fail, when adding same registry", func() {
|
||||
helper.Cmd("odo", "preference", "add", "registry", registryName, addRegistryURL).ShouldFail()
|
||||
helper.Cmd("odo", "preference", "add", "registry", registryName, commonVar.GetDevfileRegistryURL()).ShouldFail()
|
||||
})
|
||||
|
||||
It("should successfully delete registry", func() {
|
||||
@@ -197,11 +194,10 @@ var _ = Describe("odo devfile registry command tests", func() {
|
||||
output := helper.Cmd("odo", "preference", "view", "-o", "json").ShouldPass().Out()
|
||||
Expect(helper.IsJSON(output)).To(BeTrue())
|
||||
helper.JsonPathContentIs(output, "registries.0.name", registryName)
|
||||
helper.JsonPathContentIs(output, "registries.0.url", addRegistryURL)
|
||||
helper.JsonPathContentIs(output, "registries.0.url", commonVar.GetDevfileRegistryURL())
|
||||
helper.JsonPathContentIs(output, "registries.1.name", "DefaultDevfileRegistry")
|
||||
helper.JsonPathContentIs(output, "registries.1.url", addRegistryURL) // as we are using its updated in case of Proxy
|
||||
helper.JsonPathContentIs(output, "registries.1.url", commonVar.GetDevfileRegistryURL()) // as we are using its updated in case of Proxy
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
@@ -235,7 +231,7 @@ spec:
|
||||
devfileRegistries:
|
||||
- name: ns-devfile-reg
|
||||
url: %q
|
||||
`, helper.GetDevfileRegistryURL()))
|
||||
`, commonVar.GetDevfileRegistryURL()))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
command := commonVar.CliRunner.Run("-n", commonVar.Project, "apply", "-f", manifestFilePath)
|
||||
Expect(command.ExitCode()).To(BeEquivalentTo(0))
|
||||
|
||||
@@ -391,7 +391,7 @@ OdoSettings:
|
||||
|
||||
BeforeEach(func() {
|
||||
manifestFilePath := filepath.Join(commonVar.ConfigDir, "devfileRegistryListCR.yaml")
|
||||
registryURL = helper.GetDevfileRegistryURL()
|
||||
registryURL = commonVar.GetDevfileRegistryURL()
|
||||
// NOTE: Use reachable URLs as we might be on a cluster with the registry operator installed, which would perform validations.
|
||||
err := helper.CreateFileWithContent(manifestFilePath, fmt.Sprintf(`
|
||||
apiVersion: registry.devfile.io/v1alpha1
|
||||
|
||||
@@ -271,7 +271,7 @@ var _ = Describe("odo init interactive command tests", func() {
|
||||
command := []string{"odo", "init"}
|
||||
starter := "go-starter"
|
||||
componentName := "my-go-app"
|
||||
devfileVersion := "2.0.0"
|
||||
devfileVersion := "2.2.0"
|
||||
|
||||
output, err := helper.RunInteractive(command, nil, func(ctx helper.InteractiveContext) {
|
||||
|
||||
@@ -728,7 +728,7 @@ spec:
|
||||
devfileRegistries:
|
||||
- name: %s
|
||||
url: %q
|
||||
`, devfileRegistryName, helper.GetDevfileRegistryURL()))
|
||||
`, devfileRegistryName, commonVar.GetDevfileRegistryURL()))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
command := commonVar.CliRunner.Run("-n", commonVar.Project, "apply", "-f", manifestFilePath)
|
||||
Expect(command.ExitCode()).To(BeEquivalentTo(0))
|
||||
|
||||
Reference in New Issue
Block a user