Dear all,
I am just trying to see and learn how to use BitBucket. I am able to push file and updated branch like any normal version control system.
Then I try to see how to use Pipe for CI/CD.
In my master branch I have a simple text readme file as a sample
Then when my pipe start it say it cannot find some files :
here is below steps from BUILD action :+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...
+ git reset --hard 56ea34fbbf3f7006faf8add69afcaf451c6783b2
HEAD is now at 56ea34f Initial Bitbucket Pipelines configuration
+ 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
+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude
+ chmod 777 $BUILD_DIR
Cache "node": Downloading
Cache "node": Not found
Here is below steps from Npm install:
+ npm installnpm WARN saveError ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'npm notice created a lockfile as package-lock.json. You should commit this file.npm WARN enoent ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'npm WARN build No descriptionnpm WARN build No repository field.npm WARN build No README datanpm WARN build No license field.up to date in 0.365sfound 0 vulnerabilities
Here is below steps from Npm test: (test is my repo)
+ npm test
npm ERR! path /opt/atlassian/pipelines/agent/build/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-06-04T09_58_58_110Z-debug.log
What should I do to make it work ?
As I am new to this please describe clearly what to do
Thnaks for help
Hello,
Right now you're using NPM in your bitbucket-pipelines.yml. Do you have an NPM project (you mention you just have a text file in your repository at the moment). NPM is a build tool that looks for a package.json file to get additional information for executing commands. It's typically used for Node.js and Javascript projects. If you're using NPM, which directory is your package.json file in?
If you're not using NPM, what kind of project are you making? i.e. What programming language?
If you've only got the text file in your repository, and are just trying to get a green build that does nothing. Then you can remove the npm commands and just do something like this in your bitbucket-pipelines.yml:
pipelines:
default:
- step:
script:
- echo "Hello world!"
From there you can build more advanced scripts as you start adding code to your project. You can find guides for specific programming languages here: https://confluence.atlassian.com/bitbucket/language-guides-856821477.html
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.