✨ Add sigma builder to image (#201) #560
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
name: E2E CI | |
on: | |
push: | |
branches: | |
- main | |
- gh-readonly-queue/main/* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
e2e-test: | |
name: e2e-test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Build | |
run: | | |
IP=`hostname -I | awk '{print $1}'` | |
echo '{"insecure-registries" : ["'$IP':3000"]}' | sudo tee /etc/docker/daemon.json | |
sudo service docker restart | |
echo $DOCKER_HOST | |
docker buildx create --use | |
docker buildx build -f build/Dockerfile --platform linux/amd64 --progress plain --output type=docker,dest=- -t sigma:latest . | docker load | |
- name: Run sigma | |
run: | | |
docker run --name sigma -v /var/run/docker.sock:/var/run/docker.sock -d -p 3000:3000 sigma:latest | |
sleep 5 | |
docker logs sigma | |
- name: Test push and e2e with k6 | |
run: | | |
./e2e/push.sh | |
curl https://github.com/grafana/k6/releases/download/v0.46.0/k6-v0.46.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 | |
./k6 run e2e/sc.js |