Skip registration for non rhel output

Based on new changes in master the registration step should be skipped if no RHEL output is selected
This commit is contained in:
Karel Hala 2021-06-09 16:12:01 +02:00 committed by Sanne Raymaekers
parent 902480dab4
commit 74f1293773
4 changed files with 5 additions and 5 deletions

View file

@ -152,7 +152,7 @@ const CreateImage = () => {
},
showTitles: true,
title: 'Create image',
crossroads: [ 'target-environment' ],
crossroads: [ 'target-environment', 'release' ],
description: <div>Create a RHEL image and push it to cloud providers. <Button
component="a"
target="_blank"

View file

@ -11,7 +11,7 @@ const ReviewStep = () => {
<TextContent>
<Text component={ TextVariants.small }>
Review the information and click the Create button
to create the image using the following criteria.
to create your image using the following criteria.
</Text>
<Text component={ TextVariants.h3 }>Image output</Text>
<TextList component={ TextListVariants.dl } data-testid='review-image-output'>

View file

@ -9,7 +9,7 @@ export default {
customTitle: <Title headingLevel="h1" size="xl">Target Environment - Microsoft Azure</Title>,
name: 'ms-azure-target-env',
substepOf: 'Target environment',
nextStep: 'registration',
nextStep: ({ values }) => values?.release === 'rhel-8' ? 'registration' : 'packages',
fields: [
{
component: componentTypes.PLAIN_TEXT,

View file

@ -1,4 +1,4 @@
export default ({ 'target-environment': targetEnv } = {}, skipFirst, skipSecond) => {
export default ({ 'target-environment': targetEnv, release } = {}, skipFirst, skipSecond) => {
if (!skipFirst && targetEnv?.aws) {
return 'aws-target-env';
}
@ -11,5 +11,5 @@ export default ({ 'target-environment': targetEnv } = {}, skipFirst, skipSecond)
return 'ms-azure-target-env';
}
return 'registration';
return release === 'rhel-8' ? 'registration' : 'packages';
};