Добавлена публикация стартера
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Struchkov Mark 2024-08-27 19:39:31 +03:00
parent 855c2c0512
commit 2b4ae6a97c
No known key found for this signature in database
GPG Key ID: A3F0AC3F0FA52F3C
2 changed files with 5 additions and 5 deletions

View File

@ -26,6 +26,8 @@ steps:
commands: commands:
- echo "$MAVEN_SETTINGS" >> maven-settings.xml - echo "$MAVEN_SETTINGS" >> maven-settings.xml
- mvn --settings maven-settings.xml -U -P snapshot clean deploy - mvn --settings maven-settings.xml -U -P snapshot clean deploy
- cd gitlab-sdk-spring-boot-starter
- mvn --settings maven-settings.xml -U -P snapshot clean deploy
image_pull_secrets: image_pull_secrets:
- DOCKER_AUTH - DOCKER_AUTH
@ -109,6 +111,6 @@ image_pull_secrets:
# drone sign --save SDK/gitlab-sdk # drone sign --save SDK/gitlab-sdk
--- ---
kind: signature kind: signature
hmac: 40b1cf1fb637bef3db3b5ee8601533a2977c8c5bb170e5e6a835efe9e20ad135 hmac: 8ef322047a285af628c062c970ae0963e04fc2ee843345ef4587cff7f020e7d4
... ...

View File

@ -37,7 +37,6 @@ import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask; import java.util.concurrent.ForkJoinTask;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static dev.struchkov.haiti.context.exception.NotFoundException.notFoundException;
import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResult; import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResult;
import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResults; import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResults;
import static dev.struchkov.sdk.gitlab.core.client.HttpParse.ACCEPT; import static dev.struchkov.sdk.gitlab.core.client.HttpParse.ACCEPT;
@ -52,12 +51,11 @@ public class GitlabSdkManager {
private final GitlabUrl gitlabUrl; private final GitlabUrl gitlabUrl;
private final GitlabProperty gitlabProperty; private final GitlabProperty gitlabProperty;
public PersonJson getAuthPerson() { public Optional<PersonJson> getAuthPerson() {
return HttpParse.request(gitlabUrl.getUser()) return HttpParse.request(gitlabUrl.getUser())
.header(ACCEPT) .header(ACCEPT)
.header(StringUtils.H_PRIVATE_TOKEN, gitlabProperty.getAccessToken()) .header(StringUtils.H_PRIVATE_TOKEN, gitlabProperty.getAccessToken())
.execute(PersonJson.class) .execute(PersonJson.class);
.orElseThrow(notFoundException("Пользователь не найден"));
} }
public Optional<PersonJson> getPersonById(Long userId) { public Optional<PersonJson> getPersonById(Long userId) {