Drone.io Failure to get build config 404 Not found [] - drone.io

I am having trouble with my webhook. When pushing to master I get:
failure to get build config for MyOrganization/Repo. GET https://api.github.com/repos/MyOrganization/Repo/contents/.drone.yml?ref=ec9ec47df4757cdfef97dfb445b1896d929687c6: 404 Not Found []
My drone.yml looks like this
---
pipeline:
build:
image: node:6
commands:
- npm install
- npm test
I have registered my user who is and Admin for the Organisation. Perhaps the cloning is failing? Any other ideas?
Thanks in advance

Related

registry.npmjs.com cannot be reached

It's first time I'm trying to use Actions in GitHub to load a package on npm.
My workflow gets error because of:
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/github-custom-module - Not found
npm ERR! 404
I noticed that also trying to reach out by browse bar https://registry.npmjs.com/ or http://registry.npmjs.com/ and it responds something like:
{"db_name":"registry","engine":"couch_bt_engine","doc_count":2594600,"doc_del_count":334,"update_seq":12737068,"purge_seq":0,"compact_running":false,"sizes":{"active":52390186030,"external":150891609029,"file":52550172912},"disk_size":52550172912,"data_size":52390186030,"other":{"data_size":150891609029},"instance_start_time":"1640854262658073","disk_format_version":7,"committed_update_seq":12737068,"compacted_seq":12733464,"uuid":"d8db915449574fe1dbb729e34426a075"}
just wondering if someone got in trouble for the same reason and eventually how to fix it!
Thank you very much!
Since your npm package is in a private repo, your Github action may not have access to it. There are two approaches to solving this ->
The easy way
You can use a read only access token in the dependency list in the package.json file to install the packages. This will require changing the code base but it trivializes the CI part. Bear in mind that if the token expires or is deleted your builds will start failing.
The not so easy way
The other way is to again create an access token for the npm registry and then
adding it to the Github Secrets instead. So lets say we store it in
NPM_TOKEN then in your action file you could simply add this to the env
steps:
- run: |
npm install
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
You also need to create a .npmrc file in the root of your project with a single line using the env variable to set the auth token.
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
The npm cli will replace the value from the environment in so your secrets are safe !

GitLab private runner stuck on npm install

I'm trying to set up a CI pipeline on GitLab.com using a private runner instead of a shared one. The project uses Node, so I'm using a node:6 image.
The .gitlab-ci.yml looks like this:
image: node:6
stages:
- test
javascript_tests:
stage: test
script:
- npm install
- npm run test:unit
when: always
The runner stays on "running" stage for about 30 minutes and only then started to output something relevant:
npm ERR! fetch failed
http://10.252.156.164:4880/#types%2fjsforce/-/jsforce-1.9.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT 10.252.156.164:4880
What can I do to solve this? I thought that installing gitlab-runner on a DigitalOcean droplet would be the only things to worry about.
Replacing node:6 with node:latest fixed this problem.

Vuejs Gitlab page is blank, console says MIME type mismatch, css and js not found

I made a website in Vuejs, it works on my local browser. I build the page locally and push to gitlab here (https://gitlab.com/ayaderaghul/coi6), and run CI (with folder: public). The page is blank (https://ayaderaghul.gitlab.io/coi6/), the console says:
The resource from “https://ayaderaghul.gitlab.io/coi6/public/static/js/vendor.d5bde172b988351183eb.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).[Learn More] coi6
Loading failed for the <script> with source “https://ayaderaghul.gitlab.io/coi6/public/static/js/vendor.d5bde172b988351183eb.js”.
And I right click the page to View Page Source, the link to css, js files are not found (view-source:https://ayaderaghul.gitlab.io/coi6/)
I have tried the following:
I write commands to build the page in .gitlab-ci.yml
image: alpine:latest
before_script:
- apk add --update nodejs
- apk add --update npm
- npm install chalk
- npm install each-async
- npm install indent-string
- npm install
pages:
stage: deploy
script:
- npm run build
artifacts:
paths:
- public
only:
- master
(https://gitlab.com/ayaderaghul/coi6/blob/master/.gitlab-ci.yml)
I change the css and js paths in file index.html in some ways: /coi6/public/static/css/... or static/css/... ...
None of them works. The behavior is the same. Please give me more options to try? Or more cues to look at? Or explain me something I haven't understood. Thank you,
Your path is wrong in index.html.
Your files are available for example here :
https://ayaderaghul.gitlab.io/coi6/static/js/vendor.d5bde172b988351183eb.js
Whereas you are referencing them here :
https://ayaderaghul.gitlab.io/coi6/public/static/js/vendor.d5bde172b988351183eb.js

What is the path to yarn error log files?

I'm migrating our gitlab CI script to yarn from npm and have the following line that saves npm error logs for 1 day:
artifacts:
expire_in: 1 day
paths:
- /root/.npm/_logs/
My question is, what is the corresponding path for yarn error logs?
I have found the following two docs for yarn but neither says anything about error logs and searching the yarn docs yield nothing.
Continuous Integration (https://yarnpkg.com/lang/en/docs/install-ci/#gitlab)
Migrating from npm (https://yarnpkg.com/en/docs/migrating-from-npm)
When there is a yarn error, a yarn-error.log file is created at the root directory of your project.
There seems to be no official documentation about this. But you can find the code here.

CircleCI test passing but not publishing to NPM

My CI tests pass but I'm not sure why my packages aren't being published to npm.
The snippet below shows the areas I think I may have the problem with
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/emotion-emoji
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/.npmrc
- run:
name: Publish package
command: npm publish
Any suggestions?
I resolved the issue. I needed to push a tag with the format v1.x.x