-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b0b7f4f
Showing
690 changed files
with
59,209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
version: 2 | ||
|
||
defaults: &defaults | ||
docker: | ||
- image: circleci/node:10.19.0 | ||
environment: | ||
JOBS: 1 | ||
working_directory: ~/k6-docs | ||
|
||
jobs: | ||
build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: npm install | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- . | ||
|
||
deploy-to-staging: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Setup Environment Variables | ||
command: | | ||
echo "export GATSBY_GOOGLE_API_KEY=${GATSBY_GOOGLE_API_KEY_STAG}" > $BASH_ENV | ||
echo "export GATSBY_DRIFT_API=${GATSBY_DRIFT_API_STAG}" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_MAIN_URL=https://${MAIN_URL_STAG}" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_DOC_URL=https://${MAIN_URL_STAG}/docs" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_BLOG_URL=https://${MAIN_URL_STAG}/blog" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_APP_URL=https://app.${MAIN_URL_STAG}" >> $BASH_ENV | ||
echo "export BUCKET_NAME=${BUCKET_NAME_STAG}" >> $BASH_ENV | ||
echo "export BUCKET_REGION=${BUCKET_REGION_STAG}" >> $BASH_ENV | ||
echo "export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_STAG}" >> $BASH_ENV | ||
echo "export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_STAG}" >> $BASH_ENV | ||
echo "export AWS_CLOUDFRONT_DISTRIBUTION_ID=${AWS_CLOUDFRONT_DISTRIBUTION_ID_STAG}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_APP_ID=${GATSBY_ALGOLIA_APP_ID_STAG}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_INDEX_NAME=${GATSBY_ALGOLIA_INDEX_NAME_STAG}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_SEARCH_ONLY_KEY=${GATSBY_ALGOLIA_SEARCH_ONLY_KEY_STAG}" >> $BASH_ENV | ||
echo "export ALGOLIA_ADMIN_KEY=${ALGOLIA_ADMIN_KEY_STAG}" >> $BASH_ENV | ||
- run: sudo apt-get update && sudo apt-get -y install python-pip python-dev | ||
- run: sudo pip install awscli | ||
- run: npm run build:gatsby | ||
- run: npm run deploy | ||
|
||
|
||
deploy-to-production: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Setup Environment Variables | ||
command: | | ||
echo "export GATSBY_GOOGLE_API_KEY=${GATSBY_GOOGLE_API_KEY_PROD}" > $BASH_ENV | ||
echo "export GATSBY_DRIFT_API=${GATSBY_DRIFT_API_PROD}" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_MAIN_URL=https://k6.io" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_DOC_URL=https://k6.io/docs" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_BLOG_URL=https://k6.io/blog" >> $BASH_ENV | ||
echo "export GATSBY_DEFAULT_APP_URL=https://app.k6.io" >> $BASH_ENV | ||
echo "export BUCKET_NAME=${BUCKET_NAME_PROD}" >> $BASH_ENV | ||
echo "export BUCKET_REGION=${BUCKET_REGION_PROD}" >> $BASH_ENV | ||
echo "export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID_PROD}" >> $BASH_ENV | ||
echo "export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY_PROD}" >> $BASH_ENV | ||
echo "export AWS_CLOUDFRONT_DISTRIBUTION_ID=${AWS_CLOUDFRONT_DISTRIBUTION_ID_PROD}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_APP_ID=${GATSBY_ALGOLIA_APP_ID_PROD}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_INDEX_NAME=${GATSBY_ALGOLIA_INDEX_NAME_PROD}" >> $BASH_ENV | ||
echo "export GATSBY_ALGOLIA_SEARCH_ONLY_KEY=${GATSBY_ALGOLIA_SEARCH_ONLY_KEY_PROD}" >> $BASH_ENV | ||
echo "export ALGOLIA_ADMIN_KEY=${ALGOLIA_ADMIN_KEY_PROD}" >> $BASH_ENV | ||
- run: sudo apt-get update && sudo apt-get -y install python-pip python-dev | ||
- run: sudo pip install awscli | ||
- run: npm run build:gatsby | ||
- run: npm run deploy | ||
|
||
|
||
|
||
workflows: | ||
version: 2 | ||
build-deploy: | ||
jobs: | ||
- build: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- deploy-to-staging: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: develop | ||
- deploy-to-production: | ||
requires: | ||
- build | ||
filters: | ||
branches: | ||
only: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
GATSBY_DEFAULT_BLOG_URL=https://k6.io/blog | ||
GATSBY_DEFAULT_DOC_URL=http://localhost:8000 | ||
GATSBY_DEFAULT_MAIN_URL=https://k6.io | ||
|
||
GATSBY_ALGOLIA_APP_ID= | ||
GATSBY_ALGOLIA_SEARCH_ONLY_KEY= | ||
GATSBY_ALGOLIA_INDEX_NAME= | ||
ALGOLIA_ADMIN_KEY= | ||
GATSBY_DRIFT_API= | ||
|
||
# leave empty to disable | ||
# true to enable | ||
GATSBY_FEATURE_EDIT_ARTICLE_BTN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.cache/ | ||
public/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"rules": { | ||
"prettier/prettier": ["error"], | ||
"camelcase": 0, | ||
"object-curly-newline": 0, | ||
"operator-linebreak": 0, | ||
"no-shadow": 0, | ||
"max-len": [2, 120], | ||
"react/prop-types": 0, | ||
"react/jsx-curly-brace-presence": [ | ||
2, | ||
{ | ||
"props": "always", | ||
"children": "never" | ||
} | ||
], | ||
"react/jsx-tag-spacing": [ | ||
2, | ||
{ | ||
"closingSlash": "never", | ||
"beforeSelfClosing": "never", | ||
"afterOpening": "never", | ||
"beforeClosing": "never" | ||
} | ||
], | ||
"react/jsx-filename-extension": [ | ||
2, | ||
{ | ||
"extensions": [".js"] | ||
} | ||
], | ||
"react/no-array-index-key": 0, | ||
"react/jsx-one-expression-per-line": 0, | ||
"react/jsx-props-no-spreading": 0, | ||
"react/jsx-wrap-multilines": 0, | ||
"import/order": 0, // TODO: Come up with a solution for this | ||
"import/no-unresolved": [ | ||
2, | ||
{ | ||
"ignore": [ | ||
"components", | ||
"images", | ||
"layouts", | ||
"pages", | ||
"templates", | ||
"styles", | ||
"svg", | ||
"utils" | ||
] | ||
} | ||
], | ||
"import/prefer-default-export": 0, | ||
"jsx-a11y/html-has-lang": 0, // We use react-helmet for that | ||
"jsx-a11y/control-has-associated-label": 0 | ||
}, | ||
"extends": ["airbnb", "prettier"], | ||
"plugins": ["prettier"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Packages | ||
yarn.lock | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# dotenv environment variables file | ||
.env.development | ||
.env.production | ||
|
||
# gatsby files | ||
.cache/ | ||
public | ||
|
||
# Mac files | ||
.DS_Store | ||
|
||
# Yarn | ||
yarn-error.log | ||
.pnp/ | ||
.pnp.js | ||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
.idea/ | ||
|
||
.vscode/snipsnap.code-snippets | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# disable formatting for code snippets | ||
src/data/home-examples/* | ||
src/data/native-automation-instruction/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting Robin: [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Contributing to the k6 documentation | ||
==================================== | ||
|
||
Thank you for your interest in contributing to k6! | ||
|
||
(ノ◕ヮ◕)ノ*:・゚✧ | ||
|
||
Before you begin, make sure to familiarize yourself with the [Code of Conduct](CODE_OF_CONDUCT.md). If you've previously contributed to other open source project, you may recognize it as the classic [Contributor Covenant](https://contributor-covenant.org/). | ||
|
||
If you want to chat with the team or the community, you can join the [k6 Slack](https://k6.io/slack/) or post a question on the [k6 community forum](https://community.k6.io/). | ||
|
||
## Writing | ||
|
||
The k6 documentation is a Gatsby application using React components and markdown files for the content of the different pages. | ||
|
||
There are two types of pages: Welcome Pages and Documentation articles. | ||
|
||
[Welcome Pages](src/templates/docs) are the pages shown on the header menu: `Guides`, `Javascript API`, `Cloud Docs`, `Integration`, and `Examples`. They are made as separate React Components for maximum customisation. | ||
|
||
Documentation articles are markdown files structured under the [`src/data/markdown/docs`](src/data/markdown/docs) folder. | ||
|
||
If you want to know more about how to edit these pages, read more about the [File format](CONTRIBUTING_FILE_FORMAT.md) |
Oops, something went wrong.