Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Switched che_version extraction from static master to the source branch #1700

Merged

Conversation

ScrewTSW
Copy link
Member

What does this PR do?

Changed logic for extracting Che version to use the source branch of the PR instead of the master when running prcheck script

What issues does this PR fix or reference?

hotfix - deploying incorrect version of registries for prcheck

How have you tested this PR?

manual testing

@centos-ci
Copy link
Collaborator

@ScrewTSW ScrewTSW force-pushed the hotfix-fix-prcheck-deploy-logic branch from ff864e3 to 970856f Compare November 18, 2019 13:01
@centos-ci
Copy link
Collaborator

@ScrewTSW ScrewTSW force-pushed the hotfix-fix-prcheck-deploy-logic branch from 970856f to 80e3af4 Compare November 18, 2019 13:10
@centos-ci
Copy link
Collaborator

@@ -37,7 +37,7 @@ echo "Installing all dependencies lasted $instal_dep_duration seconds."

export PROJECT_NAMESPACE=prcheck-${RH_PULL_REQUEST_ID}
export DOCKER_IMAGE_TAG="${RH_TAG_DIST_SUFFIX}"-"${RH_PULL_REQUEST_ID}"
CHE_VERSION=$(curl -s https://raw.githubusercontent.com/redhat-developer/rh-che/master/pom.xml | xq -r '.project.parent.version')
CHE_VERSION=$(getVersionFromPom)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does getVersionFromPom work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method is being sourced from .ci/functional_tests_util.sh
it's calling

scl enable rh-maven33 "mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn org.apache.maven.plugins:maven-help-plugin:evaluate -q -Dexpression=project.parent.version -DforceStdout"

to get the version from the pom in the currently checked out branch of the project.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If yq is installed, then xq -r '.project.parent.version' pom.xml could be a replacement as well.

@ibuziuk ibuziuk merged commit 2092f69 into redhat-developer:master Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants