diff --git a/.travis.yml b/.travis.yml index cb9747e9..1793a138 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ jobs: dist: xenial script: - make -e lint - - for f in `find scripts/dockerfiles -type f`; do echo $f; docker run --rm -i hadolint/hadolint < $f; done + - for f in `find scripts/dockerfiles -type f`; do echo $f; docker run --rm -i hadolint/hadolint:v2.1.0 < $f; done - stage: Tests name: coveralls diff --git a/docs/readme-sync/v3.1/deploy-as-a-microservice/012 - quickstart-for-agent.md b/docs/readme-sync/v3.1/deploy-as-a-microservice/012 - quickstart-for-agent.md index d0e3a8da..fe3de499 100644 --- a/docs/readme-sync/v3.1/deploy-as-a-microservice/012 - quickstart-for-agent.md +++ b/docs/readme-sync/v3.1/deploy-as-a-microservice/012 - quickstart-for-agent.md @@ -11,7 +11,7 @@ updatedAt: "2020-08-17T20:51:52.458Z" This brief quickstart describes how to run Agent, using two examples: -- To get started using Docker, see [Running locally via Docker](https://docs.developers.optimizely.com/full-stack/docs/quickstart-with-docker#section-running-locally-via-docker). +- To get started using Docker, see the following section. - To get started using example Node microservices, see the following video link. @@ -85,4 +85,4 @@ resp = s.post(url = 'http://localhost:8080/v1/activate', params=params, json=pay print(resp.json()) ``` -The activate API is a POST to signal to the caller that there are side-effects. Namely, activation results in a "decision" event sent to Optimizely analytics for the purpose of analyzing Feature Test results. A "decision" will NOT be sent if the feature is simply part of a rollout. \ No newline at end of file +The activate API is a POST to signal to the caller that there are side-effects. Namely, activation results in a "decision" event sent to Optimizely analytics for the purpose of analyzing Feature Test results. A "decision" will NOT be sent if the feature is simply part of a rollout. diff --git a/docs/readme-sync/v3.1/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md b/docs/readme-sync/v3.1/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md index a5dd0c42..0bf59ca2 100644 --- a/docs/readme-sync/v3.1/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md +++ b/docs/readme-sync/v3.1/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md @@ -8,7 +8,7 @@ metadata: createdAt: "2020-02-21T17:44:53.019Z" updatedAt: "2020-04-13T23:02:34.056Z" --- -Below is an example demonstrating the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the API documentation is defined via an OpenAPI (Swagger) spec and can be viewed [here](https://library.optimizely.com/docs/api/agent/v1/index.htm). +Below is an example demonstrating the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the API documentation is defined via an OpenAPI (Swagger) spec and can be viewed [here](https://library.optimizely.com/docs/api/agent/v1/index.html). ## Start an http session Each request made into Optimizely Agent is in the context of an Optimizely SDK Key. SDK Keys map API requests to a specific Optimizely Project and Environment. We can setup a global request header by using the `requests.Session` object. diff --git a/docs/readme-sync/v4.0/deploy-as-a-microservice/012 - quickstart-for-agent.md b/docs/readme-sync/v4.0/deploy-as-a-microservice/012 - quickstart-for-agent.md index 643778fd..071f052b 100644 --- a/docs/readme-sync/v4.0/deploy-as-a-microservice/012 - quickstart-for-agent.md +++ b/docs/readme-sync/v4.0/deploy-as-a-microservice/012 - quickstart-for-agent.md @@ -11,7 +11,7 @@ updatedAt: "2021-03-15T23:02:34.056Z" This brief quickstart describes how to run Agent, using two examples: -- To get started using Docker, see [Running locally via Docker](https://docs.developers.optimizely.com/full-stack/docs/quickstart-with-docker#section-running-locally-via-docker). +- To get started using Docker, see the following section. - To get started using example Node microservices, see the following video link. diff --git a/docs/readme-sync/v4.0/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md b/docs/readme-sync/v4.0/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md index 6628abee..85715af7 100644 --- a/docs/readme-sync/v4.0/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md +++ b/docs/readme-sync/v4.0/deploy-as-a-microservice/030 - use-optimizely-agent/010 - evaluate-rest-apis.md @@ -8,7 +8,7 @@ metadata: createdAt: "2020-02-21T17:44:53.019Z" updatedAt: "2021-03-15T23:02:34.056Z" --- -Below is an example demonstrating the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the API documentation is defined via an OpenAPI (Swagger) spec and can be viewed [here](https://library.optimizely.com/docs/api/agent/v1/index.htm). +Below is an example demonstrating the APIs capabilities. For brevity, we've chosen to illustrate the API usage with Python. Note that the API documentation is defined via an OpenAPI (Swagger) spec and can be viewed [here](https://library.optimizely.com/docs/api/agent/v1/index.html). ## Start an http session Each request made into Optimizely Agent is in the context of an Optimizely SDK Key. SDK Keys map API requests to a specific Optimizely Project and Environment. We can setup a global request header by using the `requests.Session` object. diff --git a/docs/readme.md b/docs/readme.md index 04155680..a6b71a4f 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,9 +1,19 @@ ## Internal docs authoring notes +### deploying to readme.io When you edit the docs in /docs/readme-sync/ and merge to the master branch, you trigger a Travis build stage (readme-sync) that syncs the Markdown doc files to FullStack public docs at https://docs.developers.optimizely.com/full-stack/docs/optimizely-agent. +If for any reason the travis build isn't working, you can publish the docs from GitHub to readme.io manually. For the sync tool's readme see [https://github.com/flowcommerce/readme-sync](https://github.com/flowcommerce/readme-sync). Here are quick instructions: +1. clone https://github.com/flowcommerce/readme-sync to an environment in which you've installed Node & NPX. +2. clone this agent repo +3. Record the API key for the the full stack docs project (https://dash.readme.com/project/full-stack/v4.0/api-key) +4. From the readme-sync cloned directory, run the sync for the docs version you want using the API key and the local directory path to the docs, i.e: +`npx ts-node sync/index.ts --apiKey --version 4.0 --docs ~/Github/agent/docs/readme-sync/v4.0` +and +`npx ts-node sync/index.ts --apiKey --version 3.1 --docs ~/Github/agent/docs/readme-sync/v3.1` + ### Previewing Before you commit to master, there's a travis stage that syncs your branch's changes to a ReadMe sandbox so you can preview the published output, https://docs.developers.optimizely.com/full-stack/docs/ (you need to be logged into ReadMe to see this sandbox, since it's not public).