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

WIP : refactor jenkinsfile with new npm targets #2364

Closed
wants to merge 12 commits into from

Conversation

pranavgore09
Copy link
Contributor

@pranavgore09 pranavgore09 commented Dec 13, 2017

just testing

ToDo

  • create new targets in package.json
  • use those targets from jenkinsfile
  • test if fabric8-ui build thinks that it is using new planner or it is really always using new planner. Do this by following steps
    - make some breaking changes in planner (only integrated setup should fail)
    - clean the cache before running npm run build:prod in fabric8-ui

package.json Outdated
"build-planner": "npm install && npm run build && npm pack dist/",
"unit-test": "npm run test:unit",
"setupFuncTestEnv": "/usr/bin/Xvfb :99 -screen 0 1440x900x24 &",
"func-test": "npm run -s setupFuncTestEnv && cd runtime && export API_URL=https://api.prod-preview.openshift.io/api/ && export NODE_ENV=inmemory && npm install && ./tests/run_functional_tests.sh smokeTest"
Copy link
Member

Choose a reason for hiding this comment

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

Why do you want to export API_URL and use inmemory mode at the same time?
When we set NODE_ENV=inmemory mode, planner uses the mock services. It will ignore the API_URL.
Also, run_functional_tests script always sets NODE_ENV=inmemory mode and then starts the planner. You could write this line as
npm run -s setupFuncTestEnv && cd runtime && npm install && ./tests/run_functional_tests.sh smokeTest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jarifibrahim thanks! now, this is what exactly I am trying to find out.
I am just extracting contents from release.groovy to npm targets. It was mentioned here in https://github.com/fabric8-ui/fabric8-planner/blob/master/deploy/release.groovy#L20
can you please confirm we do not need it this way?
And I am trying your suggestion, let's see.

npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
sh 'npm install'
sh 'npm run build'
sh 'npm pack dist/'
sh 'npm run build-planner'
Copy link
Contributor

Choose a reason for hiding this comment

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

You haven't changed anything but making it more opaque. I do NOT think this is good.

@joshuawilson
Copy link
Contributor

Nothing has changed, only the wording. What is the point?

@pranavgore09
Copy link
Contributor Author

Thanks @joshuawilson for your concern but at this point, I am just trying to learn stuff. nothing else.

"semantic-release": "semantic-release pre && gulp build && cp -r .git dist && npm publish dist/ && semantic-release post"
"semantic-release": "semantic-release pre && gulp build && cp -r .git dist && npm publish dist/ && semantic-release post",
"build-planner": "npm install && npm run build && npm pack dist/",
"unit-test": "npm run test:unit"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between npm run test:unit and npm run unit-test?
They do the same thing but you move away from the standard format of listing the action first. What is the point?

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2364-18 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2364-fabric8-planner.badger.fabric8.io

@fabric8cd
Copy link
Contributor

@pranavgore09 fabric8/fabric8-ui:SNAPSHOT-PR-2364-19 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2364-fabric8-planner.badger.fabric8.io

@debloper
Copy link
Contributor

Filed #2376 which should be a blocker to this PR.

@debloper
Copy link
Contributor

This PR is now obsolete as confirmed with @pranavgore09 over IM.

@debloper debloper closed this Mar 13, 2018
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.

5 participants