1. Create an API key
The option to create your API key can be found within the settings menu.
Click on Create an API key.
You then will be navigated to our auth provider where you can create a new organization-level API key.
Add the API key to your CI provider as a secret to run test reports from the CI.
2. Copy your test target ID
You can get your test target ID from the octomind landing
page once
signed-in. If you are greeted with the 'Setup your autonomous end-to-end
tests' message, please sign-in first
The option to copy your test target ID can be found within the settings menu.
Click on the copy test target id.
3. Adding webhook
If you have a way to trigger your pipeline already, you can skip this step.
Select your repository Settings, go to Webhooks and click Add webhook.
For the URL set <your-jenkins-url>/github-webhook/ and select application/json for Content type.
Select triggers that best suite your need.
In general, the push event is enough, but for this example we also want to trigger Octomind on pull request.
Check Pull requests and Pushes and after that click on Add webhook.
If everything is OK, you should see a green checkmark after a few moments.
4. Jenkins
An example Jenkinsfile can be found here.
Copy that code to the desired step in your pipeline.
Add your AUTOMAGICALLY_TOKEN to your secrets. Navigate to Dashboard -> Manage jenkins -> Credentials -> System -> Global credentials (unrestricted) and click on Add Credentials.
For the Kind you need to select Secret text. Be careful that your ID matches the ID that you call within the Jenkinsfile script. Copy your token value to the Secret field and click Create.
AUTOMAGICALLY_TOKEN is API key created in first step.
If you want, you can enable safe parsing of HTML so you can click the link to the test report the pipeline output for you.
Navigate to Dashboard -> Manage jenkins -> Security and for Markup Formatter select Safe HTML and then save.
Creating Jenkins pipeline
Here is an example of creating a pipeline to test the script.
On your Dashboard page, click on + New Item
Give your Project a name, select Pipeline and press OK
You can check GitHub project and paste an url to your repo so you will have a button on your dashboard to take you to your repo.
You need to check GitHub hook trigger for GITScm polling so our previously created hook can trigger our pipeline.
For the Definition select Pipeline script from SCM.
For SCM you select Git
After adding your Repository URL, you’ll need to provide credentials if it’s a private repository.
You’ll need to specify a branch, in this example */* will trigger the pipeline on pushing to any branch.
If you want to trigger pipeline only on specific branch changes, e.g. main, put in */main.
The last field asks you to set the path and name to Jenkinsfile, but it’s on the top level in our repository and it’s named Jenkinsfile, so no changes are required.
Lastly, click on Save.