-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
2 changed files
with
83 additions
and
3 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,80 @@ | ||
version: 2.1 | ||
jobs: | ||
crawler: | ||
machine: | ||
image: ubuntu-2004:2023.02.1 | ||
resource_class: xlarge | ||
environment: | ||
RUSTFLAGS: "-D warnings" | ||
IMAGE_NAME: a11ywatch/crawler | ||
DOCKER_BUILDKIT: 1 | ||
BUILDX_PLATFORMS: linux/amd64,linux/arm64 | ||
|
||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- node-v1-{{ .Branch }}-{{ checksum "Cargo.lock" }} | ||
- node-v1-{{ .Branch }}- | ||
- node-v1- | ||
|
||
- run: | ||
name: Login to Dockerhub | ||
command: echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | ||
|
||
- run: | ||
name: Install buildx | ||
command: | | ||
curl --output docker-buildx --silent --show-error --location --fail --retry 3 \ | ||
"https://github.com/docker/buildx/releases/download/v0.9.1/buildx-v0.9.1.linux-amd64" | ||
mkdir -p ~/.docker/cli-plugins | ||
mv docker-buildx ~/.docker/cli-plugins/ | ||
chmod a+x ~/.docker/cli-plugins/docker-buildx | ||
- run: | ||
name: Install Rust | ||
command: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh | ||
chmod +x rustup.sh | ||
./rustup.sh -y | ||
source "$HOME"/.cargo/env | ||
sudo apt-get update | ||
sudo apt-get -y --no-install-recommends install libssl-dev qemu gcc-aarch64-linux-gnu qemu-user-static | ||
- run: | ||
name: Test image | ||
command: cargo test --all-features | ||
|
||
- run: | ||
name: Setup buildx | ||
command: docker buildx create --driver docker-container --name local --buildkitd-flags '--allow-insecure-entitlement security.insecure' --use | ||
|
||
- run: | ||
name: Build and Push Latest (Alpine) | ||
no_output_timeout: 30m | ||
command: docker buildx build --platform $BUILDX_PLATFORMS -t $IMAGE_NAME:latest -t $IMAGE_NAME:alpine --push . -f docker/Dockerfile | ||
|
||
- run: | ||
name: Build and Push (Debian) | ||
no_output_timeout: 30m | ||
command: | | ||
docker buildx build --platform $BUILDX_PLATFORMS -t $IMAGE_NAME:debian --push . -f docker/Dockerfile.debian | ||
- run: | ||
name: Build and Push (Ubuntu) | ||
no_output_timeout: 30m | ||
command: | | ||
docker buildx build --platform $BUILDX_PLATFORMS -t $IMAGE_NAME:ubuntu --push . -f docker/Dockerfile.ubuntu | ||
- save_cache: | ||
paths: | ||
- ~/usr/local/lib/target | ||
key: node-v1-{{ .Branch }}-{{ checksum "Cargo.lock" }} | ||
|
||
workflows: | ||
build_and_test: | ||
jobs: | ||
- crawler |
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 |
---|---|---|
|
@@ -160,10 +160,10 @@ This is required since every request spawns a thread. Isolating the context dras | |
|
||
If you need help implementing the gRPC server to receive the pages or links when found check out the [gRPC node example](https://github.com/A11yWatch/a11ywatch-core/blob/main/src/proto/website-server.ts) for a starting point . | ||
|
||
## TODO | ||
## Donations | ||
|
||
1. Allow gRPC server port setting or change to direct url:port combo. | ||
1. add protoc pre-compiled binary [installation](https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os). | ||
Building the project is a bit expensive, we take all contributions including help with cost to deploy the best docker images for everyone to utilize. | ||
If you want to help send an email to [a11ywatch support]([email protected]). At A11yWatch we use a custom variation of the project and we do not need to target other platforms since we deploy on similiar architecture. Helping give back to the community requires a bit more time and effort for some of the solutions that we released to the community. | ||
|
||
## LICENSE | ||
|
||
|