-
Notifications
You must be signed in to change notification settings - Fork 166
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
Implement CI/CD process #72
Comments
Discussion results:
We can still use Travis CI, and probably minimize our compute cost for the test deployments and load testing as well. |
@hosungs For any fork or pull request linting of the templates is done. This also includes code styling. Both Styling and Linting is done via JS hint. If the correct Environment variables are set in Travis CI for the repository, the stack template is also validated and deployed (including Moodle) using the Azure CLI. The created stack is removed as part of the script clean up. So even on failure there are no resources left in Azure to cost money. This also means that individual developers can use their own Azure accounts for testing prior to a pull request if they want. A good place to start is the .travis.yml file to see how things are done. It is now looking like we will need to switch from the Azure CLI tools to the Python Azure SDK, in order to achieve the requirement. Notably we need to capture the output of the Another issue that will be solved by moving from the Azure CLI to the Python SDK. If logging is set to minimal for the create process, Travis can time out the process as there are steps that don't output anything for more than 10minutes. Travis treats this as a failure condition. If logging is set to be verbose, the create process outputs more than 4MB of console output. Travis treats this as a failure condition. |
Thanks @mattporritt for your detailed description. I'll go over your PR very soon, and I just wanted to mention what we discussed over the call yesterday. Switching to the Azure Python SDK is a good idea and I fully support it for future benefits. I also wanted to mention that if that switch takes longer than desired, we can keep using Azure CLI with the following alternatives:
I understand that this will add some non-trivial logic (polling, breaking, ...) to the shell command, which better be done in a better programming environment like Python. Just mentioning this that we'd want to evaluate all the available options and pick the right and also the most efficient solution. |
Sorry for not waiting for your Python SDK-based implementation, but I had to go ahead and implement the async initiation and periodic polling using bash anyway, as I was testing this CI from my side. Please see the latest master branch for the updates. |
We should have a CI/CD process that validates every PR for best practices and template deployment correctness. A CI/CD process for our repo should also handle the pre-commit checks mentioned in #7. It'll probably closely follow what Azure/azure-quickstart-templates is doing, especially with their Travis CI process. With the latest azuredeploy.parameters.json and added options (MS SQL, optional redis, optional elastic search, ...) a test deployment should be possible within reasonable amount of time (about 30 minutes).
For an example CI/CD build on the Azure/azure-quickstart-template repo, see this (a PR from myself to integrate our changes in Azure/Moodle to Azure/azure-quickstart-templates repo) and the actual Travis CI build logs (can be accessed from the PR link by clicking the "Show All Checks" link and then clicking the "Details" link for continuous-integration/travis-ci/pr item.
The text was updated successfully, but these errors were encountered: