diff --git a/jenkins-create-credentials-token.sh b/jenkins-create-credentials-token.sh index 4061154a4..e216f59d9 100755 --- a/jenkins-create-credentials-token.sh +++ b/jenkins-create-credentials-token.sh @@ -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 } @@ -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 } @@ -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 [domain]\n" "${SCRIPT_NAME}" printf "\t%-20s the name of the project to add credentials to Jenkins (e.g. technology.cbi) \n" "project_name"