-
Notifications
You must be signed in to change notification settings - Fork 593
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate stage artifact deployment from Cloud SDK Pipeline-Lib (#1324)
Co-authored-by: Daniel Kurzynski <[email protected]> Co-authored-by: Florian Geckeler <[email protected]>
- Loading branch information
1 parent
0c6dabb
commit 0b8b6f2
Showing
10 changed files
with
149 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import com.sap.piper.DownloadCacheUtils | ||
import groovy.transform.Field | ||
|
||
import static groovy.json.JsonOutput.toJson | ||
|
||
@Field String STEP_NAME = getClass().getName() | ||
@Field String METADATA_FILE = 'metadata/nexusUpload.yaml' | ||
|
||
//Metadata maintained in file project://resources/metadata/nexusUpload.yaml | ||
|
||
void call(Map parameters = [:]) { | ||
// Replace 'additionalClassifiers' List with JSON encoded String. | ||
// This is currently necessary, since the go code doesn't support complex/arbitrary parameter types. | ||
// TODO: Support complex/structured types of parameters in piper-go | ||
if (parameters.additionalClassifiers) { | ||
parameters.additionalClassifiers = "${toJson(parameters.additionalClassifiers as List)}" | ||
} | ||
parameters = DownloadCacheUtils.injectDownloadCacheInMavenParameters(parameters.script, parameters) | ||
|
||
List credentials = [[type: 'usernamePassword', id: 'nexusCredentialsId', env: ['PIPER_username', 'PIPER_password']]] | ||
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.