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

Docs: Add Travis CI + Azure Web App integration #1238

Closed
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@molant
Member

molant commented Aug 15, 2018

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.

Short description of the change(s)

Added documentation on how to integrate Travis CI + Azure Web App + webhint.

Remaining work:

  • Optimize images

Ref #1037

@molant molant requested review from alrra and sarvaje as code owners Aug 15, 2018

@molant

This comment has been minimized.

Member

molant commented Aug 15, 2018

I'm not closing #1037 because there are a couple scenarios I still want to cover.

@molant

This comment has been minimized.

Member

molant commented Aug 15, 2018

@IAmHopp new documentation for the site in case you want to review it 😊

1. Select "Deployment slots" in the blade of your Azure Web App:
![Deployment slots menu button](images/slots-1.png)

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Optimize images.

This comment has been minimized.

@molant

molant Aug 15, 2018

Member

Will do at the end 😊

@@ -0,0 +1,22 @@
# Development flow integration
`webhint` can be used at different steps of the development flow. The

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

during different ?

This comment has been minimized.

@molant

molant Aug 15, 2018

Member

That's more stylistic than anything else, right?

`webhint` can be used at different steps of the development flow. The
following is a guide that ilustrates some of this scenarios and how can
they be achieved. If you have another scenario that is not in here, please
open an issue [on webhint's GitHub repo][webhint github] so we can

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

in the webhint GitHub

This comment has been minimized.

@molant

molant Aug 15, 2018

Member

in the webhint's GitHub repo ?

* [Local server][local server]: Test a local instance of your website.
* [Travis CI and Azure Web App][travis azure]: Publish to an staging
environment and automatically deploy to production if there are not any

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

there are no issues

@@ -56,7 +44,7 @@ and once it ends, kill the server started by `http-server`:
"scripts": {
...
"start": "http-server dist -s -g",
"webhint": "^1.0.0",
"hint": "^3.0.0",

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

"hint": "hint"

@IAmHopp

This comment has been minimized.

Contributor

IAmHopp commented Aug 15, 2018

@IAmHopp new documentation for the site in case you want to review it 😊

On it! Thanks for the heads up. 😁

First thing you have to do is add `webhint` to your project:
```bash

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

This comment has been minimized.

@molant

molant Aug 15, 2018

Member

There was an extra space in one of the closing ones. I'll update all the doc and remove all the enable/disable comments.

```bash
npm install --save-dev webhint

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

following command and answer the questions:
```bash

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

```bash
npm create hintrc

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

```
You can use the generated file as a starter point for your needs, ignoring
urls you do not have control, tweaking the configuration of some of the

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

URLs

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

Change 'do not have control' to 'do not control' or 'do not have control over'.

<!-- markdownlint-disable MD032 -->
```yml

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

- provider: azure_web_apps
...

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove empty line.

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Do the same for the other.

...
before_deploy: mv .gitignore.prod .gitignore

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

For consistency and better readability, maybe have:

before_deploy: 
  - mv .gitignore.prod .gitignore
...
before_deploy: mv .gitignore.prod .gitignore

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

For consistency and better readability, maybe have:

before_deploy: 
  - mv .gitignore.prod .gitignore
skip_cleanup: true
after_deploy:
3 - npm run test-staging

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Remove3

<!-- Link labels: -->
[local server]: ./local-server.md
[travis azure]: ./travis-and-azure.md

This comment has been minimized.

@alrra

alrra Aug 15, 2018

Member

Maybe have a Travis only case, without deploy, and just link to the specific part of travis-and-azure.md docs that explains that?

This comment has been minimized.

@molant

molant Aug 15, 2018

Member

But how on travis? It could be a local server started during the build and then we will have to link to the local server document.

@IAmHopp

Check these out once you have the time. (:

# Development flow integration
`webhint` can be used at different steps of the development flow. The
following is a guide that ilustrates some of this scenarios and how can

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

* illustrates

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

* these scenarios

`webhint` can be used at different steps of the development flow. The
following is a guide that ilustrates some of this scenarios and how can
they be achieved. If you have another scenario that is not in here, please
open an issue [in the `webhint`'s GitHub repo][webhint github] so we can

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

Add a comma before 'so we can'.

investigate how to support it:
* [Local server][local server]: Test a local instance of your website.
* [Travis CI and Azure Web App][travis azure]: Publish to an staging

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

* a staging

`webhint` can be used at different steps of the development flow. The
following is a guide that ilustrates some of this scenarios and how can
they be achieved. If you have another scenario that is not in here, please

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

I think 'they can' would read better than 'can they' here.

@@ -56,7 +44,7 @@ and once it ends, kill the server started by `http-server`:
"scripts": {

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

[Up top, was committed before this PR] it's waiting -> it'll be waiting
thus never executing -> it won't execute

Add a comma after 'To solve this issue'.

* simultaneously

* Modifying the `.gitignore` file during the build can be cumbersome and
errors here can be difficult to catch.
To solve this issues, you should collapse the different stage scripts into the

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

* these issues

errors here can be difficult to catch.
To solve this issues, you should collapse the different stage scripts into the
`script` stage. In the case of webhint.io it looks as follows:

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

Add a comma after 'webhint.io'.

```
You want to also swap if everything goes right. To do this, the first

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

I think 'You also want to' would read better than 'You want to also'.

You want to also swap if everything goes right. To do this, the first
step is to [install the Azure CLI][azure cli] in Travis CI. The
following snippet of `.travis.yml` assumes the machine is a Linux one:

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

Change 'is a Linux one' to 'runs Linux'.

```
**NOTE:** Remember that all stages after `script` will not change the
build status, nor will interrupt the execution, so you might want to

This comment has been minimized.

@IAmHopp

IAmHopp Aug 15, 2018

Contributor

Change 'nor will' to 'nor' or 'not will they'.

@molant

This comment has been minimized.

Member

molant commented Aug 15, 2018

OK, I think I got all the feedback in except any comments done directly. Thanks a lot for your review @IAmHopp !

@IAmHopp

This comment has been minimized.

Contributor

IAmHopp commented Aug 15, 2018

Anytime! 😁

[I think 'simultaneously' is still wrong in development-flow-integration/local-server, though, in case you wanna take another look.]

@molant

This comment has been minimized.

Member

molant commented Aug 15, 2018

@IAmHopp you are right. I aded ly at the end but didn't see there were other issues in that word. Should be fixed now 🤞
Thanks again!

@IAmHopp

👌

@@ -72,3 +60,7 @@ and once it ends, kill the server started by `http-server`:
[npm scripts]: https://docs.npmjs.com/misc/scripts
[npm-run-all]: https://www.npmjs.com/package/npm-run-all
[webhint github]: https://github.com/webhintio/hint/issues/new
[webhint repo]: https://github.com/webhintio/hint/
[webhintio repo]: https://github.com/webhintio/webhint.io/

This comment has been minimized.

@alrra

alrra Aug 16, 2018

Member

Remove empty line.

@alrra alrra closed this in 47f0829 Aug 16, 2018

@molant molant deleted the molant:docs/travis-azure branch Sep 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment