You've already forked sap-jenkins-library
							
							
				mirror of
				https://github.com/SAP/jenkins-library.git
				synced 2025-10-30 23:57:50 +02:00 
			
		
		
		
	Implement Release 3.0.0 of CM-Client (#3664)
* Remove --backend-type * Delete CTS in isChangeDevelopment and change Dockerimage of CM-Client * fix groovy unit tests * another fix of groovy unit tests * try to fix import of fork for Jenkins-Testing * add workflow to create Go Binary for Jenkins-Server * Change RepoOwner to test in Fork * remove previous changes * adjust docker image for TransportRequestCreate and Release * Remove CTS from Documentation Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
This commit is contained in:
		| @@ -2,10 +2,11 @@ package cmd | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"strings" | ||||
|  | ||||
| 	"github.com/SAP/jenkins-library/pkg/command" | ||||
| 	"github.com/SAP/jenkins-library/pkg/log" | ||||
| 	"github.com/SAP/jenkins-library/pkg/telemetry" | ||||
| 	"strings" | ||||
| ) | ||||
|  | ||||
| type isChangeInDevelopmentUtils interface { | ||||
| @@ -92,7 +93,6 @@ func perform(config *isChangeInDevelopmentOptions, utils isChangeInDevelopmentUt | ||||
| 		"--endpoint", config.Endpoint, | ||||
| 		"--user", config.Username, | ||||
| 		"--password", config.Password, | ||||
| 		"--backend-type", "SOLMAN", | ||||
| 		"is-change-in-development", | ||||
| 		"--change-id", config.ChangeDocumentID, | ||||
| 		"--return-code") | ||||
|   | ||||
| @@ -248,7 +248,7 @@ func isChangeInDevelopmentMetadata() config.StepData { | ||||
| 				}, | ||||
| 			}, | ||||
| 			Containers: []config.Container{ | ||||
| 				{Name: "cmclient", Image: "ppiper/cm-client"}, | ||||
| 				{Name: "cmclient", Image: "ppiper/cm-client:3.0.0.0"}, | ||||
| 			}, | ||||
| 			Outputs: config.StepOutputs{ | ||||
| 				Resources: []config.StepResources{ | ||||
|   | ||||
| @@ -2,9 +2,10 @@ package cmd | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/SAP/jenkins-library/pkg/mock" | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| 	"testing" | ||||
| ) | ||||
|  | ||||
| type isChangeInDevelopmentMockUtils struct { | ||||
| @@ -37,7 +38,6 @@ func TestRunIsChangeInDevelopment(t *testing.T) { | ||||
| 			"--endpoint", "https://example.org/cm", | ||||
| 			"--user", "me", | ||||
| 			"--password", "****", | ||||
| 			"--backend-type", "SOLMAN", | ||||
| 			"is-change-in-development", | ||||
| 			"--change-id", "12345678", | ||||
| 			"--return-code", | ||||
|   | ||||
| @@ -288,7 +288,7 @@ func transportRequestUploadSOLMANMetadata() config.StepData { | ||||
| 				}, | ||||
| 			}, | ||||
| 			Containers: []config.Container{ | ||||
| 				{Name: "cmclient", Image: "ppiper/cm-client"}, | ||||
| 				{Name: "cmclient", Image: "ppiper/cm-client:3.0.0.0"}, | ||||
| 			}, | ||||
| 			Outputs: config.StepOutputs{ | ||||
| 				Resources: []config.StepResources{ | ||||
|   | ||||
| @@ -26,7 +26,7 @@ general: | ||||
| # new naming convention | ||||
| steps: | ||||
|   isChangeInDevelopment: | ||||
|     dockerImage: 'ppiper/cm-client' | ||||
|     dockerImage: 'ppiper/cm-client:3.0.0.0' | ||||
| ``` | ||||
|  | ||||
| **Note:** The new step does not comprise the retrieval of the change document ID from the Git repository anymore. Use the step [transportRequestDocIDFromGit](transportRequestDocIDFromGit.md) instead. | ||||
|   | ||||
| @@ -57,10 +57,10 @@ general: | ||||
|  | ||||
| steps: | ||||
|   isChangeInDevelopment: | ||||
|     dockerImage: 'ppiper/cm-client' | ||||
|     dockerImage: 'ppiper/cm-client:3.0.0.0' | ||||
|  | ||||
|   transportRequestUploadSOLMAN: | ||||
|     dockerImage: 'ppiper/cm-client' | ||||
|     dockerImage: 'ppiper/cm-client:3.0.0.0' | ||||
|     applicationId: 'APPID', | ||||
|     filePath: '/path/file.ext', | ||||
| ``` | ||||
|   | ||||
| @@ -13,7 +13,7 @@ | ||||
|  | ||||
| The Change Management Client (CM Client) handles the access to SAP Solution Manager. | ||||
| The CM Client is a software running under Linux, which can initiate basic change management tasks | ||||
| in the Solution Manager as well as in the CTS. The client is used by default | ||||
| in the Solution Manager. The client is used by default | ||||
| as a [Docker image](https://hub.docker.com/r/ppiper/cm-client), | ||||
| but can also be installed as a [command line tool](https://github.com/SAP/devops-cm-client). | ||||
|  | ||||
|   | ||||
| @@ -11,7 +11,7 @@ type Exec interface { | ||||
| 	GetExitCode() int | ||||
| } | ||||
|  | ||||
| // Connection Everything we need for connecting to CTS | ||||
| // Connection Everything we need for connecting to Solution Manager | ||||
| type Connection struct { | ||||
| 	Endpoint string | ||||
| 	User     string | ||||
|   | ||||
| @@ -83,7 +83,6 @@ func (a *CreateAction) Perform(command Exec) (string, error) { | ||||
| 			"--endpoint", a.Connection.Endpoint, | ||||
| 			"--user", a.Connection.User, | ||||
| 			"--password", a.Connection.Password, | ||||
| 			"--backend-type", "SOLMAN", | ||||
| 			"create-transport", | ||||
| 			"-cID", a.ChangeDocumentID, | ||||
| 			"-dID", a.DevelopmentSystemID, | ||||
|   | ||||
| @@ -36,7 +36,6 @@ func TestSolmanCreateTransportRequest(t *testing.T) { | ||||
| 					"--endpoint", "https://example.org/solman", | ||||
| 					"--user", "me", | ||||
| 					"--password", "******", | ||||
| 					"--backend-type", "SOLMAN", | ||||
| 					"create-transport", | ||||
| 					"-cID", "123", | ||||
| 					"-dID", "XXX~EXT_SRV", | ||||
|   | ||||
| @@ -103,7 +103,6 @@ func (a *UploadAction) Perform(fs FileSystem, command Exec) error { | ||||
| 			"--endpoint", a.Connection.Endpoint, | ||||
| 			"--user", a.Connection.User, | ||||
| 			"--password", a.Connection.Password, | ||||
| 			"--backend-type", "SOLMAN", | ||||
| 			"upload-file-to-transport", | ||||
| 			"-cID", a.ChangeDocumentID, | ||||
| 			"-tID", a.TransportRequestID, | ||||
|   | ||||
| @@ -50,7 +50,6 @@ func TestSolmanUpload(t *testing.T) { | ||||
| 					"--endpoint", "https://example.org/solman", | ||||
| 					"--user", "me", | ||||
| 					"--password", "******", | ||||
| 					"--backend-type", "SOLMAN", | ||||
| 					"upload-file-to-transport", | ||||
| 					"-cID", "123456", | ||||
| 					"-tID", "000K11111111", | ||||
|   | ||||
| @@ -19,7 +19,7 @@ general: | ||||
|       format: '%b' | ||||
|     solman: | ||||
|       docker: | ||||
|         image: 'ppiper/cm-client' | ||||
|         image: 'ppiper/cm-client:2.0.1.0' | ||||
|         options: [] | ||||
|         envVars: {} | ||||
|         pullImage: true | ||||
| @@ -37,7 +37,7 @@ general: | ||||
|         envVars: {} | ||||
|         pullImage: true | ||||
|       docker: | ||||
|         image: 'ppiper/cm-client' | ||||
|         image: 'ppiper/cm-client:2.0.1.0' | ||||
|         options: [] | ||||
|         envVars: {} | ||||
|         pullImage: true | ||||
|   | ||||
| @@ -85,4 +85,4 @@ spec: | ||||
|             type: bool | ||||
|   containers: | ||||
|     - name: cmclient | ||||
|       image: ppiper/cm-client | ||||
|       image: ppiper/cm-client:3.0.0.0 | ||||
|   | ||||
| @@ -112,4 +112,4 @@ spec: | ||||
|           - name: custom/transportRequestId | ||||
|   containers: | ||||
|     - name: cmclient | ||||
|       image: ppiper/cm-client | ||||
|       image: ppiper/cm-client:3.0.0.0 | ||||
|   | ||||
| @@ -150,7 +150,7 @@ public class TransportRequestCreateTest extends BasePiperTest { | ||||
|         assert nullScript.commonPipelineEnvironment.getValue('transportRequestId') == '001' | ||||
|         assert result == [ | ||||
|                          docker: [ | ||||
|                              image: 'ppiper/cm-client', | ||||
|                              image: 'ppiper/cm-client:2.0.1.0', | ||||
|                              pullImage: true, | ||||
|                              options: [], | ||||
|                              envVars: [:], | ||||
| @@ -202,7 +202,7 @@ public class TransportRequestCreateTest extends BasePiperTest { | ||||
|         assert nullScript.commonPipelineEnvironment.getValue('transportRequestId') == '001' | ||||
|         assert result == [ | ||||
|                          docker: [ | ||||
|                              image: 'ppiper/cm-client', | ||||
|                              image: 'ppiper/cm-client:2.0.1.0', | ||||
|                              pullImage: true, | ||||
|                              envVars: [:], | ||||
|                              options: [], | ||||
|   | ||||
| @@ -262,7 +262,7 @@ public class TransportRequestReleaseTest extends BasePiperTest { | ||||
|  | ||||
|         assert receivedParameters == [ | ||||
|                     docker: [ | ||||
|                         image:'ppiper/cm-client', | ||||
|                         image:'ppiper/cm-client:2.0.1.0', | ||||
|                         options:[], | ||||
|                         envVars:[:], | ||||
|                         pullImage:true, | ||||
| @@ -412,7 +412,7 @@ public class TransportRequestReleaseTest extends BasePiperTest { | ||||
|  | ||||
|         assert receivedParams == [ | ||||
|                                   docker: [ | ||||
|                                       image: 'ppiper/cm-client', | ||||
|                                       image: 'ppiper/cm-client:2.0.1.0', | ||||
|                                       pullImage: true, | ||||
|                                       envVars: [:], | ||||
|                                       options: [], | ||||
|   | ||||
		Reference in New Issue
	
	Block a user