From c8e9e44f23af313615221bb00bbc3a5b04053976 Mon Sep 17 00:00:00 2001 From: Christian Luttenberger <42861202+bluesbrother84@users.noreply.github.com> Date: Tue, 23 Feb 2021 11:11:52 +0100 Subject: [PATCH] New pipeline step assembly confirm (#2631) * Add new pipeline step * new pipeline stage * Cleanup Test * Adding new step to pipeline - stage publish * Move from Publish to Build * Adjusting documentation for move from publish to build * Change Release with Confirm Step in Build Stage * codeclimate * Code Climate * Code Climate spaces Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com> --- cmd/abapEnvironmentAssembleConfirm_test.go | 13 ------------- .../docs/pipelines/abapEnvironment/configuration.md | 2 +- .../docs/pipelines/abapEnvironment/introduction.md | 2 +- .../docs/pipelines/abapEnvironment/stages/build.md | 1 + vars/abapEnvironmentPipelineStageBuild.groovy | 2 ++ 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/cmd/abapEnvironmentAssembleConfirm_test.go b/cmd/abapEnvironmentAssembleConfirm_test.go index 225e7e283..ac6f5cd97 100644 --- a/cmd/abapEnvironmentAssembleConfirm_test.go +++ b/cmd/abapEnvironmentAssembleConfirm_test.go @@ -6,22 +6,9 @@ import ( abapbuild "github.com/SAP/jenkins-library/pkg/abap/build" "github.com/SAP/jenkins-library/pkg/abaputils" - piperhttp "github.com/SAP/jenkins-library/pkg/http" "github.com/stretchr/testify/assert" ) -func testSetupConfirm(client piperhttp.Sender, buildID string) abapbuild.Build { - conn := new(abapbuild.Connector) - conn.Client = client - conn.DownloadClient = &abapbuild.DownloadClientMock{} - conn.Header = make(map[string][]string) - b := abapbuild.Build{ - Connector: *conn, - BuildID: buildID, - } - return b -} - func TestStartingConfirm(t *testing.T) { t.Run("Run starting", func(t *testing.T) { client := &abapbuild.ClMock{ diff --git a/documentation/docs/pipelines/abapEnvironment/configuration.md b/documentation/docs/pipelines/abapEnvironment/configuration.md index 71e190dc1..6fd6cdd08 100644 --- a/documentation/docs/pipelines/abapEnvironment/configuration.md +++ b/documentation/docs/pipelines/abapEnvironment/configuration.md @@ -12,7 +12,7 @@ You can have a look at different pipeline configurations in our [SAP-samples rep | [Prepare System](stages/prepareSystem.md) | [abapEnvironmentCreateSystem](https://sap.github.io/jenkins-library/steps/abapEnvironmentCreateSystem/), [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/)| | [Clone Repositories](stages/cloneRepositories.md) | [abapEnvironmentPullGitRepo](https://sap.github.io/jenkins-library/steps/abapEnvironmentPullGitRepo/)| | [ATC](stages/ATC.md) | [abapEnvironmentRunATCCheck](https://sap.github.io/jenkins-library/steps/abapEnvironmentRunATCCheck/)| -| [Build](stages/build.md) | [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/), [abapAddonAssemblyKitReserveNextPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReserveNextPackages/), [abapEnvironmentAssemblePackages](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssemblePackages/), [abapAddonAssemblyKitRegisterPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitRegisterPackages/), [abapAddonAssemblyKitReleasePackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReleasePackages/), [abapAddonAssemblyKitCreateTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitCreateTargetVector/), [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| +| [Build](stages/build.md) | [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/), [abapAddonAssemblyKitReserveNextPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReserveNextPackages/), [abapEnvironmentAssemblePackages](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssemblePackages/), [abapAddonAssemblyKitRegisterPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitRegisterPackages/), [abapEnvironmentAssembleConfirm](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssembleConfirm/), [abapAddonAssemblyKitReleasePackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReleasePackages/), [abapAddonAssemblyKitCreateTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitCreateTargetVector/), [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| | [Integration Tests](stages/integrationTest.md) | [cloudFoundryCreateService](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateService/)| | [Confirm](stages/confirm.md) | - | | [Publish](stages/publish.md) | [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| diff --git a/documentation/docs/pipelines/abapEnvironment/introduction.md b/documentation/docs/pipelines/abapEnvironment/introduction.md index 748050461..7b6ad829a 100644 --- a/documentation/docs/pipelines/abapEnvironment/introduction.md +++ b/documentation/docs/pipelines/abapEnvironment/introduction.md @@ -43,7 +43,7 @@ The following stages and steps are part of the pipeline: | [Prepare System](stages/prepareSystem.md) | [abapEnvironmentCreateSystem](https://sap.github.io/jenkins-library/steps/abapEnvironmentCreateSystem/), [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/)| | [Clone Repositories](stages/cloneRepositories.md) | [abapEnvironmentPullGitRepo](https://sap.github.io/jenkins-library/steps/abapEnvironmentPullGitRepo/)| | [ATC](stages/ATC.md) | [abapEnvironmentRunATCCheck](https://sap.github.io/jenkins-library/steps/abapEnvironmentRunATCCheck/)| -| [Build](stages/build.md) | [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/), [abapAddonAssemblyKitReserveNextPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReserveNextPackages/), [abapEnvironmentAssemblePackages](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssemblePackages/), [abapAddonAssemblyKitRegisterPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitRegisterPackages/), [abapAddonAssemblyKitReleasePackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReleasePackages/), [abapAddonAssemblyKitCreateTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitCreateTargetVector/), [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| +| [Build](stages/build.md) | [cloudFoundryCreateServiceKey](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateServiceKey/), [abapAddonAssemblyKitReserveNextPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReserveNextPackages/), [abapEnvironmentAssemblePackages](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssemblePackages/), [abapAddonAssemblyKitRegisterPackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitRegisterPackages/), [abapEnvironmentAssembleConfirm](https://sap.github.io/jenkins-library/steps/abapEnvironmentAssembleConfirm/), [abapAddonAssemblyKitReleasePackages](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitReleasePackages/), [abapAddonAssemblyKitCreateTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitCreateTargetVector/), [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| | [Integration Tests](stages/integrationTest.md) | [cloudFoundryCreateService](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateService/)| | [Confirm](stages/confirm.md) | - | | [Publish](stages/publish.md) | [abapAddonAssemblyKitPublishTargetVector](https://sap.github.io/jenkins-library/steps/abapAddonAssemblyKitPublishTargetVector/)| diff --git a/documentation/docs/pipelines/abapEnvironment/stages/build.md b/documentation/docs/pipelines/abapEnvironment/stages/build.md index 6d27972f9..5fa86fbdd 100644 --- a/documentation/docs/pipelines/abapEnvironment/stages/build.md +++ b/documentation/docs/pipelines/abapEnvironment/stages/build.md @@ -10,6 +10,7 @@ The following steps are executed in this stage: - [abapAddonAssemblyKitReserveNextPackages](../../../steps/abapAddonAssemblyKitReserveNextPackages.md) - [abapEnvironmentAssemblePackages](../../../steps/abapEnvironmentAssemblePackages.md) - [abapAddonAssemblyKitRegisterPackages](../../../steps/abapAddonAssemblyKitRegisterPackages.md) +- [abapEnvironmentAssembleConfirm](../../../steps/abapEnvironmentAssembleConfirm.md) - [abapAddonAssemblyKitReleasePackages](../../../steps/abapAddonAssemblyKitReleasePackages.md) - [abapAddonAssemblyKitCreateTargetVector](../../../steps/abapAddonAssemblyKitCreateTargetVector.md) - [abapAddonAssemblyKitPublishTargetVector](../../../steps/abapAddonAssemblyKitPublishTargetVector.md) diff --git a/vars/abapEnvironmentPipelineStageBuild.groovy b/vars/abapEnvironmentPipelineStageBuild.groovy index 8606030c2..222392675 100644 --- a/vars/abapEnvironmentPipelineStageBuild.groovy +++ b/vars/abapEnvironmentPipelineStageBuild.groovy @@ -10,6 +10,7 @@ import static com.sap.piper.Prerequisites.checkScript 'abapAddonAssemblyKitReserveNextPackages', 'abapEnvironmentAssemblePackages', 'abapAddonAssemblyKitRegisterPackages', + 'abapEnvironmentAssembleConfirm', 'abapAddonAssemblyKitReleasePackages', 'abapAddonAssemblyKitCreateTargetVector', 'abapAddonAssemblyKitPublishTargetVector' @@ -28,6 +29,7 @@ void call(Map parameters = [:]) { abapAddonAssemblyKitReserveNextPackages script: parameters.script abapEnvironmentAssemblePackages script: parameters.script abapAddonAssemblyKitRegisterPackages script: parameters.script + abapEnvironmentAssembleConfirm script: parameters.script abapAddonAssemblyKitReleasePackages script: parameters.script abapAddonAssemblyKitCreateTargetVector script: parameters.script abapAddonAssemblyKitPublishTargetVector(script: parameters.script, targetVectorScope: 'T')