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

expectation tags #128

Draft
wants to merge 242 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
c6a3e49
Hello World created from GitHub
rgardler-msft May 18, 2022
2bc6d94
maybe if we put it in the right directory...
rgardler-msft May 18, 2022
93c67e0
Update README.md
jasonmesser7 Oct 5, 2022
4324a25
Update README.md
jasonmesser7 Oct 6, 2022
3000dae
Parser and executor code (#1)
jasonmesser7 Dec 20, 2022
748ac7f
Improve getting started docs (#11)
rgardler-msft Feb 10, 2023
55e1315
bug fix which caused testing to fail on newer versions of bash (#13)
jasonmesser7 Feb 10, 2023
880a2fd
Adding tutorial for AKS quickstart with event grid (#10)
jasonmesser7 Feb 12, 2023
9be4e30
Adding exit 1 back into testing. This was taken our originally for mu…
jasonmesser7 Feb 22, 2023
bc5e14c
[add] initial golang setup.
vmarcella Apr 20, 2023
a2d77b6
[add] other subcommands & start laying out the engine.
vmarcella Apr 20, 2023
cb6d5aa
[add] makefile with build + run commands.
vmarcella Apr 20, 2023
e2c39c2
[add] markdown parsing and codeblock extraction to retrieve commands …
vmarcella Apr 20, 2023
bca127d
[update] markdown file to be passed in as a positional argument.
vmarcella Apr 24, 2023
d38cd3b
[update] documentation for how to build & run IE.
vmarcella Apr 24, 2023
b3a7220
[add] INI parser, add command execution via bash, and handle command …
vmarcella Apr 26, 2023
4fa30cd
[update] reference.
vmarcella Apr 26, 2023
1349975
[update] markdown parsing to support parsing html comment blocks & ad…
vmarcella Apr 30, 2023
bbd0b9b
[add] function to extract export statements from variable blocks.
vmarcella Apr 30, 2023
9d1393c
[add] environment variables to bash commands.
vmarcella Apr 30, 2023
46e933a
[update] codeblock extraction.
vmarcella Apr 30, 2023
85a406f
[update] codeblock parsing to tie codeblocks to their headers.
vmarcella Apr 30, 2023
13f151c
[update] stages to be printed out before command execution.
vmarcella Apr 30, 2023
44952a9
[add] lipgloss for tui styling.
vmarcella Apr 30, 2023
662b48f
[add] the spinning wheel to the command execution.
vmarcella May 1, 2023
6c2fd93
Added Quickstart for VMSS
jasonmesser7 Feb 1, 2023
d732728
Initial review comments addressed ahead of testing the execution impa…
rgardler-msft Feb 14, 2023
7665e13
[update] structure of the engine to be better suited for multiple sce…
vmarcella May 6, 2023
4d20133
[add] function to extract the scenario title.
vmarcella May 6, 2023
cf0bd20
[render] title.
vmarcella May 6, 2023
f640872
[update] formatting for commands.
vmarcella May 7, 2023
27b4c0c
[clean] up the mod file & add documentation.:
vmarcella May 7, 2023
f841175
[add] the output of the generated script.
vmarcella May 7, 2023
2118c30
[update] documentation.
vmarcella May 8, 2023
548b6cb
[fix] formatting.
vmarcella May 8, 2023
fa4c730
[add] basic docker file to build API & runner, add a hello world http…
vmarcella May 14, 2023
66118c4
ignroe bin
notneeded76 May 15, 2023
e8ad9ab
[add] kubernetes client & code to grab the clientset.
vmarcella May 15, 2023
ca1987c
[add] API kubernetes configuration for a local cluster.
vmarcella May 16, 2023
3907629
[add] more cluster operations & update API infra.
vmarcella May 16, 2023
f2f90e1
[update] server to use echo & update some of the infra.
vmarcella May 16, 2023
0e6e472
[update] routes & add refresh only for the API.
vmarcella May 16, 2023
8432ed1
[add] runner deployment & service implementations.
vmarcella May 16, 2023
6cb4098
[update] runner creation to be done through deployment & service spec…
vmarcella May 17, 2023
8206edf
[update] runners -> agents.
vmarcella May 17, 2023
03c1b80
[add] error output to command.
vmarcella May 17, 2023
fd91b5e
[update] error message output.
vmarcella May 18, 2023
8f99a3b
[update] environment state to be shared across commands, add flag for…
vmarcella May 19, 2023
a0a82ad
[update] indendation.
vmarcella May 19, 2023
83af4a8
[update] shell script output.
vmarcella May 19, 2023
d3a149b
[update] script header.
vmarcella May 19, 2023
676a644
[add] tracking ID UUID implementation + flag & implement do-not-delet…
vmarcella May 23, 2023
a5e7854
[update] the markdown parser to start capturing the expected output b…
vmarcella Jun 4, 2023
f5cd7ef
[refactor] some names & add comments.
vmarcella Jun 4, 2023
28612a4
[remove] test exit statement.
vmarcella Jun 4, 2023
266a67c
[add] import dependencies for testing, setup initial testing code, an…
vmarcella Jun 4, 2023
8123d25
[add] common engine functionality to one place & separate std out and…
vmarcella Jun 11, 2023
fe3cf39
[refactor] comparing json fields to better handle testing.
vmarcella Jun 12, 2023
839e4be
[add] logging.
vmarcella Jun 12, 2023
7c1b32b
[add] ie logs to gitignore.
vmarcella Jun 19, 2023
c05434d
[update] logging to store the low level output into a file, update lo…
vmarcella Jun 19, 2023
e63a098
[update] formatting for IE & add build & test pipeline
vmarcella Jul 14, 2023
68a1b53
[remove] redundant actions.
vmarcella Jul 14, 2023
ac2e393
[update] pipeline to build all targets in the first step.
vmarcella Jul 14, 2023
e9cfaad
[add] release step.
vmarcella Jul 14, 2023
be94521
[update] release step.
vmarcella Jul 14, 2023
8c10a8f
[update] build to not rely on C bindings.
vmarcella Jul 14, 2023
5b1aa45
[add] install from release script for OCD.
vmarcella Jul 17, 2023
02f4355
[update] path check.
vmarcella Jul 17, 2023
ae78d30
[add] scenarios into repository for ocd.
vmarcella Jul 18, 2023
e912e1a
[update] release.
vmarcella Jul 18, 2023
7f9a302
[update] testing scripts to live within the testing scenarios directory.
vmarcella Jul 18, 2023
ef69941
[update] pipeline to zip up scenarios and make them part of the release.
vmarcella Jul 18, 2023
8e75ac5
[update] installation script.
vmarcella Jul 18, 2023
c1fe636
[update] installation script to be more silent.
vmarcella Jul 18, 2023
b1ce3b7
Added Quickstart for VMSS
jasonmesser7 Feb 1, 2023
9b53b03
Initial review comments addressed ahead of testing the execution impa…
rgardler-msft Feb 14, 2023
a363340
Add next steps to each of the OCD docs
rgardler-msft Jul 20, 2023
70ebc64
[update] error handling.
vmarcella Jul 20, 2023
5f275bb
[update] error handling & add trailing newline.
vmarcella Jul 20, 2023
52e1c73
[add] logging to command execution for now.
vmarcella Jul 20, 2023
57b56fe
[fix] frame logic.
vmarcella Jul 20, 2023
130297e
[fix] frame logic.
vmarcella Jul 20, 2023
130e7b3
[update] dependencies.
vmarcella Jul 23, 2023
473cb78
[add] support for SSH commands, fix error handling for CLI commands, …
vmarcella Jul 23, 2023
fcec7fb
[update] scenario to run ssh and not just output the SSH command.
vmarcella Jul 23, 2023
5d127bd
[refactor] execution.
vmarcella Jul 23, 2023
b056c3b
[refactor] command to execute setup.
vmarcella Jul 23, 2023
48ba95f
[update] the scenario to use ssh without aad & fix the ssh regex.
vmarcella Jul 24, 2023
5b777bb
[update] scenario to not check the host key.
vmarcella Jul 25, 2023
6ac449a
Merge pull request #17 from rgardler-msft/vmarcella/port-to-go
vmarcella Jul 31, 2023
42e23f9
[add] the ability to set the subscription and correlation IDs from th…
vmarcella Jul 31, 2023
544f44e
[update] logging for setting the subscription.
vmarcella Jul 31, 2023
6a12864
[update] the default log level.
vmarcella Jul 31, 2023
05ab40f
[update] variable names to be more consistent.
vmarcella Jul 31, 2023
eec2a3b
[add] environment determination, status updates for OCD, and fixes to…
vmarcella Jul 31, 2023
2111e0d
[update] grouping for regex variables
vmarcella Jul 31, 2023
bf2ff26
[add] prefix & postfix for ocd status json.
vmarcella Aug 1, 2023
adaedb3
[refactor] status reporting & instantation. Remove URI tracking for now.
vmarcella Aug 1, 2023
4cf1ca0
[update] resource URIs to be populated in the end after all of the de…
vmarcella Aug 1, 2023
02e49f7
[update] status code exits by capturing the command exit status
vmarcella Aug 4, 2023
4d6ee1b
[remove] az cli error check now that exit codes are working, refactor…
vmarcella Aug 8, 2023
73dc17e
[remove] python modules no longer part of the project.
vmarcella Aug 9, 2023
ac654d6
[update] path for demo scripts.
vmarcella Aug 9, 2023
0b012de
[update] styling for step titles, spinner, and verbose output.
vmarcella Aug 9, 2023
b3407b8
[add] styling for the ocd status to set it's foreground to black.
vmarcella Aug 9, 2023
9cbf5b9
[update] cursor positioning to be simplified.
vmarcella Aug 9, 2023
efb1621
[update] moveCursorPosition to also handle printing it.
vmarcella Aug 9, 2023
826328c
[update] all cursor adjustments to be in common.go & update report OC…
vmarcella Aug 10, 2023
8154ef2
[update] resource URIs to be attached before the last interactive ssh…
vmarcella Aug 10, 2023
bdef1ea
[add] unique postfixes to ssh scenario.
vmarcella Aug 10, 2023
6d59a5e
[update] status to succeeded.
vmarcella Aug 10, 2023
7722d4e
[add] --working-directory flag for ie execute so that directories wit…
vmarcella Aug 11, 2023
4f154e2
Replace AGIC with NGINX ingress controller
rguptar Aug 14, 2023
60d2333
Add README.md to ocd scenarios
ralphr123 Aug 15, 2023
3c9f89f
Change export block to plaintext so it doesn't get run by engine
ralphr123 Aug 16, 2023
aa396f0
remove ssh clone command
ralphr123 Aug 16, 2023
8af22f7
Move export commands to the top
ralphr123 Aug 16, 2023
6619490
Added expected_similarity comments to markdown
ralphr123 Aug 16, 2023
721269f
Merge pull request #18 from ralphr123/ralph/deploy-container-app-from…
vmarcella Aug 16, 2023
7d9eb51
Fix export command typo, add note about accepting AI terms on portal
ralphr123 Aug 19, 2023
bd06316
Remove lb after similarity comments
ralphr123 Aug 19, 2023
f93a313
Add instruction to install containerapp extension
ralphr123 Aug 19, 2023
af06393
Added cd instruction after cloning repo
ralphr123 Aug 19, 2023
063baaf
[add] test for markdown title parsing.
vmarcella Aug 22, 2023
d584650
[add] first tests for markdown parsing.
vmarcella Aug 22, 2023
5529e3f
[rm] invalid test file.
vmarcella Aug 22, 2023
4a5deac
[update] deps.
vmarcella Aug 22, 2023
adade90
[update] test runner and add test for parsing a basic codeblock.
vmarcella Aug 22, 2023
4da24e6
Merge branch 'vmarcella/port-to-go' of https://github.com/Azure/Innov…
vmarcella Aug 22, 2023
1536c66
[update] test structure and add a new test.
vmarcella Aug 23, 2023
a313ba2
[update] test names.
vmarcella Aug 23, 2023
0028f4f
[update] INI parsing to return an error instead of panicking, add a t…
vmarcella Aug 23, 2023
db8bd65
[add] tests for map utilities.
vmarcella Aug 23, 2023
ab6048f
Env vars are auto generated, go bash only splits on first =
ralphr123 Aug 23, 2023
ee82495
Update source path for containerapp up
ralphr123 Aug 23, 2023
09f0139
Merge pull request #19 from ralphr123/ralph/clarify-container-app-doc
vmarcella Aug 23, 2023
6276516
Merge branch 'vmarcella/port-to-go' of https://github.com/Azure/Innov…
vmarcella Aug 23, 2023
a9ee7ab
[update] execution to compare outputs & refactor output comparisons i…
vmarcella Aug 23, 2023
59ff2bf
[add] expected similarity blocks and format outputs.
vmarcella Aug 23, 2023
3f75cb7
[update] logging to not include the caller for now, as logs were too …
vmarcella Aug 24, 2023
b2366ab
[add] cursor adjustment back.
vmarcella Aug 24, 2023
12118eb
AKS Best practice setup and NGINX Ingress Controller (#21)
naioja Aug 25, 2023
4abcf43
[add] the logic to write the command execution to the bash history fi…
vmarcella Aug 26, 2023
74b6951
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Aug 26, 2023
c1841b9
[fix] bug with interactive command error reporting.
vmarcella Aug 26, 2023
017b75d
[update] do not write interactive commands to history
rguptar Aug 28, 2023
95e7f4c
Fix SSL user email address (#25)
naioja Aug 30, 2023
5cb2d3b
[add] contributing guide.
vmarcella Aug 31, 2023
4e452a8
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Aug 31, 2023
192fd64
anonymizing resource groups and other ids (#26)
naioja Sep 5, 2023
94461a4
Using Ubuntu 22.04 and AAD extension for SSH (#28)
naioja Sep 5, 2023
26042cb
Update CONTRIBUTING.md (#27)
mbifeld Sep 5, 2023
3971b23
[update] expected output jsons to be compared despite the casing of t…
vmarcella Sep 6, 2023
e6d2145
[add] identity to the created vm & update logging so that errors are …
vmarcella Sep 7, 2023
f6acf7a
Adding LAMP scenario (#22)
naioja Sep 8, 2023
95ec51a
[add] --variables flag to allow for environment variables to be overi…
vmarcella Sep 11, 2023
e23e448
[update] parameter name to be --var & update the parser to inject the…
vmarcella Sep 11, 2023
b9abcbd
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 11, 2023
0aae1d0
[update] all scenarios to use REGION as their location variable.
vmarcella Sep 11, 2023
14e2aca
[update] documentation and organization.
vmarcella Sep 12, 2023
feff2bc
Fixing all markdownlint messages. (#35)
naioja Sep 19, 2023
49f268a
Fixing all markdownlint messages the LAMP doc. (#36)
naioja Sep 19, 2023
6feac36
Fix scenarios (#40)
rguptar Sep 19, 2023
bf5e75b
[add] command stdout and stderr to our logs.
vmarcella Sep 19, 2023
f9c61f5
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 19, 2023
6febd8b
Wait for resource to reach ready state (#43)
rguptar Sep 19, 2023
0164c76
[add] a functional but basic test mode, update logging, and add new t…
vmarcella Sep 20, 2023
1ce60b8
[fix] correlationId not being set.
vmarcella Sep 20, 2023
9e0f21d
[update] the ssh command and add a unit test to test our regex out.
vmarcella Sep 20, 2023
d135966
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 20, 2023
13cf701
[remove] access token/login auth from engine initialization for now.
vmarcella Sep 20, 2023
fdbd219
[update] scenario to send a yes into the az ssh config command on clo…
vmarcella Sep 20, 2023
8ffe4a8
[update] title.
vmarcella Sep 20, 2023
15e12fe
[update] ssh scenario to temporarily not configure the ssh config.
vmarcella Sep 20, 2023
9ae4977
[add] az ssh config command back.
vmarcella Sep 20, 2023
23dff75
Add envsubst
rguptar Sep 20, 2023
22212ef
Merge pull request #44 from Azure/guptar/scenarios
rguptar Sep 20, 2023
d6d6dfd
Alterntives to envsubst
naioja Sep 21, 2023
6b2f18b
Merge pull request #45 from naioja/aj_envsubst_alternative
rguptar Sep 21, 2023
92dceb8
[remove] az ssh command again.
vmarcella Sep 21, 2023
82f1ce8
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 21, 2023
b4e8345
[add] pipeline to run scenarios automatically.
vmarcella Sep 21, 2023
bb52ca1
[update] name of the stage.
vmarcella Sep 21, 2023
331dea8
[update] pipeline.
vmarcella Sep 21, 2023
46690a1
[update] subscription ID.
vmarcella Sep 21, 2023
8ca6735
[update] subscription to be passed in from top level scope.
vmarcella Sep 21, 2023
0853012
[fix] subscription.
vmarcella Sep 21, 2023
02a35c2
[update] pipeline to print out the ie log file.
vmarcella Sep 21, 2023
16ec206
ReadMe for LinuxSecureWebServer (#24)
brmoreir Sep 22, 2023
181d5b2
[update] ssh config name and for the scenario to assign an identity t…
vmarcella Sep 22, 2023
08f4bdc
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 22, 2023
ff798bd
[update] LEMP scenario to assign an identity and write the azure conf…
vmarcella Sep 22, 2023
a0d49bb
[remove] result block for the az ssh config scenario.
vmarcella Sep 22, 2023
512cf60
[fix] command output checking to set an error when the command output…
vmarcella Sep 22, 2023
9031085
[update] loop -> renderingLoop.
vmarcella Sep 22, 2023
2b0e418
Exclude liveness check for AKS scenario
rguptar Sep 22, 2023
c916d25
[update] json response to be properly formatted.
vmarcella Sep 22, 2023
88c14fe
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 22, 2023
cef7a1a
[update] scenario to not use az role assignment and then simplify the…
vmarcella Sep 23, 2023
76305ab
[update] utils -> lib and refactor some functions out of the engine.
vmarcella Sep 23, 2023
cd3e3bd
[remove] az ssh command from LEMP.
vmarcella Sep 25, 2023
8266409
[update] random postfix to have a bit more entropy.
vmarcella Sep 25, 2023
633bec4
[update] random postfix to have even more entropy.
vmarcella Sep 26, 2023
b08f28d
[add] to-bash command to generate scripts for both local & portal env…
vmarcella Sep 26, 2023
1340ab7
[add] identity login for the portal, update environment state file name.
vmarcella Sep 27, 2023
5ac6e33
[update] bash command executed for MSI login.
vmarcella Sep 27, 2023
1f9f0f7
Merge branch 'vmarcella/port-to-go' of github:Azure/InnovationEngine …
vmarcella Sep 28, 2023
0736eb8
[update] engine creation to be checked in ie execute.
vmarcella Sep 28, 2023
4722078
[add] token generation for one click deployments.
vmarcella Sep 28, 2023
75b46b8
[disable] access token fetching for now.
vmarcella Sep 28, 2023
8bd01fe
[refactor] SetCorrelationID, add a basic unit test, and then remove t…
vmarcella Sep 29, 2023
bdf02b8
[update] scenario testing to only run on main for now.
vmarcella Sep 29, 2023
335778e
Merge branch 'main' into vmarcella/port-to-go
vmarcella Sep 29, 2023
aa75583
[fix] gitignore.
vmarcella Sep 29, 2023
3a3f7d8
[update] workflow to run on prs into main
vmarcella Sep 29, 2023
053668f
[remove] branch from release pipeline.
vmarcella Sep 29, 2023
31f6ea5
Merge pull request #16 from Azure/vmarcella/port-to-go
vmarcella Sep 29, 2023
eb03a26
Collection of small fixes for the engine (#68)
vmarcella Oct 13, 2023
de7032b
More minor fixes (#98)
vmarcella Oct 13, 2023
33a771b
[fix] resource group name matching. (#99)
vmarcella Oct 13, 2023
48c5ca6
[add] functions to strip invalid env vars from the env state file for…
vmarcella Oct 14, 2023
fd52367
[add] quotations to all env values. (#102)
vmarcella Oct 14, 2023
41440e4
[fix] rendering of multi-line strings
rguptar Oct 16, 2023
531f3c8
[refactor] command rendering
rguptar Oct 16, 2023
0a78c14
[update] go.mod
rguptar Oct 16, 2023
6c89a08
[update] pipeline action for azure cli sign in. (#109)
vmarcella Oct 17, 2023
76e70fc
address multiline quoted case separately
rguptar Oct 17, 2023
fc51625
[add] hide value rendering behind a feature flag
rguptar Oct 17, 2023
85505f0
Fixes for scenarios (#111)
vmarcella Oct 18, 2023
44150fe
Merge pull request #106 from Azure/guptar/tutorial
rguptar Oct 19, 2023
cb791f4
[fix] subscription setting errors to be reported in the portal.
vmarcella Oct 18, 2023
2a6e0f3
LAMP Fixes
mbifeld Oct 20, 2023
69929c8
VM SSH Fixes
mbifeld Oct 20, 2023
c6aaa7d
AKS Fixes
mbifeld Oct 20, 2023
b6098e8
Bump golang.org/x/net from 0.8.0 to 0.17.0
dependabot[bot] Oct 23, 2023
28fe522
Merge pull request #97 from Azure/dependabot/go_modules/golang.org/x/…
rguptar Oct 23, 2023
f476afc
[fix] restoration of env vars
rguptar Oct 25, 2023
03880d1
[refactor] rename v to value
rguptar Oct 25, 2023
40e125e
readme: Fix path for tutorial.md (#120)
mqasimsarfraz Oct 27, 2023
c08329c
[fix] remove horizontal align (#121)
rguptar Oct 30, 2023
b3b4209
[add] first iteration on the specification for expectations.
vmarcella Nov 6, 2023
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
32 changes: 32 additions & 0 deletions .github/workflows/build-test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build-test-release

on:
push:
branches:
- main

jobs:
build-test-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build all targets.
run: |
make build-all
- name: Run unit tests across all targets.
run: |
make test-all
- name: Prepare scenarios to be released.
run: |
sudo apt install zip
zip -r scenarios.zip scenarios
- name: Release Innovation Engine
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
title: "IE"
automatic_release_tag: "latest"
prerelease: true
files: |
./bin/ie
./scenarios.zip
36 changes: 36 additions & 0 deletions .github/workflows/helloWorld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
31 changes: 31 additions & 0 deletions .github/workflows/scenario-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: scenario-testing
on:
schedule:
- cron: "0 */2 * * *"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-ocd-scenarios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build all targets.
run: |
make build-all
make test-all
- name: Sign into Azure
uses: azure/actions/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Run all one click deployment scenarios.
uses: azure/CLI@v1
with:
inlineScript: |
make test-scenarios SUBSCRIPTION=${{ secrets.AZURE_SUBSCRIPTION }}
- name: Display ie.log file
run: |
cat ie.log
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
*/*~
# Python
__pycache__

#VS Code
.vscode

# Ignore all binaries.
bin/

# Ignore ie logs
ie.log
180 changes: 180 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<!-- omit in toc -->
# Contributing to InnovationEngine

First off, thanks for taking the time to contribute! ❤️

All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles contributions. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉

> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
> - Star the project
> - Tweet about it
> - Refer this project in your project's readme
> - Mention the project at local meetups and tell your friends/colleagues

<!-- omit in toc -->
## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Microsoft Open Source Contribution Guide](#microsoft-open-source-contribution-guide)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
<!--TODO [Improving The Documentation](#improving-the-documentation)-->
- [Styleguides](#styleguides)


## Code of Conduct

This project and everyone participating in it is governed by the
[InnovationEngine Code of Conduct](https://github.com/Azure/InnovationEngine/blob/main/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to mbifeld@microsoft.com.

## Microsoft Open Source Contribution Guide

This is a Microsoft Open Source project. Please reference to the [Microsoft Open Source Contribtution Guide](https://docs.opensource.microsoft.com/contributing/) for FAQs and general information on contributing to Microsoft Open Source.

## I Have a Question

<!-- If you want to ask a question, we assume that you have read the available [Documentation](TODO: Add Documentation folder).-->
Before you ask a question, it is best to search for existing [Issues](https://github.com/Azure/InnovationEngine/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](https://github.com/Azure/InnovationEngine/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (golang version, operating system, etc), depending on what seems relevant.

We will then address the issue as soon as possible.

## I Want To Contribute

> ### Legal Notice <!-- omit in toc -->
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.

### Reporting Bugs

<!-- omit in toc -->
#### Before Submitting a Bug Report

A good bug report shouldn't leave others needing to chase you down for more information. Therefore, we ask you to investigate carefully, collect information, and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](./README.md). If you are looking for support, you might want to check [I Have A Question](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in [Issues](https://github.com/Azure/InnovationEngine/issues).
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
- Collect information about the bug:
- Stack trace (Traceback)
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM, etc)
- Version of the golang, make, etc depending on what seems relevant.
- Possibly your input and the output
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?

<!-- omit in toc -->
#### How Do I Submit a Good Bug Report?

> You must never report security related issues, vulnerabilities, or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead, sensitive bugs must be sent by email to mbifeld@microsoft.com.
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->

We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](https://github.com/Azure/InnovationEngine/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.

Once it's filed:

- The project team will label the issue accordingly.
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for InnovationEngine, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.

<!-- omit in toc -->
#### Before Submitting an Enhancement

- Make sure that you are using the latest version.
- Read the [documentation](./README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/Azure/InnovationEngine/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits within the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.

<!-- omit in toc -->
#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub Issues](https://github.com/Azure/InnovationEngine/issues).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to.
- **Explain why this enhancement would be useful** to most InnovationEngine users. You may also want to point out the other projects that solved it better and which could serve as inspiration.

### Your First Code Contribution
#### Innovation Engine
To get started with developing features for the Innovation Engine itself, you
will need `make` & `go`. Once you have those installed and the project cloned
to a local repository, you can attempt to build the project using:

```bash
make build-all
```

If the build completes, you should be able to start adding features/fixes
to the Innovation Engine codebase. Once you've added new changes, you can test
for regressions using:

```bash
make test-all
```

If implementing a new feature, it is expected to add & update any necessary
tests for the changes introduced by the feature.

If you're still looking for more information about how to build & run Innovation Engine,
[README](./README.md) has a more comprehensive guide for how to get started with project
development.

#### Innovation Engine markdown scenarios

If you are contributing to one of the markdown scenarios (executable documents)
for Innovation Engine, you are expected to follow the installation steps before
updating/adding your document. This is needed because once you've made changes
or have added a new scenario, you should test your executable document by
using the Innovation Engine:

```bash
ie execute <scenario-path>
```

This will attempt to parse your document into an executable scenario, make sure
that the commands extracted from codeblocks execute successfully, and that
their corresponding result blocks (if any) also line up with what the command
returned. Once you get your scenario to execute successfully, you should go ahead
and make a PR for it!

#### Creating a PR

<!-- TODO: Create a PR template -->
When creating a PR, please include as much context as possible. At minimum, this should include what the PR does and the testing strategies for it.

If your PR is a work in progress, please label it as a draft and include 'WIP' at the beginning of the PR title.

<!--### Improving The Documentation
TODO-->

## Styleguides
For working on the Innovation Engine, `go fmt` is what is used to format the
code for the project.

The commit style for individual commits doesn't necessarily matter as
all commits from a PR branch will be squashed and merged into the main
branch when PRs are completed.

<!-- omit in toc -->
## Attribution
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
102 changes: 102 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.PHONY: build-ie build-api build-all run-ie run-api clean test-all test all

BINARY_DIR := bin
IE_BINARY := $(BINARY_DIR)/ie
API_BINARY := $(BINARY_DIR)/api

# -------------------------- Native build targets ------------------------------

build-ie:
@echo "Building the Innovation Engine CLI..."
@CGO_ENABLED=0 go build -o "$(IE_BINARY)" cmd/ie/ie.go

build-api:
@echo "Building the Innovation Engine API..."
@CGO_ENABLED=0 go build -o "$(API_BINARY)" cmd/api/main.go

build-runner: build-ie build-api
@echo "Building the Innovation Engine Runner..."
@CGO_ENABLED=0 go build -o "$(BINARY_DIR)/runner" cmd/runner/main.go

build-all: build-ie build-api build-runner

# ------------------------------ Test targets ----------------------------------

test-all:
@echo "Running all tests..."
@go clean -testcache
@go test -v ./...

SUBSCRIPTION ?= 00000000-0000-0000-0000-000000000000
SCENARIO ?= ./README.md
test-scenario:
@echo "Running scenario $(SCENARIO)"
$(IE_BINARY) test $(SCENARIO) --subscription $(SUBSCRIPTION)

test-scenarios:
@echo "Testing out the scenarios"
for dir in ./scenarios/ocd/*/; do \
$(MAKE) test-scenario SCENARIO="$${dir}README.md" SUBCRIPTION="$(SUBSCRIPTION)"; \
done

# ------------------------------- Run targets ----------------------------------

run-ie: build-ie
@echo "Running the Innovation Engine CLI"
@"$(IE_BINARY)"

run-api: build-api
@echo "Running the Innovation Engine API"
@"$(API_BINARY)"

clean:
@echo "Cleaning up"
@rm -rf "$(BINARY_DIR)"

# ----------------------------- Docker targets ---------------------------------

API_IMAGE_TAG ?= latest

# Builds the API container.
build-api-container:
@echo "Building the Innovation Engine API container"
@docker build -t innovation-engine-api:$(API_IMAGE_TAG) -f infra/api/Dockerfile .


# ----------------------------- Kubernetes targets -----------------------------

# Applies the ingress controller to the cluster and waits for it to be ready.
k8s-deploy-ingress-controller:
@echo "Deploying the ingress controller to your local cluster..."
@kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.1/deploy/static/provider/cloud/deploy.yaml
@kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s

# Deploys the API deployment, service, and ingress specifications to the
# cluster, allowing the API to be accessed via the ingress controller.
k8s-deploy-api: build-api-container
@echo "Deploying the Innovation Engine API container to your local cluster..."
@kubectl apply -f infra/api/deployment.yaml
@kubectl apply -f infra/api/service.yaml
@kubectl apply -f infra/api/ingress.yaml

k8s-initialize-cluster: k8s-deploy-ingress-controller k8s-deploy-api
@echo "Set up Kubernetes cluster for local development."

k8s-delete-ingress-controller:
@echo "Deleting the ingress controller from your local cluster..."
@kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.7.1/deploy/static/provider/cloud/deploy.yaml

k8s-delete-api:
@echo "Deleting the Innovation Engine API container from your local cluster..."
@kubectl delete -f infra/api/deployment.yaml
@kubectl delete -f infra/api/service.yaml
@kubectl delete -f infra/api/ingress.yaml

k8s-refresh-api: k8s-delete-api k8s-deploy-api
@echo "Refreshed the Innovation Engine API container in your local cluster..."

k8s-delete-cluster: k8s-delete-api k8s-delete-ingress-controller
@echo "Deleted Kubernetes cluster for local development."

k8s-refresh-cluster: k8s-delete-cluster k8s-initialize-cluster
@echo "Refreshed Kubernetes cluster for local development."
Loading
Loading