Snapping grafana on build.snapcraft.io

Hi,

I’m trying to package the grafana snap and success to make it locally.
However, when I use build.snapcraft.io to make it autobuild, the build error shows the following message:

The following packages were automatically installed and are no longer required:
curl golang-1.6-go golang-1.6-src golang-go golang-src
Use ‘sudo apt autoremove’ to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9973 kB of archives.
After this operation, 50.3 MB of additional disk space will be used.
Err:1 https://deb.nodesource.com/node_6.x xenial/main amd64 nodejs amd64 6.11.2-1nodesource1~xenial1
Could not resolve host: deb.nodesource.com
E: Failed to fetch https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/nodejs_6.11.2-1nodesource1~xenial1_amd64.deb Could not resolve host: deb.nodesource.com

I wonder if the build environment has the limitation to disallow to access the external link or not.

Any suggestion?

Thanks.
Woodrow

build.snapcraft.io uses the default Ubuntu 16.04 repositories, I think, how did you get it to point to deb.nodesource.com? Can you link your snapcraft.yaml please? :slight_smile:

@Ads20000,
I trigger the script from build sect. of a part, and my snapcraft.yaml is https://github.com/woodrow-shen/snapcraft-grafana/blob/master/snapcraft.yaml, thanks.

Ah right, yeah you’re basically cheating :stuck_out_tongue: if you want a package that’s not in the default Ubuntu 16.04 repositories you need to make a separate part for it.

Fortunately, there’s a nodejs plugin to make this easy for you!

@Ads20000,

Thanks your suggestions, after using a nodejs plugin, it’s successfully built on build.snapcraft.io.:slight_smile:

I think it’s time to post the new topic how do I become Snapcrafters as the “grafana” name is reserved for Ubuntu store…

Read this thread. Use the fork-and-rename-me repo to make a new GitHub repo for grafana with the ‘correct’ layout and follow the checklist on the README.MD for that :slight_smile:

ok,I posted here, Put grafana snap to Snapcrafters.

I can’t understand the meaning “using the preferred upstream name” as the “grafana” name is reserved…