on_failure:
<<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
+qa_bitbucket_cloud_task:
+ <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
+ gke_container:
+ <<: *GKE_CONTAINER_TEMPLATE
+ cpu: 2.4
+ memory: 5Gb
+ env:
+ # No need to clone the full history.
+ # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
+ # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
+ CIRRUS_CLONE_DEPTH: 50
+ QA_CATEGORY: BITBUCKET_CLOUD
+ BBC_CLIENT_ID: ENCRYPTED[f1c2c57d5f02885345b3db5776a3b28f5dbcc89723809f73ad05ada903ece9584f1dfe61b026c10eabd72c75d1258bac]
+ BBC_CLIENT_SECRET: ENCRYPTED[39cc89ce4695c243fd688e687879bd473a60882fd30ba8613d6697e5d2b04e2017c68cae3a9a7ed9704f69c52bf229ee]
+ BBC_READ_REPOS_APP_PASSWORD: ENCRYPTED[d33b02d02987e188b5cec2a14f6ddd04d1fcac39ed5d6ced08891fc562ebb6721c9fbf307c0eba81df78c83f75b3c27c]
+ BBC_USERNAME: ENCRYPTED[f0af9be9d2fbaa55fbf69e4fce706ebc9131e0dc22cf8bce5d7ab2e0c2b57aff3ddbf6b3b77166e803a6000276256cea]
+ gradle_cache:
+ folder: ~/.gradle/caches
+ script:
+ - ./private/cirrus/cirrus-qa.sh h2
+ cleanup_before_cache_script:
+ - ./private/cirrus/cleanup-gradle-cache.sh
+ on_failure:
+ <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
+
qa_ha_task:
<<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
gke_container:
Projects.CreateWsResponse.parser());
}
+ /**
+ * This is part of the internal API.
+ * This is a POST request.
+ *
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/import_bitbucketcloud_project">Further information about this action online (including a response example)</a>
+ * @since 8.2
+ */
+ public Projects.CreateWsResponse importBitbucketcloudProject(ImportBitbucketcloudRepoRequest request) {
+ return call(
+ new PostRequest(path("import_bitbucketcloud_repo"))
+ .setParam("almSetting", request.getAlmSetting())
+ .setParam("repositorySlug", request.getRepositorySlug())
+ .setMediaType(MediaTypes.JSON),
+ Projects.CreateWsResponse.parser());
+ }
+
/**
* This is a POST request.
*
AlmIntegrations.SearchBitbucketserverReposWsResponse.parser());
}
+ /**
+ * This is part of the internal API.
+ * This is a GET request.
+ *
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bitbucketcloud_repos">Further information about this action online (including a response example)</a>
+ * @since 8.2
+ */
+ public AlmIntegrations.SearchBitbucketcloudReposWsResponse searchBitbucketcloudRepos(SearchBitbucketcloudReposRequest request) {
+ return call(
+ new GetRequest(path("search_bitbucketcloud_repos"))
+ .setParam("almSetting", request.getAlmSetting())
+ .setMediaType(MediaTypes.JSON),
+ AlmIntegrations.SearchBitbucketcloudReposWsResponse.parser());
+ }
+
/**
* This is part of the internal API.
* This is a POST request.
new PostRequest(path("set_pat"))
.setParam("almSetting", request.getAlmSetting())
.setParam("pat", request.getPat())
+ .setParam("username", request.getUsername())
.setMediaType(MediaTypes.JSON)
).content();
}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.almintegrations;
+
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/import_bitbucketcloud_repo">Further information about this action online (including a response example)</a>
+ * @since 8.2
+ */
+@Generated("sonar-ws-generator")
+public class ImportBitbucketcloudRepoRequest {
+
+ private String almSetting;
+ private String repositorySlug;
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public ImportBitbucketcloudRepoRequest setAlmSetting(String almSetting) {
+ this.almSetting = almSetting;
+ return this;
+ }
+
+ public String getAlmSetting() {
+ return almSetting;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public ImportBitbucketcloudRepoRequest setRepositorySlug(String repositorySlug) {
+ this.repositorySlug = repositorySlug;
+ return this;
+ }
+
+ public String getRepositorySlug() {
+ return repositorySlug;
+ }
+}
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.almintegrations;
+
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_integrations/search_bibucketserver_repos">Further information about this action online (including a response example)</a>
+ * @since 8.2
+ */
+@Generated("sonar-ws-generator")
+public class SearchBitbucketcloudReposRequest {
+
+ private String almSetting;
+ private String projectName;
+ private String repositoryName;
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public SearchBitbucketcloudReposRequest setAlmSetting(String almSetting) {
+ this.almSetting = almSetting;
+ return this;
+ }
+
+ public String getAlmSetting() {
+ return almSetting;
+ }
+
+ /**
+ */
+ public SearchBitbucketcloudReposRequest setProjectName(String projectName) {
+ this.projectName = projectName;
+ return this;
+ }
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ /**
+ */
+ public SearchBitbucketcloudReposRequest setRepositoryName(String repositoryName) {
+ this.repositoryName = repositoryName;
+ return this;
+ }
+
+ public String getRepositoryName() {
+ return repositoryName;
+ }
+}
private String almSetting;
private String pat;
+ private String username;
/**
* This is a mandatory parameter.
public String getPat() {
return pat;
}
+
+ public SetPatRequest setUsername(String username) {
+ this.username = username;
+ return this;
+ }
+
+ public String getUsername() {
+ return username;
+ }
}