This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How can one create a workspace via command line by importing a CCS project

Other Parts Discussed in Thread: CCSTUDIO

I am attempting to create a multi branch pipeline in Jenkins to do continuous integration of our CCS builds.

In my Jenkinsfile, I would like to use the following line to create a workspace on the fly via importing a valid CCS project that is in the base directory of the new workspace.

C://ti/ccs1020/ccs/eclipse/eclipsec.exe -noSplash -application com.ti.ccstudio.apps.projectImport -data %WORKSPACE% -ccs.location %WORKSPACE%
This is necessary as the Jenkins job will be created in a new folder for every branch of our code repository. Manually creating the workspace for each of these branches would be cumbersome at best. Is this a valid command?
Unfortunately, using the above command line does not work as expected, I get the following:
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
	at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:173)
	at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:57)
	at org.eclipse.core.internal.resources.Project.create(Project.java:266)
	at org.eclipse.core.internal.resources.Project.create(Project.java:252)
	at com.ti.ccstudio.project.core.services.ProjectImporter.internalImportProject(ProjectImporter.java:468)
	at com.ti.ccstudio.project.core.services.ProjectImporter.access$1(ProjectImporter.java:415)
	at com.ti.ccstudio.project.core.services.ProjectImporter$1.run(ProjectImporter.java:377)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
	at com.ti.ccstudio.project.core.services.ProjectImporter.importProject(ProjectImporter.java:375)
	at com.ti.ccstudio.project.core.services.ProjectImporter.importProject(ProjectImporter.java:340)
	at com.ti.ccstudio.apps.internal.project.ProjectImportApp.doRun(ProjectImportApp.java:169)
	at com.ti.ccstudio.apps.internal.BaseHeadlessApp$1.run(BaseHeadlessApp.java:338)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2317)
	at com.ti.ccstudio.apps.internal.BaseHeadlessApp.internalRun(BaseHeadlessApp.java:336)
	at com.ti.ccstudio.apps.internal.BaseHeadlessApp.start(BaseHeadlessApp.java:258)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
  • Hello, If I understand correctly:

    You create a new folder in the filesystem that has a valid CCS project in it. You then wish to use that new folder as a workspace folder and import the project that physically resides in the folder to the workspace.

    Is that correct? If so:

    Wesley C said:
    C://ti/ccs1020/ccs/eclipse/eclipsec.exe -noSplash -application com.ti.ccstudio.apps.projectImport -data %WORKSPACE% -ccs.location %WORKSPACE%

    The above command should work except for the last parameter. -ccs.location needs the path to the project folder itself. So I would expect something like: 

    -ccs.location %WORKSPACE%/myproject

    Please see if that helps.

    Thanks

    ki

  • Thanks Ki,

    I needed to separate the workspace and project as you indicated.

    Regards,

    Wes