Giter VIP home page Giter VIP logo

Comments (27)

makhan7 avatar makhan7 commented on August 20, 2024 2

@bmoers I followed your instructions step by step from here https://github.com/bmoers/sn-cicd-example-v3 and guess what! It works like a charm! I'm very excited! Thank you so much!

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

I believe error gone once I changed the cicd server host name property to http://:8080/run. Code fail if I use that property as https://:4443/run.

Now the new error, I believe my credentials are right, but still couldn't make it to work. The host server throws errors

result: undefined,
error: undefined } Error: no auth mechanism defined

here is the stack trace

PROMISE JOB ERROR: Job 'projectSetup' { type: 'exe',
name: 'projectSetup',
options:
{ build: { requestor: [Object] },
atf: { updateSetOnly: false },
updateSet: '47f69dcddb80330036ff7de03c961925',
application:
{ id: '19190fabdbebd300dfa9b94ffe96193e',
name: 'CICD Integration',
organization: 'company' },
git:
{ repository: 'sn-cicd-example-v3',
remoteUrl: null,
enabled: true,
pullRequestEnabled: true },
host: { name: 'https://dev49044.service-now.com' },
master: { name: 'master', host: [Object] } },
host: 'cala-am02059986',
id: '809aeb98-e8be-4a2b-82d0-c4d75a55b967',
emitter: { domain: null, _events: {}, _eventsCount: 2 },
created: 1551842917634,
completed: null,
workerId: '/worker#pe1wllYEH-yqg6_CAAAD',
result: undefined,
error: undefined } Error: no auth mechanism defined

at Auth.onRequest (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/lib/auth.js:132:32)
at Request.auth (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/request.js:1347:14)
at Request.init (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/request.js:378:10)
at Request.RP$initInterceptor [as init] (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request-promise-core/configure/request2.js:45:29)
at new Request (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/request.js:127:8)
at request (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/index.js:53:10)
at /Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/request/index.js:100:12
at /Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/index.js:115:20
at /Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/index.js:64:16
at tryCatcher (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/node_modules/bluebird/js/release/util.js:16:23)
at /Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/node_modules/bluebird/js/release/method.js:15:34
at run (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/index.js:92:16)
at Object.get (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-rest-client/index.js:215:20)
at Object.getUpdateSetDetails (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-cicd/lib/snClient.js:73:23)
at CICD.getUpdateSetDetails (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-cicd/lib/cicd.js:460:23)
at Promise.try.then (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-cicd/lib/modules/project-setup.js:211:25)
at tryCatcher (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromiseCtx (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/promise.js:606:10)
at Async._drainQueue (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:789:20)
at tryOnImmediate (timers.js:751:5)

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

Are the credentials correct in the .env file?

at Promise.try.then (/Users/madds025/Documents/CICD/sn-cicd-example-v3/node_modules/sn-cicd/lib/modules/project-setup.js:211:25)
the process is using CICD_CI_USER_NAME / PASSWORD to connect to config.host.name

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

Here is the credentials section from my .env file. It has all properties filled (or did I miss any?)
I made those accounts as Admin, just to verify. Source and target have same accounts with same userid/password. Still get error,

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

CREDENTIALS

instance specific credentials can be set like

CICD_[ATF][INSTANCENAME][TEST_USER_NAME]

if not specified the default is used CICD_[ATF]_[TEST_USER_NAME]

CICD_ATF_TEST_USER_NAME=ATF-User
CICD_ATF_TEST_USER_PASSWORD=abc123

example for instance specific credentials

#CICD_ATF_TEST_INSTANCENAME_USER_NAME=
#CICD_ATF_TEST_INSTANCENAME_USER_PASSWORD=

user to load update-set form 'source' and 'master'

CICD_CI_USER_NAME=cd-user
CICD_CI_USER_PASSWORD=abc123

example for instance specific credentials

#CICD_CI_INSTANCENAME_USER_NAME=CI-USER-NAME
#CICD_CI_INSTANCENAME_USER_PASSWORD=

user to deploy update-set to 'target'

CICD_CD_USER_NAME=cd-user
CICD_CD_USER_PASSWORD=abc123

example for instance specific credentials

#CICD_CD_INSTANCENAME_USER_NAME=CD-USER-NAME
#CICD_CD_INSTANCENAME_USER_PASSWORD=

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

any issue with special characters like '-' in the user id?

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

not that I know.
please log information in CICD.prototype.getUpdateSetDetails in node_modules/sn-cicd/lib/cicd.js
especially used here
const client = self.getClient(config);

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

It looks like the Process.env is returning as object but any dotwalk throwing error, where should I troubleshoot this? Should I rename example.env to something else? or could use any name including example.env? Currently its example.env

Here are the log messages, it shows process.env.[key] dotwalk throws undefined. Any idea?

[09:42:06.849] [LOG] [60302] The config update set pulled from config is >>>>>>> 47f69dcddb80330036ff7de03c961925
[09:42:06.850] [LOG] [60302] The Config Host is >>>> [object Object]
[09:42:06.850] [LOG] [60302] The Config Host name is >>>> https://dev49044.service-now.com
[09:42:06.850] [LOG] [60302] The Config self.settings.proxy >>>> [object Object]
[09:42:06.850] [LOG] [60302] The Config username is >>>> undefined
[09:42:06.850] [LOG] [60302] The Config password is >>>> undefined
[09:42:06.851] [LOG] [60302] The Config process.env.CICD_GIT_DELETE_BRANCH_ON_MERGE is >>>> undefined
[09:42:06.851] [LOG] [60302] The Config appPrefix is >>>> undefined
[09:42:06.860] [LOG] [60302] The Client getUpdateSetDetails >>>>>>> [object Promise]

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

I see two example.env files. One at root level -->sn-cicd-examplev3/emaple.env
second sn-cicd-emaplev3/node-modules/sn-cicd/example.env

which one should I be modifying? I have my key values on the first one. Even the case of second one used at runtime, it should still pull your example values like 'Admin' '********' right?

if I had to review process.env file read, where would I be looking?

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

from sn-cicd-example-v3.

makhan7 avatar makhan7 commented on August 20, 2024

I am having similar issues and can join you guys. please let me know if you will be doing go to meeting session @sash1kanth or we can tag up and resolve some of these issues.

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

@makhan7 we could fix some of issues caused due to documentation. Boris I think is working onto fixing few other issues. Please get a fresh copy and let me know your errors. i would help to solve primary issues. I would include you in our next Test call with Boris.

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

For me the basic flow working fine until Git versioning from the source instance.

from sn-cicd-example-v3.

makhan7 avatar makhan7 commented on August 20, 2024

@bmoers @sash1kanth - I am able to spin up localhost:8080 and see the jobs running but don't see any update sets displayed under UpdateSet section. I might missed some credentials in .env file(it could be quick fix). Also, I am able to see my state changing to build when I marked update-sets to complete.

I can share my screen and go over it when you have a min on webex or can share the source code with you guys.

Thanks!

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

Please run npm update in your local copy and have a look at the latest .env example file https://github.com/bmoers/sn-cicd-example-v3/blob/master/example.env

Also make sure you have the latest version 1.3.10 of the CICD Integration app installed
https://github.com/bmoers/sn-cicd-integration

I'll post a new howto next week.

from sn-cicd-example-v3.

makhan7 avatar makhan7 commented on August 20, 2024

Excellent! I've deleted all the old repos and cloned two below urls into one CICD folder.. then ran npm install on the v3
https://github.com/bmoers/sn-cicd-example-v3
https://github.com/bmoers/sn-cicd-integration

looking forward for the how to.

I will update my .env file and let you know the result..

Thank you so much @bmoers for prompt response.

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

@makhan7 @sash1kanth
I have released the latest version of the CICD server today.
You find the latest version of the documentation of this example impl here:
https://github.com/bmoers/sn-cicd-example-v3

Please follow the steps on that page and let me know if you have questions.
I'll add a video asap.

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

@bmoers I tried to checkout latest updates and try to follow new instructions. I couldn't follow these steps as I don't see UI actions on the Application page either by Button or related links

Install the example application
open the App /sys_app.do?sys_id=CICD%20Test%20Application
click on "Build this Application [CICD]"

I could see list of UI actions added, but they don't show up on the form to perform click.
May I know what I miss? Added CICD Test Application update set and committed. But still don't see that build button.

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

The UI actions only show up if you enable it.
Did you follow
https://github.com/bmoers/sn-cicd-example-v3#configure-the-cicd-integration-in-servicenow

  • Show CICD UI action in scoped apps

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

@bmoers Thanks that solved problem. However based on below instructions, you have a Test App to test it out or recommended to create Test Global App and add code underneath. I followed below instructions and clicked on Build this App

Install the example application
open the App /sys_app.do?sys_id=CICD%20Test%20Application
click on "Build this Application [CICD]"

I downloaded above App to Test it out. I clicked 'Build this Application' button

I see a new Update Set created with state 'build' but nothing happened after that. Does that 'Build this Application' UI action expected to trigger everything to move from source to target?

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

I changed update set 'CICD Test Application – 1.0.0' from 'build' to 'Complete', save page refreshes as 'buid' again but no triggering of actions to initiate build process.

Now I create another 'CICD Test Global Application', added one script include.

  1. I don't see [] option on the editor to add code comments
  2. I clicked on Build this Application on the new Global App
  3. System creates new Update Set with state 'build'

Nothing happens after that. No error message nor any process triggered.

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

@bmoers I'm open for a call to run one end-to-end test case.

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

@bmoers got time to run test cases one more time today. Everything worked well until update set complete. Change weren't deployed to Production with the following message

Pull request merged, but not deployment target environment specified.

I verified .env for target instance. Not sure which property controls it?

CICD_CD_DEPLOYMENT_TARGET is that one? I gave it the target instance name but why changes weren't deployed?

from sn-cicd-example-v3.

bmoers avatar bmoers commented on August 20, 2024

@sash1kanth pleas let me know if you need further assistance or if I can close this issue.

CICD_CD_DEPLOYMENT_TARGET is the default target environment. e.g. all update sets of all dev environments will only be deployed to this env.

the recommended way is to use the source-target mapping as below
CICD_CD_DEPLOYMENT_TARGET_DEV12345=dev67890.service-now.com
CICD_CD_DEPLOYMENT_TARGET_DEV67890=devABCD.service-now.com

from sn-cicd-example-v3.

sash1kanth avatar sash1kanth commented on August 20, 2024

Thanks @bmoers , it was my pleasure meeting you in person. We are good on this issue.

from sn-cicd-example-v3.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.