Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ words:
- SLSA
- slsaprovenance
- Snyk
- sonarcloud
- sonarqube
- sonarscanner
- sonarsource
Expand Down
Binary file modified docs/assets/quick-start/add_gitops_repository.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/add_sonar_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/add_sonar_project2.png
Binary file not shown.
Binary file modified docs/assets/quick-start/add_ssh_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/quick-start/analysis-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/applications_stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/applications_tab.png
Binary file not shown.
Binary file modified docs/assets/quick-start/basic-configuration-stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/build-config-stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/change_default_branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/check_organization.png
Binary file not shown.
Binary file modified docs/assets/quick-start/cluster_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/create-environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/create_environment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/create_organization.png
Binary file not shown.
Binary file modified docs/assets/quick-start/define-quality-gates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/deploy_application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/deploy_pipeline_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/disable_autoscan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/dockerhub_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/quick-start/edit-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/edit-pipeline.png
Binary file not shown.
Binary file modified docs/assets/quick-start/edp_portal_login_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/quick-start/edp_portal_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/quick-start/failure_details.png
Diff not rendered.
Binary file modified docs/assets/quick-start/free_plan.png
Binary file modified docs/assets/quick-start/generate_token.png
Binary file modified docs/assets/quick-start/git-project-info-stage.png
Binary file modified docs/assets/quick-start/github_integration.png
Binary file modified docs/assets/quick-start/gitops_section.png
Binary file modified docs/assets/quick-start/go-to-environment.png
Binary file modified docs/assets/quick-start/go_to_source_code.png
Binary file modified docs/assets/quick-start/import_from_github.png
Binary file modified docs/assets/quick-start/integrate_docker.png
Binary file modified docs/assets/quick-start/marketplace_application.png
Binary file modified docs/assets/quick-start/pipeline_configuration.png
Binary file modified docs/assets/quick-start/pipeline_configuration_stage.png
Binary file modified docs/assets/quick-start/pipelinerun_status.png
Binary file added docs/assets/quick-start/previous-version.png
Binary file removed docs/assets/quick-start/previous_version.png
Diff not rendered.
Binary file modified docs/assets/quick-start/pull_request.png
Binary file modified docs/assets/quick-start/review-stage.png
Binary file modified docs/assets/quick-start/review_and_create.png
Diff not rendered.
Binary file modified docs/assets/quick-start/sonar-project-properties.png
Binary file modified docs/assets/quick-start/sonar_org_page.png
Binary file removed docs/assets/quick-start/sonar_step_status.png
Diff not rendered.
Diff not rendered.
Binary file modified docs/assets/quick-start/sonarcloud_project_information.png
Diff not rendered.
Diff not rendered.
Binary file modified docs/assets/quick-start/sonarqube_integrated.png
Binary file modified docs/assets/quick-start/success_notification.png
Binary file modified docs/assets/quick-start/successful_pipeline.png
Binary file modified docs/assets/quick-start/tree_diagram.png
Binary file modified docs/assets/quick-start/trigger_pipeline_run.png
71 changes: 12 additions & 59 deletions docs/quick-start/create-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To create the first application, complete the instructions below:

![Application blank](../assets/quick-start/review-stage.png "Application blank")

7. As soon as the codebase is created, navigate to it via the notification at the bottom left corner or click the **Components** section:
7. As soon as the codebase is created, click the **Open Project** button:

![Marketplace notification](../assets/quick-start/success_notification.png "Marketplace notification")

Expand Down Expand Up @@ -96,38 +96,11 @@ Having created the Go application, proceed to build it by performing the followi

6. Commit and push the `sonar-project.properties` changes to the main branch.

7. Align the Tekton **Pipeline** with SonarCloud.

The `sonarqube-general` Task overwrites `sonar.projectKey` from the pipeline parameter `SONAR_PROJECT_KEY`. The build pipeline often sets `SONAR_PROJECT_KEY` to `$(params.CODEBASE_NAME)` only (for example `my-go-gin-app`). That value must match the **Project key** from SonarCloud **Project Information** (often `<organization-key>_my-go-gin-app`).

Navigate to **KubeRocketCI portal** -> **CI/CD Pipelines** -> **Pipelines**. Search the `github-go-gin-app-build-semver` Pipeline and click on its name. In the top-right corner of the screen, click **Actions** -> **Edit**. Find the task named `sonar` and set its parameters as follows.

Replace the `sonar` task parameter block (or the equivalent fragment) with:

```yaml
- name: sonar
params:
- name: SONAR_PROJECT_KEY
value: "<organization-name>_my-go-gin-app"
- name: SONAR_PROJECT_NAME
value: $(params.CODEBASE_NAME)
- name: branch
value: $(params.git-source-revision)
runAfter:
- build
taskRef:
kind: Task
name: sonarqube-general
workspaces:
- name: source
subPath: source
workspace: shared-workspace
```

Replace `"<organization-name>_my-go-gin-app"` with the **exact Project key** from SonarCloud (quotes keep YAML valid if the key contains characters such as `_`):
7. (Optional) Select the SonarCloud-specific pipeline:

![Sonar project properties](../assets/quick-start/edit-pipeline.png "Sonar project properties")
On the Project details page, select the **Branches tab**, click the actions button and select **Configure**:

![Edit branch](../assets/quick-start/edit-main.png "Edit branch")

:::note
If this Pipeline is managed by Helm or Argo CD, apply the same change in the GitOps manifest or chart values so the cluster object is not reverted on sync.
Expand All @@ -137,39 +110,15 @@ Having created the Go application, proceed to build it by performing the followi
If you use a self-hosted SonarQube instance instead of SonarCloud, follow [SonarQube integration](../operator-guide/code-quality/sonarqube.md); project key rules may differ.
:::

8. Update the `sonarqube-general` **Task** so the SonarCloud availability check does not treat HTTP **307** (redirect on the site root) as failure.

1. Navigate to **KubeRocketCI portal** -> **CI/CD Pipelines** -> **Tasks**.
2. Search the `sonarqube-general` Task and click on its name.
3. In the top-right corner of the screen, click **Actions** -> **Edit**.
4. In the Tekton **Task** named `sonarqube-general`, open the step `prepare-project`.
5. Find the check that requests `${SONAR_HOST_URL}` with `curl` and **replace** the availability logic with a **GET** to `/api/system/status`, for example:

```bash
SONAR_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${SONAR_HOST_URL}/api/system/status") || SONAR_STATUS="503"

if [[ "$SONAR_STATUS" != "200" ]]; then
echo -e "SonarQube is not available\nPlease check the connection to SonarQube"
exit 1
fi
```

Remove or do not use a bare `HEAD`/`GET` against `${SONAR_HOST_URL}` alone without following redirects, as SonarCloud can respond with **307** and the step would exit incorrectly.
In the **Edit** window, select the **github-build-edp-sonarcloud** build Pipeline and click **Apply**:

![Successful pipelinerun](../assets/quick-start/sonarqube_general_task.png "Successful pipelinerun")
![Change build pipeline](../assets/quick-start/change-build-pipeline.png "Change build pipeline")


:::note
Cluster administrators usually patch this Task once per environment. If your platform already ships the `/api/system/status` check, you can skip this step.
:::

9. Ensure **Automatic Analysis** is disabled for this project in SonarCloud when using CI scans (see [Integrate SonarQube](./integrate-sonarcloud.md)).

10. In the Project details page, click **Build**:
8. In the Project details page, click **Build**:

![Triggering pipeline run](../assets/quick-start/trigger_pipeline_run.png "Triggering pipeline run")

11. Open the PipelineRun and wait until it finishes. Many small starter projects pass on the first run:
9. Open the PipelineRun and wait until it finishes. Many small starter projects pass on the first run:

![Pipelinerun logs](../assets/quick-start/pipelinerun_status.png "Pipelinerun logs")

Expand All @@ -179,6 +128,10 @@ Having created the Go application, proceed to build it by performing the followi
After the first analysis, SonarCloud may adjust Quality Gate behavior for the project. If the `sonar` task fails with **Quality Gate failed** even though the scan completed, address the reported issues or review the Quality Gate, then **re-run** the build pipeline. A second run is not always required.
:::

If the pipeline failed, ensure **Automatic Analysis** is disabled for this project in SonarCloud when using CI scans (see [Integrate SonarQube](./integrate-sonarcloud.md)):

![Analysis error](../assets/quick-start/analysis-error.png "Analysis error")

Build pipelines in KubeRocketCI are specifically designed to generate an executable image of an application. Once the build process is complete, the resulting image can be deployed and run in a target environment.

Now that you have successfully built an application, the next step is to create an environment for deployment. In order to deploy the application, you will need to install and integrate Argo CD. To learn how to install and integrate Argo CD, please refer to the [Integrate Argo CD](./integrate-argocd.md) page.
2 changes: 1 addition & 1 deletion docs/quick-start/integrate-sonarcloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To integrate SonarCloud with the platform, follow the steps below:

Set the **Previous** version option and click **Create project**:

![Add new project](../assets/quick-start/add_sonar_project2.png "Add new project")
![Add new project](../assets/quick-start/previous-version.png "Add new project")

6. On the project menu, navigate to **Branches** menu, select `master` branch and rename it to `main`. You can skip this step if the default branch is already `main`:

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
71 changes: 12 additions & 59 deletions versioned_docs/version-3.13/quick-start/create-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To create the first application, complete the instructions below:

![Application blank](../assets/quick-start/review-stage.png "Application blank")

7. As soon as the codebase is created, navigate to it via the notification at the bottom left corner or click the **Components** section:
7. As soon as the codebase is created, click the **Open Project** button:

![Marketplace notification](../assets/quick-start/success_notification.png "Marketplace notification")

Expand Down Expand Up @@ -96,38 +96,11 @@ Having created the Go application, proceed to build it by performing the followi

6. Commit and push the `sonar-project.properties` changes to the main branch.

7. Align the Tekton **Pipeline** with SonarCloud.

The `sonarqube-general` Task overwrites `sonar.projectKey` from the pipeline parameter `SONAR_PROJECT_KEY`. The build pipeline often sets `SONAR_PROJECT_KEY` to `$(params.CODEBASE_NAME)` only (for example `my-go-gin-app`). That value must match the **Project key** from SonarCloud **Project Information** (often `<organization-key>_my-go-gin-app`).

Navigate to **KubeRocketCI portal** -> **CI/CD Pipelines** -> **Pipelines**. Search the `github-go-gin-app-build-semver` Pipeline and click on its name. In the top-right corner of the screen, click **Actions** -> **Edit**. Find the task named `sonar` and set its parameters as follows.

Replace the `sonar` task parameter block (or the equivalent fragment) with:

```yaml
- name: sonar
params:
- name: SONAR_PROJECT_KEY
value: "<organization-name>_my-go-gin-app"
- name: SONAR_PROJECT_NAME
value: $(params.CODEBASE_NAME)
- name: branch
value: $(params.git-source-revision)
runAfter:
- build
taskRef:
kind: Task
name: sonarqube-general
workspaces:
- name: source
subPath: source
workspace: shared-workspace
```

Replace `"<organization-name>_my-go-gin-app"` with the **exact Project key** from SonarCloud (quotes keep YAML valid if the key contains characters such as `_`):
7. (Optional) Select the SonarCloud-specific pipeline:

![Sonar project properties](../assets/quick-start/edit-pipeline.png "Sonar project properties")
On the Project details page, select the **Branches tab**, click the actions button and select **Configure**:

![Edit branch](../assets/quick-start/edit-main.png "Edit branch")

:::note
If this Pipeline is managed by Helm or Argo CD, apply the same change in the GitOps manifest or chart values so the cluster object is not reverted on sync.
Expand All @@ -137,39 +110,15 @@ Having created the Go application, proceed to build it by performing the followi
If you use a self-hosted SonarQube instance instead of SonarCloud, follow [SonarQube integration](../operator-guide/code-quality/sonarqube.md); project key rules may differ.
:::

8. Update the `sonarqube-general` **Task** so the SonarCloud availability check does not treat HTTP **307** (redirect on the site root) as failure.

1. Navigate to **KubeRocketCI portal** -> **CI/CD Pipelines** -> **Tasks**.
2. Search the `sonarqube-general` Task and click on its name.
3. In the top-right corner of the screen, click **Actions** -> **Edit**.
4. In the Tekton **Task** named `sonarqube-general`, open the step `prepare-project`.
5. Find the check that requests `${SONAR_HOST_URL}` with `curl` and **replace** the availability logic with a **GET** to `/api/system/status`, for example:

```bash
SONAR_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${SONAR_HOST_URL}/api/system/status") || SONAR_STATUS="503"

if [[ "$SONAR_STATUS" != "200" ]]; then
echo -e "SonarQube is not available\nPlease check the connection to SonarQube"
exit 1
fi
```

Remove or do not use a bare `HEAD`/`GET` against `${SONAR_HOST_URL}` alone without following redirects, as SonarCloud can respond with **307** and the step would exit incorrectly.
In the **Edit** window, select the **github-build-edp-sonarcloud** build Pipeline and click **Apply**:

![Successful pipelinerun](../assets/quick-start/sonarqube_general_task.png "Successful pipelinerun")
![Change build pipeline](../assets/quick-start/change-build-pipeline.png "Change build pipeline")


:::note
Cluster administrators usually patch this Task once per environment. If your platform already ships the `/api/system/status` check, you can skip this step.
:::

9. Ensure **Automatic Analysis** is disabled for this project in SonarCloud when using CI scans (see [Integrate SonarQube](./integrate-sonarcloud.md)).

10. In the Project details page, click **Build**:
8. In the Project details page, click **Build**:

![Triggering pipeline run](../assets/quick-start/trigger_pipeline_run.png "Triggering pipeline run")

11. Open the PipelineRun and wait until it finishes. Many small starter projects pass on the first run:
9. Open the PipelineRun and wait until it finishes. Many small starter projects pass on the first run:

![Pipelinerun logs](../assets/quick-start/pipelinerun_status.png "Pipelinerun logs")

Expand All @@ -179,6 +128,10 @@ Having created the Go application, proceed to build it by performing the followi
After the first analysis, SonarCloud may adjust Quality Gate behavior for the project. If the `sonar` task fails with **Quality Gate failed** even though the scan completed, address the reported issues or review the Quality Gate, then **re-run** the build pipeline. A second run is not always required.
:::

If the pipeline failed, ensure **Automatic Analysis** is disabled for this project in SonarCloud when using CI scans (see [Integrate SonarQube](./integrate-sonarcloud.md)):

![Analysis error](../assets/quick-start/analysis-error.png "Analysis error")

Build pipelines in KubeRocketCI are specifically designed to generate an executable image of an application. Once the build process is complete, the resulting image can be deployed and run in a target environment.

Now that you have successfully built an application, the next step is to create an environment for deployment. In order to deploy the application, you will need to install and integrate Argo CD. To learn how to install and integrate Argo CD, please refer to the [Integrate Argo CD](./integrate-argocd.md) page.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To integrate SonarCloud with the platform, follow the steps below:

Set the **Previous** version option and click **Create project**:

![Add new project](../assets/quick-start/add_sonar_project2.png "Add new project")
![Add new project](../assets/quick-start/previous-version.png "Add new project")

6. On the project menu, navigate to **Branches** menu, select `master` branch and rename it to `main`. You can skip this step if the default branch is already `main`:

Expand Down
Loading