Skip to content

Commit ee86aa9

Browse files
OCM-13960 | ci: Add a new paramter : OPENSHIFT_VERSION
1 parent fbc934e commit ee86aa9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/ci/config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type TestConfig struct {
5050
type GlobalENVVariables struct {
5151
ChannelGroup string `env:"CHANNEL_GROUP" default:""`
5252
Version string `env:"VERSION" default:""`
53+
OpenshiftVersion string `env:"OPENSHIFT_VERSION" default:""`
5354
Region string `env:"REGION" default:""`
5455
ProvisionShard string `env:"PROVISION_SHARD" default:""`
5556
NamePrefix string `env:"NAME_PREFIX"`
@@ -122,6 +123,7 @@ func init() {
122123
Test.GlobalENV = &GlobalENVVariables{
123124
ChannelGroup: os.Getenv("CHANNEL_GROUP"),
124125
Version: os.Getenv("VERSION"),
126+
OpenshiftVersion: os.Getenv("OPENSHIFT_VERSION"),
125127
Region: os.Getenv("REGION"),
126128
ProvisionShard: os.Getenv("PROVISION_SHARD"),
127129
NamePrefix: os.Getenv("NAME_PREFIX"),

tests/utils/handler/profile.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,16 @@ func LoadProfileYamlFileByENV() *Profile {
103103
config.Test.GlobalENV.ChannelGroup)
104104
profile.ChannelGroup = config.Test.GlobalENV.ChannelGroup
105105
}
106-
if config.Test.GlobalENV.Version != "" {
107-
log.Logger.Infof("Got global env settings for VERSION, overwritten the profile setting with value %s",
108-
config.Test.GlobalENV.Version)
109-
profile.Version = config.Test.GlobalENV.Version
106+
if config.Test.GlobalENV.Version != "" || config.Test.GlobalENV.OpenshiftVersion != "" {
107+
if config.Test.GlobalENV.Version != "" {
108+
log.Logger.Infof("Got global env settings for VERSION, overwritten the profile setting with value %s",
109+
config.Test.GlobalENV.OpenshiftVersion)
110+
profile.Version = config.Test.GlobalENV.Version
111+
} else {
112+
log.Logger.Infof("Got global env settings for OPENSHIFT_VERSION, overwritten the profile setting with value %s",
113+
config.Test.GlobalENV.Version)
114+
profile.Version = config.Test.GlobalENV.OpenshiftVersion
115+
}
110116
}
111117
if config.Test.GlobalENV.Region != "" {
112118
log.Logger.Infof("Got global env settings for REGION, overwritten the profile setting with value %s",

0 commit comments

Comments
 (0)