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 develocity token #423

Merged
merged 1 commit into from
Jan 10, 2025
Merged
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
18 changes: 18 additions & 0 deletions jenkins-create-credentials-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ help() {
printf "npmjs\t\t\tCreate npmjs credentials (secret text/token).\n"
printf "pypi\t\t\tCreate pypi credentials (secret text/token).\n"
printf "matrix\t\t\tCreate matrix credentials (secret text/token).\n"
printf "develocity\t\t\tCreate develocity credentials (secret text/token).\n"
exit 0
}

Expand Down Expand Up @@ -271,6 +272,12 @@ auto() {
else
echo " No API token found."
fi
echo "Checking for develocity.eclipse.org API token..."
if passw cbi "bots/${project_name}/develocity.eclipse.org/api-token" 2&> /dev/null; then
develocity "${project_name}"
else
echo " No API token found."
fi

#sonarcloud is excluded for now due to possible suffixes
}
Expand Down Expand Up @@ -399,6 +406,17 @@ matrix() {
_create_string_credentials "${project_name}" "matrix-token" "matrix.eclipse.org token" "${token}"
}

develocity() {
local project_name="${1:-}"

_verify_inputs "${project_name}"

local token
token="$(passw cbi "bots/${project_name}/develocity.eclipse.org/api-token")"

_create_string_credentials "${project_name}" "develocity-token" "develocity.eclipse.org token" "${token}"
}

_default_usage() {
printf "%s <project_name> <secret_id> <secret_description> <secret> [domain]\n" "${SCRIPT_NAME}"
printf "\t%-20s the name of the project to add credentials to Jenkins (e.g. technology.cbi) \n" "project_name"
Expand Down
Loading