Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Katello npm install to parallel step #1495

Closed

Conversation

johnpmitsch
Copy link
Contributor

and combine react-ui and assets precompile.

Both react tests and assets precompile need the installed npm packages, so we can combine them and install packages before running those tests. This will allow the long-running rails suite to not be blocked by an npm install.

withRVM(["bundle exec npm install"], ruby)
}
dir('katello') {
sh 'npm test'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was an 'npm install' step here, but I removed it as foreman's npm install will install for plugins. I didn't see any additional installation happening for this step in our current runs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, there was this condition:

when {
  expression { fileExists('package.json') }
}

Is this still needed? It seems implied now. If it is still needed, I could use some help on how to add it for just a single action in a step.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

Can npm in the katello directory actually find the npm packages?

dir('foreman') {
withRVM(["bundle exec npm install"], ruby)
}
dir('katello') {
Copy link
Member

Choose a reason for hiding this comment

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

I think you simply omit dir() when you want katello.

and combine react-ui and assets precompile.

Both react tests and assets precompile need the installed npm packages, so we can combine them and install packages before running those tests. This will allow the long-running rails suite to not be blocked by an npm install.
@johnpmitsch
Copy link
Contributor Author

@ekohl thanks, updated to not use directory('katello')

Can npm in the katello directory actually find the npm packages?

I'm not sure I'm understanding the question exactly, but npm install in foreman will install foreman packages in the foreman directory and katello packages in the katello directory, then katello tests kicked with npm test will be able to use packages from either

@ehelms
Copy link
Member

ehelms commented Mar 1, 2021

We have moved the Jenkins job definitions over to https://github.com/theforeman/jenkins-jobs -- please re-open your PR against this new repository.

@johnpmitsch johnpmitsch closed this Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants