https://github.com/yhatt/circleci-artifacts-redirector
Path resolver and redirect server of CircleCI's build artifacts.
https://github.com/yhatt/circleci-artifacts-redirector
Last synced: about 1 year ago
JSON representation
Path resolver and redirect server of CircleCI's build artifacts.
- Host: GitHub
- URL: https://github.com/yhatt/circleci-artifacts-redirector
- Owner: yhatt
- License: mit
- Created: 2017-09-07T15:56:25.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-08T13:28:32.000Z (almost 9 years ago)
- Last Synced: 2025-03-10T18:31:58.047Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CircleCI artifacts redirector
Path resolver and redirect server of [CircleCI](https://circleci.com/)'s [build artifacts](https://circleci.com/docs/2.0/artifacts/).
## Getting started
### Run by [docker](https://hub.docker.com/r/yhatt/circleci-artifacts-redirector/)
With this command, the redirect server will be listening on port 8080:
```bash
$ docker run -d -p 8080:80 yhatt/circleci-artifacts-redirector
```
### Run express server
```bash
$ git clone https://github.com/yhatt/circleci-artifacts-redirector.git
$ npm install
$ npm start
```
## How to use
You can access to the CircleCI build artifact URL with redirect. It would resolve from the path specified by query options.
```
http://localhost:8080/?path=artifact.html&user=yhatt&project=circleci-artifacts-redirector&token=xxxxxxxxxxxxxxxx
```
#### Options
##### Reqruied
- `user`: User name of repository.
- `project`: Project name of repository.
- `token`: CircleCI's API token for build artifacts. You could create it in [User Settings > Personal API Tokens](https://circleci.com/account/api) on CircleCI.
- `path`: The path to build artifact.
##### Optional
- `vcs`: VCS type to pass to API. (`github` by default)
- `branch`: The name of branch that you want to get artifacts. (`master` by default)
- `build`: Build number of CircleCI. (`latest` by default)
- `filter`: Restricts which builds are returned. [See CircleCI API reference.](https://circleci.com/docs/api/v1-reference/#build-artifacts-latest)
## Configuration
### Environments
- `CIRCLECI_ARTIFACTS_REDIRECTOR_PORT`: Listening port of express server (`8080` by default with running locally)
### [direnv](http://direnv.net/) support
You can configure specific envs if you are using [direnv](http://direnv.net/) and allowed it.
```bash
$ direnv allow
$ cp ./.envrc.local{.example,}
$ vi ./.envrc.local
```
## Author
Yuki Hattori ([@yhatt](https://github.com/yhatt/))
## License
This plugin releases under the [MIT License](https://github.com/yhatt/circleci-artifacts-redirector/blob/master/LICENSE).