Giter VIP home page Giter VIP logo

sn-cicd-integration's Introduction

CICD Server Component

CICD V4 needs this Update-Set to be installed to work.

For CICD V3 please refer to the latest V3 release https://github.com/bmoers/sn-cicd-integration/releases/tag/v1.3.16

To convert this to run under your company namespace run

node_modules/.bin/gulp namespace --name your-name-space

Please note: the namespace must also be set in the CICD_APP_PREFIX env variable (in .env in the sn-cicd project)

sn-cicd-integration's People

Contributors

bmoers avatar g-matharu avatar gitlabbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sn-cicd-integration's Issues

state is not defined.

bug in deployment step "preview"
{"error":{"message":""state" is not defined.","detail":""},"status":"failure"}

Build not triggered on completion of some update sets

When CICD property: Ensure the Application records (sys_app) is in every update set. is enabled, build does not trigger in below cases and the update set moves directly to 'Complete'

  1. Update set is in 'global' scope and all the customer updates are also in 'global' scope
  2. Update set in the scope of an application installed from Store or ServiceNow provided plugin

Deploy update set failed, CD user related

What kind of role should CD user have, already give user 'admin' role:
But got the error, any other role should the CD user have?

[ERROR] [5120]   [/worker#iOhcvYPH1T4d0h9qAAAB] PROMISE JOB ERROR: Job 'deployUpdateSet' { type: 'exe',
  name: 'deployUpdateSet',
  options: { commitId: 'f1b4973c32d8a717375c78a238cac930d7d2dbbe' },
  host: 'svcm27033c79np.dummy.aws.local',
  id: 'cff05f2c-e1f5-489d-91eb-1dd21db7aed0',
  emitter: { _events: {}, _eventsCount: 2 },
  created: 1551139554076,
  completed: null,
  workerId: '/worker#iOhcvYPH1T4d0h9qAAAB',
  result: undefined,
  error: undefined } { error:
   { message:
      'https://[xxxxxxxxxx].service-now.com//api/devops/v1/cicd/pull Request ended in error. Code: 666, Message: Method failed: (//api/devops/v1/cicd/pull) with codetail":"Somethings wrong with the creation of sys_update_set_source. CD User must have admin grants.","message":"Source Creation Failed"},"status":"failure"}',
     detail: '' },
  status: 'failure' }

Did read the code, reach the failed point, user already have admin role.

Any clue for that?

Remote update-set not found error

update set deployment fails with error:

400 - {"error":{"message":"Remote update-set not found with "remote_sys_id" 6a2ddcc4aeaeb9efc39f3e8a2b809548","detail":""},"status":"failure"}.

Is related to /api/devops/cicd/source/sys_update_set.do?SOAP HTTP/1.1 405 Method Not Allowed

Import updateset "CICD Integration.xml", preview failed

Preview error:

  • Cannot commit Update Set 'CICD Integration - 1.1.2' because: Update scope id '733fb769db382f4076d6b94ffe96199f' is different than update set scope id 'global'. Resolve the problem before committing.

  • Could not find a record in sys_scope for column sys_scope referenced in this update

Format of web linking seems to be incorrect

return '<'.concat(self.request.url, '?', queryParams.concat(['sysparm_limit=' + limit, 'sysparm_offset=' + offset]).join('&'), ';rel="', rel, '">');

Hi Boris,

This was noticed when doing a build of an update set containing more than 50 items. The symptom was that some of the script includes were not extracted and committed to the project repo and my debugging found that paging on the build server side stopped at the first page of 50 results.

The sn-cicd/lib/modules/export-update-set.js module calls the snClient getUpdateSetFiles function which sends a request to the CICD Integration application REST resource 'CI - Get UpdateSet Files' , and it calls the CiCdApi script include getUpdateSetFiles function which call _getGrResultStream which calls _createLink to create the next page web linking that the CICD server logic expects (it uses the thlorenz/parse-link-header library) and the format should be e.g.

<https://api.github.com/user/9287/repos?page=3&per_page=100>; rel="next"

But the format returned by the _createLink function is like this (e.g. below) , the issue being that the rel="first" part is inside the > and not after it.

https://myinstance.service-now.com/api/devops/cicd/updateset_files/8daf684edb4d38506c1f0c17f3961969?sysparm_fields=action%2C%20name%2C%20payload%2C%20update_set%2C%20sys_id%2C%20sys_created_by%2C%20sys_updated_by&sysparm_limit=50&sysparm_offset=0;rel="first">,

I believe the simple fix for this is to modify the _createLink function to change the return value so that the rel= part is after the > i.e.

return '<'.concat(self.request.url, '?', queryParams.concat(['sysparm_limit=' + limit, 'sysparm_offset=' + offset]).join('&'), '">', ';rel="', rel);

Thanks and regards,
Chris Devine

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.