cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

ThingWorx DevOps with Jenkins

0% helpful (0/1)

image

ThingWorx DevOps with Jenkins

DevOps as a topic is vast and has been addressed at many times throughout the history of the PTC Community. Previous posts address what DevOps is, teach how to make use of DevOps like a pro,  announce updates to the PTC Git Extension, and explain why this extension is so helpful to achieving continuous Git integration with ThingWorx.

 

This post provides a PDF guide on Jenkins integration with ThingWorx, including tutorials with detailed information on how to setup your ThingWorx instance and how to configure your Jenkins Pipeline. The PDF is listed for download separately, but it is also included in the zip with the other required files for the tutorial. The Jenkins Pipeline provided here is intended as an example / starting point for managing your DevOps in ThingWorx and can easily be extended. Please note that this Pipeline is not officially supported by PTC. 

Comments

I,m trying this pipeline and getting an error in the ImportingApplication service.

2021-02-08 11:34:44.182-0500 [L: ERROR] [O: g.GitBackupTemplate] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-21] org.eclipse.jgit.api.errors.RefNotAdvertisedException: Remote origin did not advertise Ref for branch master. This Ref may not exist in the remote or may be hidden by permission settings._ at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:323)_ at gb.GitBackupTemplate.Pull(GitBackupTemplate.java:280)_ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)_ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)_ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)_ at java.lang.reflect.Method.invoke(Method.java:498)_ at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:230)_ at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:50)_ at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:48)_ at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:7804)_ at com.thingworx.things.Thing.processServiceRequest(Thing.java:7721)_ at com.thingworx.dsl.engine.adapters.VirtualFunction.call(VirtualFunction.java:146)_ at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:45)_ at org.mozilla.javascript.gen.ImportApplication_480._c_script_0(ImportApplication:8)_ at org.mozilla.javascript.gen.ImportApplication_480.call(ImportApplication)_ at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:409)_ at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3566)_ at org.mozilla.javascript.gen.ImportApplication_480.call(ImportApplication)_ at org.mozilla.javascript.gen.ImportApplication_480.exec(ImportApplication)_ at com.thingworx.dsl.engine.DSLProcessor.executeService(DSLProcessor.java:173)_ at com.thingworx.dsl.DSLServiceHandler.processService(DSLServiceHandler.java:37)_ at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:48)_ at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:7804)_ at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:7742)_ at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3255)_ at com.thingworx.webservices.BaseService.service(BaseService.java:479)_ at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:138)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.contenttype.ContentLengthFilter.doFilter(ContentLengthFilter.java:73)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:686)_ at com.thingworx.security.authentication.AuthenticationFilter.authenticate(AuthenticationFilter.java:541)_ at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:241)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)_ at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)_ at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)_ at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:208)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:173)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)_ at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)_ at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)_ at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)_ at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)_ at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)_ at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)_ at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)_ at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)_ at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)_ at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)_ at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)_ at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)_ at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)_ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)_ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)_ at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)_ at java.lang.Thread.run(Thread.java:748)_
2021-02-08 11:34:44.182-0500 [L: ERROR] [O: g.GitBackupTemplate] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-80-exec-21] org.eclipse.jgit.api.errors.RefNotAdvertisedException: Remote origin did not advertise Ref for branch master. This Ref may not exist in the remote or may be hidden by permission settings._ at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:323)_ at gb.GitBackupTemplate.Pull(GitBackupTemplate.java:280)_ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)_ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)_ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)_ at java.lang.reflect.Method.invoke(Method.java:498)_ at com.thingworx.common.processors.ReflectionProcessor.processService(ReflectionProcessor.java:230)_ at com.thingworx.handlers.ReflectionServiceHandler.processService(ReflectionServiceHandler.java:50)_ at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:48)_ at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:7804)_ at com.thingworx.things.Thing.processServiceRequest(Thing.java:7721)_ at com.thingworx.dsl.engine.adapters.VirtualFunction.call(VirtualFunction.java:146)_ at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:45)_ at org.mozilla.javascript.gen.ImportApplication_480._c_script_0(ImportApplication:8)_ at org.mozilla.javascript.gen.ImportApplication_480.call(ImportApplication)_ at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:409)_ at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3566)_ at org.mozilla.javascript.gen.ImportApplication_480.call(ImportApplication)_ at org.mozilla.javascript.gen.ImportApplication_480.exec(ImportApplication)_ at com.thingworx.dsl.engine.DSLProcessor.executeService(DSLProcessor.java:173)_ at com.thingworx.dsl.DSLServiceHandler.processService(DSLServiceHandler.java:37)_ at com.thingworx.handlers.ServiceHandlerBase.processServiceWithMetrics(ServiceHandlerBase.java:48)_ at com.thingworx.things.Thing.processServiceRequestDirect(Thing.java:7804)_ at com.thingworx.things.Thing.processAPIServiceRequest(Thing.java:7742)_ at com.thingworx.webservices.BaseService.handleInvoke(BaseService.java:3255)_ at com.thingworx.webservices.BaseService.service(BaseService.java:479)_ at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.contenttype.ContentTypeFilter.doFilter(ContentTypeFilter.java:138)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.contenttype.ContentLengthFilter.doFilter(ContentLengthFilter.java:73)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.ValidationFilter.doFilter(ValidationFilter.java:22)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.authentication.AuthenticationFilter.propagateRequest(AuthenticationFilter.java:686)_ at com.thingworx.security.authentication.AuthenticationFilter.authenticate(AuthenticationFilter.java:541)_ at com.thingworx.security.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:241)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)_ at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)_ at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)_ at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.ClickjackFilter.doFilter(ClickjackFilter.java:208)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at com.thingworx.security.filter.HttpResponseHeadersFilter.doFilter(HttpResponseHeadersFilter.java:173)_ at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)_ at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)_ at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)_ at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)_ at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)_ at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)_ at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)_ at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)_ at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)_ at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)_ at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)_ at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)_ at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)_ at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)_ at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)_ at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)_ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)_ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)_ at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)_ at java.lang.Thread.run(Thread.java:748)_
Version history
Last update:
‎Aug 26, 2020 12:05 PM
Updated by:
Labels (1)
Attachments