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

Gitlab CI\CD + Loki 0.35.0 doesn't work #529

Open
Misterion96 opened this issue Nov 26, 2024 · 0 comments
Open

Gitlab CI\CD + Loki 0.35.0 doesn't work #529

Misterion96 opened this issue Nov 26, 2024 · 0 comments

Comments

@Misterion96
Copy link

Hi

I am trying to use Loki to test a storybook.

The initial setup with runner on local machine didn't cause any problems.

The problems start when the runner is a docker, and trying to somehow either configure the runner by network configuration fails

can you suggest what I missed in the configuration ?

  • commands
 "ci:storybook:build": "storybook build --quiet",
 "ci:loki": "loki test --requireReference --reactUri file:./storybook-static"
  • job ci\cd
variables:
  DOCKER_IMAGE_CHROME_HEADLESS: yukinying/chrome-headless-browser-stable:118.0.5993.117

validate-loki:
  <<: *merge-request-rules
  stage: validate
  needs:
    - pnpm-install
  extends:
    - .pnpm-ci-command
  image: docker:24.0.5
  services:
    - docker:24.0.5-dind
    - name: $DOCKER_IMAGE_CHROME_HEADLESS
      alias: chrome
  variables:
    DOCKER_HOST: tcp://docker:2375
    DOCKER_TLS_CERTDIR: ""
  before_script:
    - apk update && apk add --no-cache nodejs npm
    - node -v
    - npm install -g pnpm
  script:
    - pnpm run ci:storybook:build
    - pnpm run ci:loki
  • output console
Pulling docker image yukinying/chrome-headless-browser-stable:118.0.5993.117 ...
Using docker image sha256:7826a16052ece1df73c1bbdc1afe25f4dddabd4e433903d84df6ba9c4fb53f4e for yukinying/chrome-headless-browser-stable:[11](http://gitlab.untitled.ninja/mdolgikh/uikit/-/jobs/977#L11)8.0.5993.117 with digest yukinying/chrome-headless-browser-stable@sha256:626c200c0a94e7ee87cc883e4ae6d5f47a4639c31e316e76f4c684bdf4be9934 ...
Waiting for services to be up and running (timeout 30 seconds)...
*** WARNING: Service runner-zny3w-rjh-project-20-concurrent-0-0a0ad4904b6ffde4-yukinying__chrome-headless-browser-stable-1 probably didn't start properly.
Health check error:
service "runner-zny3w-rjh-project-20-concurrent-0-0a0ad4904b6ffde4-yukinying__chrome-headless-browser-stable-1" has no exposed ports
Service container logs:
2024-11-26T17:19:25.76268[15](http://gitlab.untitled.ninja/mdolgikh/uikit/-/jobs/977#L15)44Z find: '/home/headless/.config/chromium/Crash Reports/pending/': No such file or directory
*********

.....


DEBUG=true loki test --requireReference --reactUri file:./storybook-static --verbose
loki test v0.35.0
(node:279) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.
 SDK releases are limited to address critical bug fixes and security issues only.
Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
PASS chrome.docker/PREPARE
Waiting for 172.17.0.2:55817.....
Timeout
PASS chrome.docker/START
FAIL chrome.docker/FETCH_STORIES: Failed fetching stories because the server is down
Try starting it with "yarn storybook" or pass the --port or --host arguments if it's not running at http://host.docker.internal:25136/
FAIL chrome.docker: Some tasks failed to run
Some visual tests failed to run
 ELIFECYCLE  Command failed with exit code 1.
ERROR: Job failed: exit code 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant