Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11f44cc

Browse files
committed
Add integrations
1 parent01faf5a commit11f44cc

File tree

45 files changed

+7303
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7303
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title:"CI integrations for GitOps"
3+
description:""
4+
group:gitops-integrations
5+
toc:true
6+
---
7+
8+
Use Codefresh Hosted GitOps with any popular Continuous Integration (CI) solution, not just with Codefresh CI.
9+
10+
You can connect a third-party CI solution to Codefresh, such as GitHub Actions for example, to take care of common CI tasks such as building/testing/scanning source code, and have Codefresh Hosted GitOps still responsible for the deployment, including image enrichment and reporting.
11+
The integration brings in all the CI information to your images which you can see in the Images dashboard.
12+
13+
See[Image enrichment with GitOps integrations]({{site.baseurl}}/docs/gitops-integrations/image-enrichment-overview/).
14+
15+
##Codefresh image reporting and enrichment action
16+
To support the integration between Codefresh and third-party CI platforms and tools, we have created dedicated actions for supported CI tools in the Codefresh Marketplace. These actions combine image enrichment and reporting through integrations with issue tracking and container registry tools.
17+
18+
>You can also configure the integration directly in the Codefresh UI, as described in[Connect a third-party CI platform/tool to Codefresh](#connect-a-third-party-ci-platformtool-to-codefresh).
19+
20+
21+
Use the action as follows:
22+
23+
1. Create your pipeline with your CI platform/tool as you usually do.
24+
1. Use existing CI actions for compiling code, running unit tests, security scanning etc.
25+
1. Place the final action in the pipeline as the "report image" action provided by Codefresh.
26+
See:
27+
[GitHub Action Codefresh report image](https://github.com/marketplace/actions/codefresh-report-image){:target="\_blank"}
28+
[Codefresh Classic Codefresh report image](https://codefresh.io/steps/step/codefresh-report-image){:target="\_blank"}
29+
1. When the pipeline completes execution, Codefresh retrieves the information on the image that was built and its metadata through the integration names specified (essentially the same data that Codefresh CI would send automatically).
30+
1. View the image in Codefresh's[Images dashboard]({{site.baseurl}}/docs/deployment/images/), and in any[application]({{site.baseurl}}/docs/deployment/applications-dashboard/) in which it is used.
31+
32+
##Connect a third-party CI platform/tool to GitOps
33+
Connecting the CI platform/tool to GitOps from the UI includes configuring the required arguments, and then generating and copying the YAML manifest for the report image to your pipeline.
34+
35+
1. In the Codefresh UI, on the toolbar, click the**Settings** icon, and then from the sidebar, select[**GitOps Integrations**](https://g.codefresh.io/2.0/account-settings/integrations){:target="\_blank"}.
36+
1. Filter by**CI tools**, then select the CI tool and click**Add**.
37+
1. Define the arguments for the CI tool:
38+
[Codefresh Classic]({{site.baseurl}}/docs/gitops-integrations/ci-integrations/codefresh-classic/)
39+
[GitHub Action]({{site.baseurl}}/docs/gitops-integrations/ci-integrations/github-actions/)
40+
[Jenkins]({{site.baseurl}}/docs/gitops-integrations/ci-integrations/jenkins/)
41+
42+
For the complete list of arguments you can use, see[CI integration for GitOps argument reference](#ci-integration-argument-reference) in this article.
43+
44+
1. To generate a YAML snippet with the arguments, on the top-right, click**Generate Manifest**.
45+
Codefresh validates the generated manifest, and alerts you to undefined arguments that are required, and other errors.
46+
47+
{% include image.html
48+
lightbox="true"
49+
file="/images/integrations/generated-manifest-with-error.png"
50+
url="/images/integrations/generated-manifest-with-error.png"
51+
alt="Example of manifest generated for Codefresh Classic with validation errors"
52+
caption="Example of manifest generated for Codefresh Classic with validation errors"
53+
max-width="50%"
54+
%}
55+
56+
{:start="5"}
57+
1. If required, click**Close**, update as needed and generate the manifest again.
58+
1. If there are no validation errors, click**Copy**.
59+
60+
{% include image.html
61+
lightbox="true"
62+
file="/images/integrations/classic/classic-manifest.png"
63+
url="/images/integrationsclassic/classic-manifest.png"
64+
alt="Example of manifest generated for Codefresh Classic"
65+
caption="Example of manifest generated for Codefresh Classic"
66+
max-width="50%"
67+
%}
68+
69+
{:start="6"}
70+
1. Paste the copied manifest as the last step in your CI pipeline.
71+
72+
###CI integration argument reference
73+
The table describes_all_ the arguments required for CI integrations in general. The actual arguments required, differs according to the CI integration tool.
74+
75+
{: .table .table-bordered .table-hover}
76+
| Argument| Description| Required/Optional/Default|
77+
| ----------| --------| -------------------------|
78+
|`CF_HOST`|_Deprecated from v 0.0.460 and higher._ Recommend using`CF_RUNTIME_NAME` instead. {::nomarkdown}<br><spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_HOST</span> has been deprecated because the URL is not static, and any change can fail the enrichment.<br><br> The URL to the cluster with the Codefresh runtime to integrate with. If you have more than one runtime, select the runtime from the list. Codefresh displays the URL of the selected runtime cluster.{:/}|_Deprecated_|
79+
|`CF_RUNTIME_NAME`| The runtime to use for the integration. If you have more than one runtime, select the runtime from the list.| Required|
80+
|`CF_PLATFORM_URL`| The root URL of the Codefresh application. The default value is`https://g.codefresh.io`.| Optional|
81+
|`CF_API_KEY`| The API key for authentication. Generate the key for the integration.| Required|
82+
|`CF_CONTAINER_REGISTRY_INTEGRATION`| The name of the container registry integration created in Codefresh where the image is stored. See[Container registry integrations]({{site.baseurl}}/docs/gitops-integrations/container-registries/).| Optional|
83+
|`CF_JIRA_INTEGRATION` |_Deprecated from version 0.0.565 and higher._ Replaced by`CF_ISSUE_TRACKING_INTEGRATION`. |_Deprecated_
84+
|`CF_ISSUE_TRACKING_INTEGRATION`| The name of the issue tracking integration created in Codefresh to use for image enrichment. Relevant only if Jira enrichment is required for the image. If you don't have a Jira integration, click**Create Atlassian Jira Integration** and configure settings. See[Jira integration]({{site.baseurl}}/docs/gitops-integrations/issue-tracking/jira/).| Optional|
85+
|`CF_IMAGE`| The image to be enriched and reported in Codefresh. Pass the`[account-name]/[image-name]:[tag]` built in your CI.| Required|
86+
|`CF_WORKFLOW_NAME`| The name assigned to the workflow that builds the image. When defined, the name is displayed in the Codefresh platform. Example,`Staging step`| Optional|
87+
|`CF_GIT_BRANCH`| The Git branch with the commit and PR (pull request) data to add to the image. Pass the Branch from the event payload used to trigger your action.| Required|
88+
|`CF_GIT_REPO`| The Git repository with the configuration and code used to build the image. {::nomarkdown} <ul><li>Optional for GitHub Actions. <li>Required for Classic and Jenkins.</li><ul>{:/}| Required|
89+
| `CF_GIT_PROVIDER` | The Git provider for the integration, and can be either `github`, `gitlab`, or `bitbucket`. {::nomarkdown} <ul><li>Optional when you don't define other related Git provider arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. <li>Required when you define at least one of the Git provider arguments. For example, when you define <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_GITLAB_TOKEN</span>, then you <i>must</i> define all Git provider arguments, in this case, <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_GIT_PROVIDER</span> as <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">gitlab</span>, and <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_GITLAB_HOST_URL</span>.</li><ul>{:/}| Optional |
90+
|`CF_GITLAB_TOKEN`| The token to authenticate the GitLab account. {::nomarkdown} <ul><li>Optional when you don't define any GitLab-specific arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. <li>Required when you define at least one of the GitLab-specific arguments, such as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GIT_PROVIDER</span> as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">gitlab</span>, or <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GITLAB_HOST_URL</span>.</li><ul>{:/}| Optional|
91+
|`CF_GITLAB_HOST_URL`| The URL address of your GitLab Cloud/Server instance. {::nomarkdown} <ul><li>Optional when you don't define other related GitLab-specific arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. <li>Required when you define at least one of the GitLab-specific arguments, such as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GIT_PROVIDER</span> as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">gitlab</span>, or <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GITLAB_TOKEN</span>.</li><ul>{:/}| Optional|
92+
|`CF_BITBUCKET_USERNAME`| The username for the Bitbucket or the Bitbucket Server (on-prem) account. {::nomarkdown}<ul><li>Optional when you don't define other related Bitbucket-specific arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. <li>Required when you define at least one of the Bitbucket-specific arguments, such as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GIT_PROVIDER</span> as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">bitbucket</span>, <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_BITBUCKET_PASSWORD</span> or <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_BITBUCKET_HOST_URL</span>.</li><ul>{:/}| Optional|
93+
|`CF_BITBUCKET_PASSWORD`| The password for the Bitbucket or the BitBucket Server (on-prem) account. {::nomarkdown} <ul><li>Optional when you don't define other related Bitbucket-specific arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. <li>Required when you define at least one of the Bitbucket-specific arguments, such as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_GIT_PROVIDER</span> as <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">bitbucket</span>, <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_BITBUCKET_USERNAME</span>, or <spanstyle="font-family:var(--font-family-monospace);font-size:87.5%;color:#ad6800;background-color:#fffbe6">CF_BITBUCKET_HOST_URL</span>.</li><ul>{:/}| Optional|
94+
| `CF_BITBUCKET_HOST_URL` | Relevant for Bitbucket Server accounts only. The URL address of your Bitbucket Server instance. Example, `https://bitbucket-server:7990`. {::nomarkdown}<ul><li>Optional when you don't define other related Bitbucket Server-specific arguments. When not defined, Codefresh retrieves the required information from the runtime selected for the integration. </li><li>Required when you define at least one of the Bitbucket Server-specific arguments, such as <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_GIT_PROVIDER</span> as <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">bitbucket</span>, <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_BITBUCKET_USERNAME</span> or <span style="font-family: var(--font-family-monospace); font-size: 87.5%; color: #ad6800; background-color: #fffbe6">CF_BITBUCKET_PASSWORD</span>.</li></ul>{:/} | Optional |
95+
|`CF_JIRA_PROJECT_PREFIX`| Relevant only when`CF_ISSUE_TRACKING_INTEGRATION` is defined. The Jira project prefix that identifies the ticket number to use.| Required|
96+
|`CF_JIRA_MESSAGE`| Relevant only when`CF_ISSUE_TRACKING_INTEGRATION` is defined. The Jira issue IDs matching the string to associate with the image.| Required|
97+
|`CF_JIRA_FAIL_ON_NOT_FOUND`| Relevant only when`CF_ISSUE_TRACKING_INTEGRATION` is defined. The report image action when the`CF_JIRA_MESSAGE` is not found. When set to`true`, the report image action is failed.| Required|
98+
99+
##Related articles
100+
[Container registry GitOps integrations]({{site.baseurl}}/docs/gitops-integrations/container-registries/)
101+
[Issue tracking GitOps intergrations]({{site.baseurl}}/docs/gitops-integrations/issue-tracking/)
102+
103+
104+
105+
106+
107+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp