Skip to content

Commit

Permalink
feat: add develocity token
Browse files Browse the repository at this point in the history
Signed-off-by: sebastien.heurtematte <[email protected]>
  • Loading branch information
heurtematte authored and fredg02 committed Jan 10, 2025
1 parent a88e2af commit a418e83
Showing 1 changed file with 18 additions and 0 deletions.
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

0 comments on commit a418e83

Please sign in to comment.