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

[internal docs ]adding readme.io manual sync instructions #304

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions docs/readme.md
Original file line number Diff line number Diff line change
@@ -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 <your_api_key_here> --version 4.0 --docs ~/Github/agent/docs/readme-sync/v4.0`
and
`npx ts-node sync/index.ts --apiKey <your_api_key_here> --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).
Expand Down