Skip to content

Commit

Permalink
Add the Discover Ansible Development Tools Walkthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonlhart committed Oct 3, 2024
1 parent 225e0d6 commit 8d6afa5
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@
!package.nls.json
!syntaxes/**/*
# walkthrough media files
!media/walkthroughs/discoverAdt/adt-components.md
!media/walkthroughs/discoverAdt/adt-create.md
!media/walkthroughs/discoverAdt/adt-deploy.md
!media/walkthroughs/discoverAdt/adt-test.md
!media/walkthroughs/discoverAdt/all-adt-components.png
!media/walkthroughs/discoverAdt/create-ansible-creator.gif
!media/walkthroughs/discoverAdt/create-ansible-navigator.png
!media/walkthroughs/discoverAdt/create-automation-hub.png
!media/walkthroughs/discoverAdt/create-lightspeed-completion.gif
!media/walkthroughs/discoverAdt/create-lightspeed-playbook.gif
!media/walkthroughs/discoverAdt/deploy-ansible-builder.png
!media/walkthroughs/discoverAdt/deploy-ansible-sign.png
!media/walkthroughs/discoverAdt/test-ansible-lint.gif
!media/walkthroughs/discoverAdt/test-molecule.gif
!media/walkthroughs/discoverAdt/test-pytest-ansible.png
!media/walkthroughs/discoverAdt/test-tox-ansible.gif
!media/walkthroughs/gettingStarted/ansible-env/environment-statusbar.png
!media/walkthroughs/gettingStarted/ansible-env/no-ansible-env copy.png
!media/walkthroughs/gettingStarted/ansible-env/no-ansible-env.png
Expand Down
6 changes: 6 additions & 0 deletions media/walkthroughs/discoverAdt/adt-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- markdownlint-disable MD033 MD041 MD013-->

<figure align="center">
<img src="all-adt-components.png" alt="image missing" />
<figcaption>All the tools inside the Ansible environment package</figcaption>
</figure>
29 changes: 29 additions & 0 deletions media/walkthroughs/discoverAdt/adt-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- markdownlint-disable MD033 MD041 MD013-->

<figure align="center">
<img src="create-ansible-creator.gif" alt="image missing" />
<figcaption>Scaffolding a collection using Ansible Creator inside the Ansible extension</figcaption>
</figure>
<br>
<figure align="center">
<img src="create-ansible-navigator.png" alt="image missing" />
<figcaption>Ansible Navigator's menu options</figcaption>
</figure>
<br>
<a href="https://www.youtube.com/watch?v=_aEX3HkjayI">
<figure align="center">
<img src="create-automation-hub.png" alt="demo image" />
<figcaption>Red Hat Ansible Automation Platform Automation Hub Overview</figcaption>
</figure>
</a>
<br>
<figure align="center">
<img src="create-lightspeed-completion.gif" alt="image missing" />
<figcaption>Ansible Lightspeed's in-code functionality</figcaption>
</figure>
<br>
<figure align="center">
<img src="create-lightspeed-playbook.gif" alt="image missing" />
<figcaption>Generate playbooks with Ansible Lightspeed inside the Ansible extension</figcaption>
</figure>
<br>
12 changes: 12 additions & 0 deletions media/walkthroughs/discoverAdt/adt-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- markdownlint-disable MD033 MD041 MD013-->

<figure align="center">
<img src="deploy-ansible-builder.png" alt="image missing" />
<figcaption>Building an execution environment with Ansible Builder</figcaption>
</figure>
<br>
<figure align="center">
<img src="deploy-ansible-sign.png" alt="image missing" />
<figcaption>Creating a checksum manifest file with Ansible Sign</figcaption>
</figure>
<br>
22 changes: 22 additions & 0 deletions media/walkthroughs/discoverAdt/adt-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- markdownlint-disable MD033 MD041 MD013-->

<figure align="center">
<img src="test-ansible-lint.gif" alt="image missing" />
<figcaption>Ansible Lint integration inside the Ansible extension</figcaption>
</figure>
<br>
<figure align="center">
<img src="test-molecule.gif" alt="image missing" />
<figcaption>Molecule's test scenario options and how to run a scenario</figcaption>
</figure>
<br>
<figure align="center">
<img src="test-pytest-ansible.png" alt="image missing" />
<figcaption>Using Pytest Ansible with VSCode's Test Explorer</figcaption>
</figure>
<br>
<figure align="center">
<img src="test-tox-ansible.gif" alt="image missing" />
<figcaption>Displaying Tox Ansible options and running a test suite</figcaption>
</figure>
<br>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/walkthroughs/discoverAdt/test-molecule.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,45 @@
}
}
]
},
{
"id": "discover-ansible-development-tools",
"title": "Discover Ansible Development Tools",
"description": "A quick review of the tools that will help you create, test, and deploy your automation code.",
"steps": [
{
"id": "adt-create",
"title": "Create",
"description": "**Scaffold automation content with Ansible Creator**\nThe fastest way to generate all your ansible content! Whether you are initializing an Ansible Collection or creating the framework for specific plugins, this tool streamlines the process with efficiency and precision based on your requirements.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/creator/) \n-----\n**Manage automation content with Ansible navigator**\nA text-based user interface (TUI) for creating, reviewing, running and troubleshooting Ansible content, including inventories, playbooks, collections, documentation, and execution environments.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/navigator/) \n-----\n**Discover content with Ansible automation hub**\nYour organization's on-premise repository with curated, certified and validated Ansible content.\n[View Documentation ↗](https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/managing_automation_content/index) \n-----\n**Build with Ansible Lightspeed**\nAnsible's generative AI service that provides Ansible code based on natural language prompts. Include content explanation and more to help you build with confidence.\n[View Documentation ↗](https://www.redhat.com/en/technologies/management/ansible/ansible-lightspeed) \n[Ansible Lightspeed Trial Walkthrough ↗](https://www.redhat.com/en/products/interactive-walkthrough/install-ansible-lightspeed) ",
"media": {
"markdown": "media/walkthroughs/discoverAdt/adt-create.md"
}
},
{
"id": "adt-test",
"title": "Test",
"description": "**Test playbooks with Ansible Lint**\nChecks playbooks for style errors, best practices, and other issues to ensure the integrity of your code.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/lint/) \n-----\n**Test collections with Ansible Molecule**\nAssists in the development and testing of Ansible Content Collections, playbooks, and roles.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/molecule/) \n-----\n**Test collections with Tox Ansible**\nAn extension to the tox testing utility that provides additional functionality to check Ansible module and plugin Python code under different Python interpreters and Ansible core versions.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/tox-ansible/) \n-----\n**Integrate with pytest using Pytest Ansible**\nA pytest testing framework extension that provides additional functionality for testing Ansible module and plugin Python code.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/pytest-ansible/) ",
"media": {
"markdown": "media/walkthroughs/discoverAdt/adt-test.md"
}
},
{
"id": "adt-deploy",
"title": "Deploy",
"description": "**Build execution environments with Ansible Builder**\nAutomates the process of creating execution environments using schemas and tooling.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/builder/) \n-----\n**Verify Ansible content with Ansible Sign**\nUtility for signing and verifying Ansible project directory contents to ensure a secure software supply chain.\n[View Documentation ↗](https://ansible.readthedocs.io/projects/sign/) ",
"media": {
"markdown": "media/walkthroughs/discoverAdt/adt-deploy.md"
}
},
{
"id": "adt-where-to-start",
"title": "Where do I start?",
"description": "**Install the Ansible environment package, if you have not already**\nThe Ansible environment package contains all of the dependencies your environment needs to work with Ansible development tools.\n[Install Ansible environment package](command:ansible.install-ansible-dev-tools)\nAlternatively, [switch to another environment](command:ansible.python.set.interpreter) that has those installed.",
"media": {
"markdown": "media/walkthroughs/discoverAdt/adt-components.md"
}
}
]
}
],
"viewsContainers": {
Expand Down
2 changes: 2 additions & 0 deletions test/ui-test/allTestsSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { lightspeedUILoginTest } from "./lightspeedAuthUiTest";
import { lightspeedOneClickTrialUITest } from "./lightspeedOneClickTrialUITest";
import { lightspeedUIAssetsTest } from "./lightspeedUiTest";
import { terminalUITests } from "./terminalUiTest";
import { walkthroughUiTest } from "./walkthroughUiTest";

describe("VSCode Ansible - UI tests", function () {
this.timeout(30000);
Expand All @@ -18,4 +19,5 @@ describe("VSCode Ansible - UI tests", function () {
// lightspeedUILoginTest();
// lightspeedUISignOutTest();
}
walkthroughUiTest();
});
46 changes: 46 additions & 0 deletions test/ui-test/walkthroughUiTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { config, expect } from "chai";
import { By, EditorView, Workbench } from "vscode-extension-tester";
import { sleep } from "./uiTestHelper";

config.truncateThreshold = 0;
export function walkthroughUiTest(): void {
describe("Check for the walkthrough - Discover Ansible Development Tools", async () => {
let workbench: Workbench;
let editorView: EditorView;

before(async () => {
workbench = new Workbench();
editorView = new EditorView();
});

it("Open the walkthrough and check the elements", async function () {
const commandInput = await workbench.openCommandPrompt();
await workbench.executeCommand("Welcome: Open Walkthrough");
await commandInput.setText("Discover Ansible Development Tools");
await commandInput.confirm();

await sleep(1000);

// Select the editor window
const welcomeTab = await editorView.getTabByTitle("Welcome");
expect(welcomeTab).is.not.undefined;

// Locate walkthrough title text
const titleText = await welcomeTab
.findElement(
By.xpath("//div[contains(@class, 'getting-started-category') ]"),
)
.getText();
expect(titleText.includes("Discover Ansible Development Tools")).to.be
.true;

// Locate one of the steps
const stepText = await welcomeTab
.findElement(
By.xpath("//div[contains(@class, 'step-list-container') ]"),
)
.getText();
expect(stepText.includes("Create")).to.be.true;
});
});
}

0 comments on commit 8d6afa5

Please sign in to comment.