-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): Adding Github actions info (#3495)
* feat(frontend): Adding Github actions info * feat(frontend): adding constant * fixing messaging
- Loading branch information
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
web/src/components/RunDetailAutomateMethods/methods/GithubActions/GithubActions.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {Typography} from 'antd'; | ||
import styled from 'styled-components'; | ||
|
||
export const Title = styled(Typography.Title).attrs({ | ||
level: 3, | ||
})` | ||
&& { | ||
font-size: ${({theme}) => theme.size.md}; | ||
font-weight: 600; | ||
margin-bottom: 16px; | ||
} | ||
`; | ||
|
||
export const Subtitle = styled(Typography.Paragraph)` | ||
&& { | ||
margin-top: 16px; | ||
} | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
|
||
export const Container = styled.div` | ||
margin: 16px 0; | ||
`; |
39 changes: 39 additions & 0 deletions
39
web/src/components/RunDetailAutomateMethods/methods/GithubActions/GithubActions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import {Typography} from 'antd'; | ||
import {getServerBaseUrl} from 'utils/Common'; | ||
import {GITHUB_ACTION_URL, CLI_DOCS_URL} from 'constants/Common.constants'; | ||
import {withCustomization} from 'providers/Customization'; | ||
import {FramedCodeBlock} from 'components/CodeBlock'; | ||
import * as S from './GithubActions.styled'; | ||
|
||
const actionConfig = `- name: Configure Tracetest CLI | ||
uses: kubeshop/tracetest-github-action@v1 | ||
with: | ||
endpoint: ${getServerBaseUrl()} | ||
`; | ||
|
||
const GithubActions = () => { | ||
return ( | ||
<S.Container> | ||
<S.TitleContainer> | ||
<S.Title>GitHub Action Configuration</S.Title> | ||
</S.TitleContainer> | ||
<Typography.Paragraph> | ||
Integrate Tracetest into your GitHub pipeline by adding this snippet to your workflow steps to utilize{' '} | ||
<a href={CLI_DOCS_URL} target="__blank"> | ||
Tracetest CLI | ||
</a>{' '} | ||
for test runs: | ||
</Typography.Paragraph> | ||
<FramedCodeBlock title="Snippet" language="yaml" value={actionConfig} minHeight="120px" maxHeight="120px" /> | ||
<S.Subtitle type="secondary"> | ||
The endpoint parameter is the base address where your Tracetest Core Server is installed. <br /> Here's a | ||
full example of how to use it:{' '} | ||
<a href={GITHUB_ACTION_URL} target="__blank"> | ||
tracetest-cli-with-tracetest-core.yml | ||
</a> | ||
</S.Subtitle> | ||
</S.Container> | ||
); | ||
}; | ||
|
||
export default withCustomization(GithubActions, 'githubActions'); |
2 changes: 2 additions & 0 deletions
2
web/src/components/RunDetailAutomateMethods/methods/GithubActions/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// eslint-disable-next-line no-restricted-exports | ||
export {default} from './GithubActions'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters