Skip to content

Deploying to Netlify with Drone/Gitness/Harness CI with a plug-in.

License

Notifications You must be signed in to change notification settings

ravilach/drone-netlify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drone-netlify

👏 An updated fork from: https://github.com/lucaperret/drone-netlify. Thanks for creating!

ℹ️ Current Repo Commands are based off of Netlify CLI Version 17.25.0

Deploying to Netlify with:

Use case examples:

  • Automatically deploy and alias upon pushes to master

There are multiple ways to deploy to Netlify.

From Docker

Deploy the working directory to Netlify.

docker run --rm \
  -e PLUGIN_TOKEN=xxxxx \
  -e PLUGIN_SITE_ID=xxxxxxx-xxxx-xxx-xxxxxxxx \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  rlachhman/netlify-drone-plugin

From Drone CI

pipeline:
  netlify:
    image: rlachhman/netlify-drone-plugin
    token: xxxxx
    site_id: xxxxxxx-xxxx-xxx-xxxxxxxx

From Harness CI

- step:
      identifier: <Harness-Identifier>
      type: Plugin
      name: <Step-Name>
      spec:
        connectorRef: <docker-hub-conector>
        image: rlachhman/netlify-drone-plugin
        privileged: true
        settings:
          dir: ./folder
          prod: true
          site_id: xxxxxxx-xxxx-xxx-xxxxxxxx
          token: xxxxx
          debug: "true"
          build: "false"
          context: deploy

Building from Docker

docker build --platform linux/amd64 -t rlachhman/netlify-drone-plugin .
docker push rlachhman/netlify-drone-plugin    

Building from Docker for a Specific Version

For minor changes, sometimes Docker Builder will cache. For example a small NPM Change on Netlify or small Shell Change.

docker builder prune
docker build --platform linux/amd64 --no-cache=true -t rlachhman/netlify-drone-plugin:17250 .
docker push rlachhman/netlify-drone-plugin:17250    

About

Deploying to Netlify with Drone/Gitness/Harness CI with a plug-in.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 85.2%
  • Dockerfile 14.8%