Config file is missing
Asked by codeBang:

Hello.

I recently set up a pipeline but started with setting up variables instead of a template. Now when I go to my Pipelines menu, I have no options to set up a new config/ yml file. There is a picture with "Hooray! You've successfully set up Pipelines". No other buttons or options.  

I can't do anything else. I've looked at Repository Settings \> Settings \> Pipelines \> Settings. There's nothing there. I cannot find any other options to create a new file or another file for another pipeline.

I even deleted the variables I set up. When I go back to the Pipelines menu, there are no options to start a new file. I just have an empty table and there is the message: "We couldn't find any pipelines that match your search"

I would really appreciate it if someone can help me with this. I require a pipeline for my project.


Answers:
author: Theodora Boudale
body: Hi [@codeBang](/t5/user/viewprofilepage/user-id/1158807) ,

This is a bug and it occurs when Pipelines is enabled from the **Repository settings**, then the templates are no longer accessible:

* <https://jira.atlassian.com/browse/BCLOUD-20669>

You can create a bitbucket-pipelines.yml file (which is what you need in order to be able to run Pipelines builds), either locally and then commit and push it, or in Bitbucket UI. You can check this doc for more info on how to configure it:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/>

If you'd like to access the templates, you can create another test repo (which you can delete later). Then, without enabling **Pipelines** from **Repository settings** , select the **Pipelines** option from the left hand menu in this new repo.

![Screenshot 2021-02-24 at 18.03.57.png](https://community.atlassian.com/t5/image/serverpage/image-id/131873i849E9757E1AB3947/image-size/large?v=1.0&px=999 "Screenshot 2021-02-24 at 18.03.57.png")

You should then be able to view the templates, and you can copy-paste the template you like in the repo you already have.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora

comments: author: codeBang
body: Hi. Thanks for the reply.

I've moved on and am now trying to install a pipeline manually. I've commited a yml file and have tried to do a build but the build fails. Here is the error message I get:

+ npm run gulp

npm ERR! path /opt/atlassian/pipelines/agent/build/package.json  
npm ERR! code ENOENT  
npm ERR! errno -2npm 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/2021-04-26T15_01_06_462Z-debug.log  

I don't know how to access the debug log.

Any suggestions would be appreciated.

Thanks in advance.


author: Theodora Boudale
body: Hi [@codeBang](/t5/user/viewprofilepage/user-id/1158807) ,

Do you have a package.json file in this repository?

Based on the output, the error occurs because there is no such file, which I believe is required for npm.

In case you have a package.json file in the repo but it is not at the root of the repo but inside a directory, you'll need to first change to that directory before executing the npm command.

E.g. if the package.json file is located inside a directory called 'source', you can include a command like that in the script of the bitbucket-pipelines.yml file, before the npm command:

```
- cd source
```

Kind regards,  
Theodora


author: codeBang
body: Hi Theodora

Thanks for the tip.

My website doesn't incorporate a package.json file as it doesn't use any Node-based packaging or any packaging at all. My site is based in PHP and I'm just trying to automate FTP to a host when I push to my repository.

I've figured out other strategies to do this so I have abandoned establishing a pipeline.

Thanks for your help anyway.


author: Theodora Boudale
body: Hi [@codeBang](/t5/user/viewprofilepage/user-id/1158807) ,

You are welcome and thank you for the update.

Just in case you would consider using Pipelines in the future, if what you want to do is deploy your code via FTP to a remote server, we have the following pipe which can be used in the bitbucket-pipelines.yml file:

* <https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/ftp-deploy>

Using that in the yml file and configuring the required variables in there, will deploy the code to a remote server via FTP.

If you ever need anything else or have any other questions, please feel free to reach out!

Have a nice day,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines