IPFS Site Continuous delivery from gitlab pipelines


I have now created my first IPFS hosted website with gatsby which is working pretty well, I think.

I am still updating the contents manually from the delivered tar.gz of my gitlab pipeline.

I would like to implement a IPFS publish stage in my gitlab pipeline.

I can update DNS records, but I need to upload and pin from the gitlab ci task.

I don’t want to use third party pinning service for now. I have a couple of ipfs nodes running outside of my gitlab deployment.

How do you recommend I implement this task?

See GitHub - ipfs-shipyard/ipfs-dns-deploy: A circleci friendly Docker image for pinning things to cluster and updating dns for example.

1 Like

That image seems very close to what I need, and maybe it just works also in a gitlab step.

I notice that the commands are run against a cluster and not a host. I was wondering if I should organize my nodes as a cluster or not prior to this step.

if you want to use it out of the box, then yes, you need a cluster.

An example how to use it on Circle CI: ipfs-cluster-website/config.yml at master · ipfs/ipfs-cluster-website · GitHub . I believe there is a GITHUB_TOKEN variable that allows the thing to post an IPFS status check to the PRs etc.

thanks @hector.

I have created another docker image targeting my toolset: gitlab/ovh and moved to ipfs-cluster.

There is something, however, that I don’t understand. When in your CD/CI process old versions get un-pinned?

With gitlab I was trying to created 2 deployment environments, stage and production, and then name the PINS with myproject-stage and myproject-production. and on each deployment update its deployment pin.

However, at a first look, seems like pin names are not designed that way. Does not seem easy to update a pin using its name a key, for example, and I cannot even list pins by name.

Is it because pin names are not fully implemented or because they are thought in a different way?

Ok, I can see that ipfs-cluster pins don’t work how I (intuitively) expected.

I managed to map my release process to ipfs-cluster with a few workarounds, but it would be great if ipfs-cluster was better suited for this task, so I have created this feature proposal