Hey guys,
I am trying to run Chromatic on Bitbucket pipeline however, the deployment is failing on the cloud even though it is working fine locally
yarn build-storybook
Here is my pipeline config:
- step: &chromatic name: Publish to Chromatic script: - apk add --no-cache git - yarn - yarn chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --zip --only-changed --exit-zero-on-changes
Here is the error that am getting:
+ umask 000+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="fix-chromatic" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIRCloning into '/opt/atlassian/pipelines/agent/build'...+ git reset --hard 89e3ef14555fff81a954ed35ed541720fd594a9cHEAD is now at 89e3ef1 chore: update docker node image to v18.15.0+ git config user.name bitbucket-pipelines+ git config user.email commits-noreply@bitbucket.org+ git config push.default current+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME+ git reflog expire --expire=all --all+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude+ chmod 777 $BUILD_DIRArtifact "tag.txt": DownloadingArtifact "tag.txt": Downloaded 107 B in 0 secondsArtifact "tag.txt": ExtractingArtifact "tag.txt": Extracted in 0 secondsDefault variables:BITBUCKET_BRANCHBITBUCKET_BUILD_NUMBERBITBUCKET_CLONE_DIRBITBUCKET_COMMITBITBUCKET_GIT_HTTP_ORIGINBITBUCKET_GIT_SSH_ORIGINBITBUCKET_PIPELINE_UUIDBITBUCKET_PROJECT_KEYBITBUCKET_PROJECT_UUIDBITBUCKET_REPO_FULL_NAMEBITBUCKET_REPO_IS_PRIVATEBITBUCKET_REPO_OWNERBITBUCKET_REPO_OWNER_UUIDBITBUCKET_REPO_SLUGBITBUCKET_REPO_UUIDBITBUCKET_SSH_KEY_FILEBITBUCKET_STEP_RUN_NUMBERBITBUCKET_STEP_TRIGGERER_UUIDBITBUCKET_STEP_UUIDBITBUCKET_WORKSPACECIDOCKER_HOSTPIPELINES_JWT_TOKENWorkspace variables:AWS_ACCESS_KEYAWS_ACCESS_KEY_ID_CODE_ARTIFACTAWS_SECRET_KEYAWS_SECRET_KEY_ID_CODE_ARTIFACTBITBUCKET_SDLC_PASSBITBUCKET_SDLC_PASS_PRBITBUCKET_SDLC_USERCDK_DEFAULT_REGIONDATA_DEVSECOPS_IMAGE_PULLER_AWS_ACCESS_KEY_IDDATA_DEVSECOPS_IMAGE_PULLER_AWS_SECRET_ACCESS_KEYDATA_GITLEAKS_SLACK_WEBHOOK_URLDEV_ACCOUNT_ROLE_ARNGETIR_OPS_ACCOUNT_IDGITOPS_PASSWORDGITOPS_USERNAMEGOPRIVATEOAUTH_CLIENT_KEYOAUTH_CLIENT_SECRETPIPELINE_BITBUCKET_USERPIPELINE_BITBUCKET_USER_PASSWORDSONARQUBE_HOSTSONARQUBE_LOGINSONAR_TOKENSTG_ACCOUNT_ROLE_ARNTARGET_BRANCHRepository variables:AWS_ACCESS_KEY_IDAWS_ACCOUNT_IDAWS_DEFAULT_REGIONAWS_SECRET_ACCESS_KEYCHROMATIC_PROJECT_TOKENImages used:build : docker.io/library/node@sha256:47d97b93629d9461d64197773966cc49081cf4463b1b07de5a38b6bd5acfbe9d+ apk update && apk add --no-cache gitfetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gzfetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gzv3.17.3-86-gd961f255036 [https://dl-cdn.alpinelinux.org/alpine/v3.17/main]v3.17.3-89-g3fcf827ebca [https://dl-cdn.alpinelinux.org/alpine/v3.17/community]OK: 17818 distinct packages availablefetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/APKINDEX.tar.gzfetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/x86_64/APKINDEX.tar.gz(1/7) Installing ca-certificates (20220614-r4)(2/7) Installing brotli-libs (1.0.9-r9)(3/7) Installing nghttp2-libs (1.51.0-r0)(4/7) Installing libcurl (8.0.1-r0)(5/7) Installing libexpat (2.5.0-r0)(6/7) Installing pcre2 (10.42-r0)(7/7) Installing git (2.38.4-r1)Executing busybox-1.35.0-r29.triggerExecuting ca-certificates-20220614-r4.triggerOK: 18 MiB in 24 packages+ yarn installyarn install v1.22.19[1/4] Resolving packages...[2/4] Fetching packages...info There appears to be trouble with your network connection. Retrying...[3/4] Linking dependencies...warning " > @mui/x-date-pickers@6.0.4" has unmet peer dependency "@mui/system@^5.4.1".warning " > babel-loader@9.1.2" has unmet peer dependency "webpack@>=5".[4/4] Building fresh packages...$ husky installhusky - Git hooks installedDone in 85.48s.+ yarn chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --zip --only-changed --exit-zero-on-changesyarn run v1.22.19$ chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --zip --only-changed --exit-zero-on-changesChromatic CLI v6.17.2https://www.chromatic.com/docs/cliAuthenticating with Chromatic→ Connecting to https://index.chromatic.comAuthenticated with Chromatic→ Using project token '********f4f0'Retrieving git informationFound 62 changed files:https://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.eslintignorehttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.eslintrc.jsonhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.nvmrchttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.prettierignorehttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.prettierrc.json.storybook/main.cjshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.storybook/main.ts.storybook/preview.cjshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.storybook/preview.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.vscode/extensions.jsonhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/.vscode/settings.jsonhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/Dockerfilehttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/bitbucket-pipelines.ymlhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/index.htmlhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/package.jsonsrc/App.csshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/App.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/assets/react.svghttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/ErrorBoundary/index.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/Icon/GetirIcon.test.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/Icon/GetirIcon.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/Icon/Icon.stories.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/Icon/LazyGetirIcon.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/components/Icon/useIcon.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/constants/routes.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/contexts/LocaleContext/index.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/features/HomePage/index.tsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/icons/academia-outline.svghttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/icons/academia-solid.svgsrc/index.csshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/lang/en.jsonhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/lang/syncLocales.cjshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/lang/syncLocales.test.jsxhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/lang/tr.jsonhttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/main.tsxsrc/stories/Button.stories.tsxsrc/stories/Button.tsxsrc/stories/Header.stories.tsxsrc/stories/Header.tsxsrc/stories/Introduction.stories.mdxsrc/stories/Page.stories.tsxsrc/stories/Page.tsxsrc/stories/assets/code-brackets.svgsrc/stories/assets/colors.svgsrc/stories/assets/comments.svgsrc/stories/assets/direction.svgsrc/stories/assets/flow.svgsrc/stories/assets/plugin.svgsrc/stories/assets/repo.svgsrc/stories/assets/stackalt.svgsrc/stories/button.csssrc/stories/header.csssrc/stories/page.csshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/theme/components.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/theme/palette.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/theme/typography.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/src/vite-env.d.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/tsconfig.jsonvite-env.d.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/vite.config.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/vitest.config.tshttps://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/yarn.lockRetrieved git information→ Commit '89e3ef1' on branch 'fix-chromatic'; found 1 parent build and 62 changed filesCollecting Storybook metadataCollected Storybook metadata→ ; no supported addons foundInitializing buildInitialized build→ Build 65 initializedBuilding your Storybook→ Running command: /usr/local/bin/node /opt/yarn-v1.22.19/bin/yarn.js run build-storybook --output-dir /tmp/chromatic--262-i5B3CN9nkXLY --webpack-stats-json /tmp/chromatic--262-i5B3CN9nkXLY→ [* ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ *]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]→ [ * ]The CLI tried to run your build-storybook script, but the command failed. This indicates a problem with your Storybook. Here's what to do:- Check the Storybook build log printed below.- Run npm run build-storybook or yarn build-storybook yourself and make sure it outputs a valid Storybook by opening the generated https://bitbucket.org/getirdev/getirjobs-corporate-web/src/89e3ef14555fff81a954ed35ed541720fd594a9c/index.html in your browser.- Review the build-storybook CLI options at https://storybook.js.org/docs/configurations/cli-options/#for-build-storybookOperation timed outℹ Spawn settings:{"client": "yarn","clientVersion": "1.22.19","nodeVersion": "v18.15.0","platform": "linux","command": "/usr/local/bin/node","clientArgs": ["/opt/yarn-v1.22.19/bin/yarn.js","run"],"scriptArgs": ["build-storybook","--output-dir","/tmp/chromatic--262-i5B3CN9nkXLY","--webpack-stats-json","/tmp/chromatic--262-i5B3CN9nkXLY"]}ℹ Storybook build output:/opt/atlassian/pipelines/agent/build/build-storybook.log$ storybook build --output-dir /tmp/chromatic--262-i5B3CN9nkXLY --webpack-stats-json /tmp/chromatic--262-i5B3CN9nkXLY@storybook/cli v7.0.2info => Cleaning outputDir: /tmp/chromatic--262-i5B3CN9nkXLYinfo => Loading presetsinfo Found existing addon "@storybook/addon-docs", skipping.info Found existing addon "@storybook/addon-docs", skipping.info => Building manager..info => Manager built (599 ms)info => Copying static files: /opt/atlassian/pipelines/agent/build/node_modules/@storybook/manager/static at /tmp/chromatic--262-i5B3CN9nkXLY/sb-common-assetsWARN No story files found for the specified pattern: src/**/*.mdx[36mvite v4.2.1 [32mbuilding for production...[36m[39m./sb-common-assets/fonts.css doesn't exist at build time, it will remain unchanged to be resolved at runtimetransforming...→ Command failed: /usr/local/bin/node /opt/yarn-v1.22.19/bin/yarn.js run build-storybook --output-dir /tmp/chromatic--262-i5B3CN9nkXLY --webpack-stats-json /tmp/chromatic--262-i5B3CN9nkXLYerror Command failed with exit code 105.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4Finished scanning for test reports. Found 0 test report files.Merged test suites, total number tests is 0, with 0 failures and 0 errors.
Hi @[deleted]and welcome to the community!
Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in this container, and then the commands from the step's script are executed. When the step finishes, the container gets destroyed.
That container is not the same environment as the one on your computer, it may have different tools and dependencies.
I would suggest debugging your build locally with Docker as per the following guide:
Make sure to use a clone of the repo at the same commit as your Pipelines build and also the same Docker image that you use as a build container in your bitbucket-pipelines.yml file.
Once you have the container up and running locally, you can execute the commands of your bitbucket-pipelines.yml file to see if the issue is reproducible. You can also run additional commands to further debug the issue.
If you have any questions, please feel free to let me know.
Kind regards,Theodora
It looks like you're new here. Sign in or register to get started.