Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home: add bitbucket #362

Merged
merged 14 commits into from
Nov 9, 2022
4 changes: 2 additions & 2 deletions content/docs/cml-with-dvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
cml comment create report.md
```

See the [example repository](https://github.com/iterative/cml_dvc_case) for
more, or check out the
See the [example repository](https://github.com/iterative-test/cml-example-dvc)
for more, or check out the
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
[use cases for machine learning](https://dvc.org/doc/use-cases/ci-cd-for-machine-learning).

## GitHub Actions: `setup-dvc`
Expand Down
4 changes: 2 additions & 2 deletions content/docs/start/bitbucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here, we'll walk through a tutorial to start using CML with Bitbucket Pipelines.

1. Fork our
[example project repository](https://bitbucket.org/iterative-ai/example-cml).
[example project repository](https://bitbucket.org/iterative-test/cml-example-base).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

![](/img/bitbucket_fork_cml_project.png)

Expand Down Expand Up @@ -83,4 +83,4 @@ you.
## Final Solution

An example of what your repository should look like now can be found at
[`iterative-ai/cml-base-case`](https://bitbucket.org/iterative-ai/cml-base-case).
[`iterative-ai/cml-base-case`](https://bitbucket.org/iterative-test/cml-example-minimal).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions content/docs/start/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here, we'll walk through a tutorial to start using CML with GitHub Actions.

1. Fork our
[example project repository](https://github.com/iterative/example_cml).
[example project repository](https://github.com/iterative-test/cml-example-base).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

![](/img/fork_cml_project.png)

Expand Down Expand Up @@ -85,7 +85,7 @@ of workflow you want to run, and want to put in your CML report, is up to you.
## Final Solution

An example of what your repository should look like now can be found at
[`iterative/cml_base_case`](https://github.com/iterative/cml_base_case).
[`iterative/cml_base_case`](https://github.com/iterative-test/cml-example-minimal).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

## Setup Action

Expand Down
4 changes: 2 additions & 2 deletions content/docs/start/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here, we'll walk through a tutorial to start using CML with GitLab CI/CD.

1. Fork our
[example project repository](https://gitlab.com/iterative.ai/example_cml).
[example project repository](https://gitlab.com/iterative-test/cml-example-base).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

![](/img/gitlab_fork_cml_project.png)

Expand Down Expand Up @@ -85,4 +85,4 @@ workflow you want to run, and want to put in your CML report, is up to you.
## Final Solution

An example of what your repository should look like now can be found at
[iterative.ai/cml-base-case](https://gitlab.com/iterative.ai/cml-base-case).
[iterative.ai/cml-base-case](https://gitlab.com/iterative-test/cml-example-minimal).
casperdcl marked this conversation as resolved.
Show resolved Hide resolved
28 changes: 14 additions & 14 deletions content/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
```

The example above generates visual reports in pull requests:
[![](/img/cml_first_report.png)](https://github.com/iterative/cml_base_case/pull/2)
[![](/img/cml_first_report.png)](https://github.com/iterative-test/cml-example-minimal/pull/1)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

We helpfully provide CML and other useful libraries pre-installed on our
[custom Docker images](/doc/self-hosted-runners#docker-images). In the above
Expand All @@ -58,11 +58,11 @@ and CML set up on an Ubuntu LTS base for convenience.

### Example projects

- [Basic CML project](https://github.com/iterative/cml_base_case)
- [CML with DVC to pull data](https://github.com/iterative/cml_dvc_case) &
[tutorial](/doc/cml-with-dvc?tab=GitHub)
- [CML with Tensorboard](https://github.com/iterative/cml_tensorboard_case)
- [CML with EC2 GPU](https://github.com/iterative/cml_cloud_case)
- [Basic CML project](https://github.com/iterative-test/cml-example-minimal)
- [CML with DVC to pull data](https://github.com/iterative-test/cml-example-dvc)
& [tutorial](/doc/cml-with-dvc?tab=GitHub)
- [CML with Tensorboard](https://github.com/iterative-test/cml-example-tensorboard)
- [CML with EC2 GPU](https://github.com/iterative-test/cml-example-cloud)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

</tab>
<tab title="GitLab">
Expand Down Expand Up @@ -91,7 +91,7 @@ create-CML-report:
via a `REPO_TOKEN` variable.

The example above generates visual reports in merge requests:
[![](/img/GitLab_CML_report.png '=400')](https://gitlab.com/iterative.ai/cml-base-case/-/merge_requests/3)
[![](/img/GitLab_CML_report.png '=400')](https://gitlab.com/iterative-test/cml-example-minimal/-/merge_requests/1)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

We helpfully provide CML and other useful libraries pre-installed on our
[custom Docker images](/doc/self-hosted-runners#docker-images). In the above
Expand All @@ -101,11 +101,11 @@ set up on an Ubuntu LTS base for convenience.

### Example projects

- [Basic CML project](https://gitlab.com/iterative.ai/cml-base-case)
- [CML with DVC to pull data](https://gitlab.com/iterative.ai/cml-dvc-case) &
[tutorial](/doc/cml-with-dvc?tab=GitLab)
- [CML with Tensorboard](https://gitlab.com/iterative.ai/cml-tensorboard-case)
- [CML with EC2 GPU](https://gitlab.com/iterative.ai/cml-cloud-case)
- [Basic CML project](https://gitlab.com/iterative-test/cml-example-minimal)
- [CML with DVC to pull data](https://gitlab.com/iterative-test/cml-example-dvc)
& [tutorial](/doc/cml-with-dvc?tab=GitLab)
- [CML with Tensorboard](https://gitlab.com/iterative-test/cml-example-tensorboard)
- [CML with EC2 GPU](https://gitlab.com/iterative-test/cml-example-cloud)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

</tab>
<tab title="Bitbucket">
Expand Down Expand Up @@ -135,7 +135,7 @@ pipelines:
`REPO_TOKEN` variable.

The example above generates visual reports in pull requests:
[![](/img/bitbucket_cloud_pr.png '=600')](https://bitbucket.org/iterative-ai/cml-base-case/pull-requests/2)
[![](/img/bitbucket_cloud_pr.png '=600')](https://bitbucket.org/iterative-test/cml-example-minimal/pull-requests/2)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

⚠️ CML works with Bitbucket Cloud, where you can use the
[Bitbucket Pipelines](https://bitbucket.org/product/features/pipelines) CI/CD
Expand All @@ -144,7 +144,7 @@ not yet supported.

### Example projects

- [Basic CML project](https://bitbucket.org/iterative-ai/cml-base-case)
- [Basic CML project](https://bitbucket.org/iterative-test/cml-example-minimal)
casperdcl marked this conversation as resolved.
Show resolved Hide resolved

</tab>
</toggle>
Expand Down
15 changes: 13 additions & 2 deletions src/components/organisms/SwitchableMode/Switch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ const ModeSwitch = ({
variant = 'switches.primary',
left = 'GitLab',
leftMode = 'gitlab',
right = 'GitHub',
rightMode = 'github',
center = 'Github',
centerMode = 'github',
right = 'Bitbucket',
rightMode = 'bitbucket',
0x2b3bfa0 marked this conversation as resolved.
Show resolved Hide resolved
className = '',
sx
}) => {
Expand All @@ -45,11 +47,15 @@ const ModeSwitch = ({
sx={msx({
...sx,
idPrefix,
// TODO: duplicated in cml.dev/src/components/organisms/SwitchableMode/common.js
modes: {
gitlab: {
variant: `switches.Base.Left`
},
github: {
variant: `switches.Base.Center`
},
bitbucket: {
variant: `switches.Base.Right`
}
}
Expand All @@ -58,6 +64,11 @@ const ModeSwitch = ({
<ModeSwitchLabel mode={leftMode} variant={variant} idPrefix={idPrefix}>
{left}
</ModeSwitchLabel>

<ModeSwitchLabel mode={centerMode} variant={variant} idPrefix={idPrefix}>
{center}
</ModeSwitchLabel>

<ModeSwitchLabel mode={rightMode} variant={variant} idPrefix={idPrefix}>
{right}
</ModeSwitchLabel>
Expand Down
14 changes: 13 additions & 1 deletion src/components/organisms/SwitchableMode/Switchable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const invisible = {
'& video': { display: 'none' }
}

const Switchable = ({ github, gitlab, idPrefix = undefined }) => (
const Switchable = ({ github, gitlab, bitbucket, idPrefix = undefined }) => (
<Box>
<Box
sx={msx({
Expand All @@ -47,6 +47,18 @@ const Switchable = ({ github, gitlab, idPrefix = undefined }) => (
>
{github}
</Box>
<Box
sx={msx({
idPrefix,
...invisible,
modes: {
bitbucket: visible
}
})}
aria-label="Bitbucket-specific content"
>
{bitbucket}
</Box>
</Box>
)

Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/SwitchableMode/common.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const defaultModes = ['gitlab', 'github']
export const defaultModes = ['gitlab', 'github', 'bitbucket']
export const defaultIdPrefix = 'site-mode-'
1 change: 1 addition & 0 deletions src/components/organisms/SwitchableMode/styleHelpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: duplicated in cml.dev/src/components/organisms/SwitchableMode/common.js
const defaultPrefix = `site-mode-`

const makeModeId = (mode, prefix = defaultPrefix) => prefix + mode
Expand Down
6 changes: 5 additions & 1 deletion src/components/pages/Home/HeroSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { ReactComponent as ReportsIcon } from '@media/icons/reports.svg'

import githubVideoMp4 from '@media/github/landing-video.mp4'
import gitlabVideoMp4 from '@media/gitlab/landing-video.mp4'
import bitbucketVideoMp4 from '@media/bitbucket/landing-video.mp4'

import backgroundImage from '@media/landing-background.png'

Expand Down Expand Up @@ -102,11 +103,14 @@ const HeroSection: React.ForwardRefRenderFunction<HTMLElement> = () => (
</Box>
<Box sx={{ flex: '1', width: '100%' }}>
<Switch
sx={{ mt: 4, mx: 'auto', maxWidth: ['100%', null, '160px'] }}
sx={{ mt: 4, mx: 'auto', maxWidth: ['100%', null, '240px'] }}
DavidGOrtega marked this conversation as resolved.
Show resolved Hide resolved
/>
<Switchable
gitlab={<LandingVideo src={gitlabVideoMp4} mode="gitlab" />}
github={<LandingVideo src={githubVideoMp4} mode="github" />}
bitbucket={
<LandingVideo src={bitbucketVideoMp4} mode="bitbucket" />
}
/>
</Box>
</Collapser>
Expand Down
Loading