Skip to content

Commit

Permalink
Merge pull request #9832 from divyanshiGupta/converged-import-flows
Browse files Browse the repository at this point in the history
Converge Import from Git/Devfile/Dockerfile flows
  • Loading branch information
openshift-merge-robot committed Aug 25, 2021
2 parents 4812bcb + 62cd1c9 commit d4d8055
Show file tree
Hide file tree
Showing 69 changed files with 1,240 additions and 1,024 deletions.
40 changes: 1 addition & 39 deletions frontend/packages/dev-console/console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"id": "import-from-git",
"groupId": "git-repository",
"href": "/import/ns/:namespace",
"label": "%devconsole~From Git%",
"label": "%devconsole~Import from Git%",
"description": "%devconsole~Import code from your Git repository to be built and deployed%",
"icon": { "$codeRef": "icons.gitIconSVG" },
"accessReview": [
Expand All @@ -80,25 +80,6 @@
]
}
},
{
"type": "dev-console.add/action",
"properties": {
"id": "import-from-devfile",
"groupId": "git-repository",
"href": "/import/ns/:namespace?importType=devfile",
"label": "%devconsole~From Devfile%",
"description": "%devconsole~Import your Devfile from your Git repository to be built and deployed%",
"icon": { "$codeRef": "icons.devfileIconSVG" },
"accessReview": [
{ "group": "build.openshift.io", "resource": "buildconfigs", "verb": "create" },
{ "group": "image.openshift.io", "resource": "imagestreams", "verb": "create" },
{ "group": "apps", "resource": "deployments", "verb": "create" },
{ "group": "", "resource": "secrets", "verb": "create" },
{ "group": "route.openshift.io", "resource": "routes", "verb": "create" },
{ "group": "", "resource": "services", "verb": "create" }
]
}
},
{
"type": "dev-console.add/action",
"properties": {
Expand All @@ -119,25 +100,6 @@
]
}
},
{
"type": "dev-console.add/action",
"properties": {
"id": "import-from-dockerfile",
"groupId": "git-repository",
"href": "/import/ns/:namespace?importType=docker",
"label": "%devconsole~From Dockerfile%",
"description": "%devconsole~Import your Dockerfile from your Git repository to be built and deployed%",
"icon": { "$codeRef": "icons.dockerfileIconSVG" },
"accessReview": [
{ "group": "build.openshift.io", "resource": "buildconfigs", "verb": "create" },
{ "group": "image.openshift.io", "resource": "imagestreams", "verb": "create" },
{ "group": "apps.openshift.io", "resource": "deploymentconfigs", "verb": "create" },
{ "group": "", "resource": "secrets", "verb": "create" },
{ "group": "route.openshift.io", "resource": "routes", "verb": "create" },
{ "group": "", "resource": "services", "verb": "create" }
]
}
},
{
"type": "dev-console.add/action",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,41 @@ Feature: Create Application from Devfile
And user is at Add page


@regression
@regression @odc-5009
Scenario: Deploy git workload with devfile from topology page: A-04-TC01
Given user has created workload "nodejs-ex-git" with resource type "Deployment"
And user is at the Topology page
When user right clicks on topology empty graph
And user selects "From Devfile" option from Add to Project context menu
And user enters Git Repo url "https://github.com/redhat-developer/devfile-sample" in Devfile page
And user enters Name as "node-bulletin-board-1" in DevFile page
And user clicks Create button on Devfile page
And user selects "Import from Git" option from Add to Project context menu
And user enters Git Repo URL as "https://github.com/redhat-developer/devfile-sample" in Import from Git form
And user enters workload name as "node-bulletin-board-1" in Name
And user clicks Create button
Then user will be redirected to Topology page
And user is able to see workload "node-bulletin-board-1" in topology page


@regression
@regression @odc-5009
Scenario: Create the workload from dev file: A-04-TC02
Given user is at Import from Devfile page
When user enters Git Repo url "https://github.com/redhat-developer/devfile-sample" in Devfile page
And user enters Name as "node-bulletin-board" in DevFile page
And user clicks Create button on Devfile page
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/redhat-developer/devfile-sample"
And user enters workload name as "node-bulletin-board" in Name
And user clicks Create button
Then user will be redirected to Topology page
And user is able to see workload "node-bulletin-board" in topology page


@smoke
Scenario: Create the sample workload from dev file: A-04-TC03
Given user is at Import from Devfile page
When user selects Try sample link
And user clicks Create button on Devfile page
Then user will be redirected to Topology page
And user is able to see workload "devfile-sample" in topology page
# Below scenario to be removed after the tests are are updated
# @smoke
# Scenario: Create the sample workload from dev file: A-04-TC03
# Given user is at Import from Git page
# When user selects Try sample link
# And user clicks Create button on Devfile page
# Then user will be redirected to Topology page
# And user is able to see workload "devfile-sample" in topology page


@regression @to-do
Scenario: Create the Devfiles workload from Developer Catalog: A-04-TC04
Scenario: Create the Devfiles workload from Developer Catalog: A-04-TC03
Given user is at Developer Catalog page
When user clicks on Devfiles type
And user clicks on Basic Python card
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@add-flow
@add-flow @odc-5009
Feature: Create Application from Docker file
As a user, I want to create the application, component or service from Add Flow Docker file

Expand All @@ -10,33 +10,33 @@ Feature: Create Application from Docker file

@regression
Scenario: Dockerfile details after entering git repo url: A-05-TC01
Given user is on Import from Docker file page
When user enters docker git url as "https://github.com/sclorg/nodejs-ex.git"
Then git url "https://github.com/sclorg/nodejs-ex.git" gets Validated
And application name displays as "nodejs-ex-git-app"
And name field auto populates with value "nodejs-ex-git" in Import from Docker file page
Given user is on Import from Git form
When user enters Git Repo URL as "https://github.com/rohitkrai03/flask-dockerfile-example"
Then git url "https://github.com/rohitkrai03/flask-dockerfile-example" gets Validated
And application name displays as "flask-dockerfile-example-app"
And name field auto populates with value "flask-dockerfile-example" in Import from Git form


@smoke
Scenario Outline: Create a workload from Docker file with "<resource_type>" as resource type: A-05-TC02
Given user is on Import from Docker file page
When user enters docker git url as "https://github.com/sclorg/nodejs-ex.git"
Given user is on Import from Git form
When user enters Git Repo URL as "https://github.com/rohitkrai03/flask-dockerfile-example"
And user enters Name as "<name>" in Docker file page
And user selects "<resource_type>" radio button in Resource type section
And user clicks Create button on Add page
Then user will be redirected to Topology page
And user is able to see workload "<name>" in topology page

Examples:
| resource_type | name |
| Deployment | nodejs-ex-git |
| Deployment Config | nodejs-ex-1-git |
| resource_type | name |
| Deployment | dockerfile |
| Deployment Config | dockerfile-1 |


@regression
Scenario: Perform cancel operation on Dockerfile form should will be redirected the user to Add page: A-05-TC03
Given user is on Import from Docker file page
When user enters docker git url as "https://github.com/sclorg/nodejs-ex.git"
Scenario: Performing cancel operation on Dockerfile form should redirected the user to Add page: A-05-TC03
Given user is on Import from Git form
When user enters Git Repo URL as "https://github.com/rohitkrai03/flask-dockerfile-example"
And user selects "Deployment" radio button in Resource type section
And user clicks Cancel button on Add page
Then user will be redirected to Add page
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Feature: Create Application from git form
And user has created or selected namespace "aut-addflow-git"


@smoke
@smoke @odc-5009
Scenario Outline: Add new git workload with new application for resoruce type "<resource_type>": A-06-TC01
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Application name as "dancer-ex-git-app"
And user enters Name as "<name>"
And user selects resource type as "<resource_type>"
Expand All @@ -29,8 +29,8 @@ Feature: Create Application from git form
Scenario: Add new git workload to the existing application: A-06-TC02
Given user has created workload "exist-git" with resource type "Deployment"
And user is at Add page
And user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Application name as "nodejs-ex-git-app"
And user enters Name as "dancer-ex-git-2"
And user selects resource type as "Deployment Config"
Expand All @@ -41,16 +41,16 @@ Feature: Create Application from git form

@regression
Scenario: Cancel the git workload creation: A-06-TC03
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user clicks Cancel button on Add page
Then user will be redirected to Add page


@regression
Scenario: Create workload without application route: A-06-TC04
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Application name as "app-no-route"
And user enters Name as "name-no-route"
And user unselects the advanced option Create a route to the application
Expand All @@ -61,8 +61,8 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Routing": A-06-TC05
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-route" in General section
And user clicks "Routing" link in Advanced Options section
And user enters Hostname as "home"
Expand All @@ -75,8 +75,8 @@ Feature: Create Application from git form

@regression
Scenario: Create the workload by unselecting options in "Build Configuration" section:: A-06-TC06
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-build" in General section
And user clicks "Build configuration" link in Advanced Options section
And user unselects Configure a webhook build trigger checkbox in build configuration section
Expand All @@ -91,9 +91,9 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Deployment": A-06-TC07
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-deploy" in General section
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Name as "git-deploy" in General section
And user clicks "Deployment" link in Advanced Options section
And user verify the Auto deploy when new image is available checkbox is selected
And user enters Name as "home" in Environment Variables Runtime only section
Expand All @@ -104,9 +104,9 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Resource Limits": A-06-TC08
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-resource" in General section
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Name as "git-resource" in General section
And user clicks "Resource limits" link in Advanced Options section
And user enters CPU Request as "10" in CPU section
And user enters CPU Limits as "12" in CPU section
Expand All @@ -118,9 +118,9 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Scaling": A-06-TC09
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-scaling" in General section
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Name as "git-scaling" in General section
And user clicks "Scaling" link in Advanced Options section
And user enters number of replicas as "5" in Replicas section
And user clicks Create button on Add page
Expand All @@ -129,9 +129,9 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Labels": A-06-TC10
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-labels" in General section
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Name as "git-labels" in General section
And user clicks "Labels" link in Advanced Options section
And user enters label as "app=frontend"
And user clicks Create button on Add page
Expand All @@ -141,9 +141,9 @@ Feature: Create Application from git form

@regression
Scenario: Create a git workload with advanced option "Health Checks": A-06-TC11
Given user is at Import from git page
When user enters Git Repo url as "https://github.com/sclorg/dancer-ex.git"
And user enters name as "git-healthchecks" in General section
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/dancer-ex.git"
And user enters Name as "git-healthchecks" in General section
And user clicks "Health checks" link in Advanced Options section
And user fills the Readiness Probe details
And user fills the Liveness Probe details
Expand All @@ -155,9 +155,10 @@ Feature: Create Application from git form
# Marking this scenario as @manual, because due to git-rate limit issue, below scenarios are failing
@regression @manual
Scenario Outline: Builder iamge detected for git url "<git_url>": A-06-TC12
Given user is at Import from git page
When user enters Git Repo url as "<git_url>"
Given user is at Import from Git form
When user enters Git Repo URL as "<git_url>"
Then git url "<git_url>" gets Validated
And import strategy as Builder Image is detected
And builder image is detected
And builder image version drop down is displayed
And Application name displays as "<app_name>"
Expand All @@ -174,29 +175,29 @@ Feature: Create Application from git form
| https://github.com/sclorg/nodejs-ex.git | nodejs-ex-git-app | nodejs-ex-git |


@regression @manual
@regression @manual @odc-5009
Scenario Outline: Dotnet Builder image detection for git url "<git_url>": A-06-TC13
Given user is at Import from git page
When user enters Git Repo url as "<git_url>"
And warning message "Unable to detect the Builder Image" displays in Builder section
Given user is at Import from Git form
When user enters Git Repo URL as "<git_url>"
And warning message "Unable to detect import strategy" displays
And user clicks on "Show advanced Git options" link
And user clears Context dir field
And user enters Context dir as "<dir_name>"
Then git url "<git_url>" gets Validated
And user is able to see "Builder Image(s) detected" message in Builder section
And user is able to see "Builder Image(s) selected" message
And .NET builder image card tile is highlighted with * mark

Examples:
| git_url | dir_name | app_name | name |
| https://github.com/redhat-developer/s2i-dotnetcore-ex.git | /app | dotnetcore-ex-git-app | dotnetcore-ex-git |


@regression @manual
@regression @manual @odc-5009
Scenario Outline: "Unable to detect the builder image" warning message displays for server related git urls: A-06-TC14
Given user is at Import from git page
When user enters Git Repo url as "<git_url>"
Given user is at Import from Git form
When user enters Git Repo URL as "<git_url>"
Then git url "<git_url>" gets Validated
And user is able to see warning message "Unable to detect the Builder Image" in Builder section
And user is able to see warning message "Unable to detect the import strategy"

Examples:
| git_url | builder_image |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
export const pageTitle = {
Git: 'Import from Git',
ContainerImage: 'Deploy Image',
DockerFile: 'Import from Dockerfile',
YAML: 'Import YAML',
DeveloperCatalog: 'Developer Catalog',
DevFile: 'Import from Devfile',
Pipelines: 'Pipelines',
PipelineBuilder: 'Pipeline builder',
EventSource: 'Event Sources',
Expand Down

0 comments on commit d4d8055

Please sign in to comment.