Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add welcome message and print actual config #40

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Add welcome message and print configs at application start

### Changed
- Disable yamllint image due to image is not longer maintained

Expand Down
22 changes: 22 additions & 0 deletions vars/deployViaGitops.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void call(Map gitopsConfig) {
// Merge default config with the one passed as parameter
gitopsConfig = mergeMaps(createDefaultConfig(gitopsConfig.k8sVersion as String), gitopsConfig)
if (validateConfig(gitopsConfig)) {
printWelcomeAndConfigs(gitopsConfig)
cesBuildLib = initCesBuildLib(gitopsConfig.cesBuildLibRepo, gitopsConfig.cesBuildLibVersion, gitopsConfig.cesBuildLibCredentialsId)
deploy(gitopsConfig)
}
Expand Down Expand Up @@ -343,6 +344,27 @@ protected String createBuildDescription(String pushedChanges) {
return description
}

private printWelcomeAndConfigs(Map gitopsConfig){

print("""
################################################################################################################

_ _ _ _ _ _ _ _ _
(_) | | | (_) | | | | (_) |
__ _ _| |_ ___ _ __ ___ ______| |__ _ _ _| | __| |______| |_| |__
/ _` | | __/ _ \\| '_ \\/ __|______| '_ \\| | | | | |/ _` |______| | | '_ \\
| (_| | | || (_) | |_) \\__ \\ | |_) | |_| | | | (_| | | | | |_) |
\\__, |_|\\__\\___/| .__/|___/ |_.__/ \\__,_|_|_|\\__,_| |_|_|_.__/
__/ | | |
|___/ |_|

config:
${gitopsConfig.collect { key, value -> " $key: $value" }.join("\n")}

################################################################################################################
""")
}

def cesBuildLib
Deployment deployment
SCMProvider provider