Skip to content
Merged

V2 #12

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d81a9e6
update step 1 doc
Konboi Jul 14, 2025
10e7f84
update step 2-
Konboi Jul 14, 2025
072c014
don't need it for v2
Konboi Jul 14, 2025
8c7ff99
Revised
kohsuke Jul 21, 2025
b118c5e
Trying to run ahead of the question I'd expect to be asked
kohsuke Jul 21, 2025
1455b29
PTS v2 HoL update
kohsuke Jul 25, 2025
db1e207
Making another sweep from top to bottom
kohsuke Jul 25, 2025
801a06f
v2 workshop sweep
kohsuke Jul 25, 2025
b97b5f5
Update README.md
jburtbee Jul 25, 2025
1e04cd6
[AIENG-209] to prevent test commits include in the working branch
Konboi Aug 5, 2025
be94877
[AIENG-209] set new option to collect subset candidates automatically
Konboi Aug 5, 2025
2855716
[AIENG-209] If we set `--user` command, installed command will be ins…
Konboi Aug 5, 2025
ef83e35
[chore] smarttest -> smarttests
Konboi Aug 6, 2025
d242980
[chore] needs newline for copying format
Konboi Aug 6, 2025
b7b2fb7
fix indent
Konboi Aug 6, 2025
f3a1198
add git section
Konboi Aug 6, 2025
8ae1f15
add create branch section
Konboi Aug 6, 2025
0ae4492
add git push for build section
Konboi Aug 6, 2025
671f3a4
Merge pull request #13 from jburtbee/patch-1
kohsuke Aug 6, 2025
d83cf4c
Update README.md
jburtbee Aug 6, 2025
e688daf
Merge pull request #15 from jburtbee/patch-2
kohsuke Aug 6, 2025
6a5000b
Merge pull request #14 from launchableinc/follow-up-v2
kohsuke Aug 7, 2025
9b54348
rm space
Konboi Aug 7, 2025
c4ced41
fix options
Konboi Aug 7, 2025
18d785a
use fork instead of template
Konboi Aug 7, 2025
aee6109
don't need to set LAUNCHABLE_TOKEN
Konboi Aug 7, 2025
0d88f6e
update command
Konboi Aug 7, 2025
1be542a
add git commands
Konboi Aug 7, 2025
32d6245
Merge pull request #18 from launchableinc/followup-v2-part2
kohsuke Aug 7, 2025
1200a5a
Update README.md
kohsuke Aug 7, 2025
a4203b5
Update README.md
kohsuke Aug 7, 2025
4721626
Wrote a short guide for SEs
kohsuke Aug 7, 2025
1c9f2e7
Update HANDSON2.md
kohsuke Aug 7, 2025
c7e5ddb
Update HANDSON2.md
kohsuke Aug 7, 2025
b1bcc0a
If we don't use the key right away, the user will forget it.
kohsuke Aug 7, 2025
f6a3bcd
Aid copy-pasting
kohsuke Aug 7, 2025
63ba3b8
pip3 is more portable than pip
kohsuke Aug 7, 2025
ef75885
Link between sections
kohsuke Aug 7, 2025
ef74440
Use human readable option names
kohsuke Aug 7, 2025
436a09c
Set the context
kohsuke Aug 7, 2025
8d036db
Smart Test -> Smart Tests
kohsuke Aug 7, 2025
87d6c4e
Update HANDSON3.md
kohsuke Aug 8, 2025
3b3dd96
Update HANDSON3.md
kohsuke Aug 8, 2025
d727275
Update HANDSON3.md
samyakk-rai Aug 10, 2025
6e8ae85
Update HANDSON3.md - edit 1
samyakk-rai Aug 10, 2025
5c32f40
Update HANDSON3.md
samyakk-rai Aug 10, 2025
b047ab0
Update HANDSON3.md
kohsuke Aug 11, 2025
e57836d
Merge pull request #22 from launchableinc/fix-v2handson3
kohsuke Aug 11, 2025
b0069b0
[chore] add `launchable compare subsets` command section
Konboi Aug 18, 2025
b560c06
Merge pull request #23 from launchableinc/followup-v2-part3
kohsuke Aug 18, 2025
679a71e
Changed the order around
kohsuke Aug 18, 2025
aa2a898
Pointless '$' sign
kohsuke Aug 18, 2025
becd094
WiP: moving to GitHub editor
kohsuke Aug 18, 2025
e1ac506
Update HANDSON3.md
kohsuke Aug 19, 2025
52a0b6d
Updated for the PR page driven lab 3
kohsuke Aug 19, 2025
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
7 changes: 7 additions & 0 deletions HANDSON0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Lab 0. Prerequisites

The following are prerequisites for this workshop:

1. Look into your internal infosec policies and make sure you can let CloudBees process your source code during this workshop. Note we do not store your source code, nor are they used to train any AI models. See [data privacy and protection policy](https://www.launchableinc.com/docs/resources/policies/data-privacy-and-protection/) for more details.

1. You need a computer with `git`, `python3`, and `java` installed.
123 changes: 45 additions & 78 deletions HANDSON1.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,36 @@
# Hands-on 1. Setup repository
# Lab 1. Environment setup

In this section, you will set up the environment for the hands-on. Specifically, you will do the following:
First, locally clone the repositories you want to try Smart Tests with.
If your test and production code reside in two different repositories, clone both of them.

1. Create a repository for hands-on
1. Clone a forked repository to your local
1. Create a CloudBees Platform account
1. Connect a repository for hands-on use to the CloudBees Platform.
1. Issue an API Key and set it as GitHub Actions' secret
1. Ask the SE to set it to hands-on mode
If your production code are split among multiple repositories, we recommend you clone a couple of major ones, just to keep this workshop manageable.

Let's get started.
## Install Launchable command

## 1. Create a repository for hands-on
You interact with Smart Tests using a command line tool called `launchable`.

Click a **Use this template** button to create a new repository for hands-on.
You can install it with pip:

![image](https://user-images.githubusercontent.com/536667/191435068-cd3aebfe-fc23-4c30-a4a5-32b270dcc697.png)

Then, after entering the required information, click **Crete repository from template**.

<img src="https://user-images.githubusercontent.com/536667/191436235-e1347cf9-dcb2-41e8-89b6-df3bf2accf5d.png" width="50%">


## 2. Clone a forked repository to your local

Let's clone a forked repository

```sh
git clone https://github.com/YOUR-USERNAME/REPOSITORY-NAME launchable-hands-on
cd launchable-hands-on
```
pip3 install --upgrade launchable~=1.0
```

## 3. Create a CloudBees Platform Account

Sign up from the [https://cloudbees.io](https://cloudbees.io). You will create a user account for hands-on use.


<img src="https://github.com/user-attachments/assets/835b3bd9-84de-451c-a913-1cbb058bfcab" width="50%">

<br>


<img src="https://github.com/user-attachments/assets/ed023338-9124-40ca-bd07-fc1bd351c6c8" width="50%">

<br>

You will receive an email to verify account like the below:

<img src="https://github.com/user-attachments/assets/0d60e2fe-c689-49f6-9028-f724daaebbea" width="50%">

<br>

After verifying your account, you can skip the tour.

<img src="https://github.com/user-attachments/assets/7c40d6d6-a13c-4d9f-80ae-54f84228642f" with="50%">

## 4. Connect a repository for hands-on use to the CloudBees platform.

Once your account has been created, let’s connect the GitHub repository for hands-on use to the CloudBees Platform component.

<img src="https://github.com/user-attachments/assets/46fa0d20-cb43-4c73-9562-46b7bc79869b" width="50%">

Click the **Components** button from the side menu.

<img src="https://github.com/user-attachments/assets/ebaee3ba-825a-40fe-9328-ec3d767278d9" width="50%">

Next, click the **Connect your repositories** button.

<img src="https://github.com/user-attachments/assets/6192712e-9af7-489a-afc4-539d6493435e" width="50%">

Then, connect the repository that you created for the hands-on use.
Let’s check that it’s installed correctly:

<img src="https://github.com/user-attachments/assets/761350b1-a1d3-4d24-a788-7218cdc77ccb" width="50%">
```
launchable --help
```

<br>
>[!TIP]
> Alternatively, you can use the `launchable` command in a Docker container: `docker run --rm cloudbees/launchable --help`

<img src="https://github.com/user-attachments/assets/545c0a42-e4f6-4d52-8405-f9e227da9862" width="50%">

Finally, click the **Launchable** menu.
## Obtain an API token

## 5. Issue an API Key and set.
You need an API token to use Smart Test.
Go to your workspace’s Settings > API Token and generate a new token.

After connecting the repository, issue an API key. You can also issue an API key from the Settings page.
**Node:** If you haven’t created a workspace yet, please refer to `SIGN_UP.md` to set one up.

<img src="https://github.com/user-attachments/assets/1f17be96-acf9-4825-8f9f-06790a14dc1c" width="50%">

Expand All @@ -95,20 +44,38 @@ Click **Copy** key and copy API key.

<img src="https://github.com/user-attachments/assets/5025328b-fc20-4eb1-b7f2-346aab60e013" width="50%">

Once you create an API key, open the settings page of GitHub repository that created in step 1 and set the API key as a repository secret `LAUNCHABLE_TOKEN` under **Secrets and variables > Actions**.
The `launchable` command expects an API token to be set in the `LAUNCHABLE_TOKEN` environment variable.

![Screenshot from 2025-05-27 08-53-29](https://github.com/user-attachments/assets/956bbc03-599c-4551-8348-51497d0750d6)
```sh
export LAUNCHABLE_TOKEN=<API TOKEN>
```

![Screenshot from 2025-05-27 09-01-30](https://github.com/user-attachments/assets/924881cf-c69a-464e-97da-92ba4e43cb0d)

## 6. Ask the SE to set it to hands-on mode.
## Make sure everything is in order

Set these workspaces to the special "hands on lab" mode from [the backoffice app](https://launchableinc.retool.com/apps/35915976-8697-11ef-88ca-d3dd93c47314/admin%20operation/issue%20triage%20%26%20PTS%20activation)
`launchable verify` command is a convenient way to make sure all the prerequisites are met and the API key is valid:

> [!NOTE]
> This can be only done by people who has special access.
```
launchable verify
```

If you see a message like this, you’re all set:

```
Organization: 'organization'
Workspace: 'workspace'
Proxy: None
Platform: 'Linux-6.10.14-linuxkit-aarch64-with-glibc2.36'
Python version: '3.11.13'
Java command: 'java'
launchable version: '1.106.2'
Your CLI configuration is successfully verified 🎉
```

___

Next: [Hands-on 2](HANDSON2.md)
If you see the help message, the installation was successful.
You can now move on to [the next step](HANDSON2.md).



Loading