• This repository has been archived on 25/Jan/2023
  • Stars
    star
    498
  • Rank 85,154 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is the build image used for running automated builds

Netlify Build Image

Archive note

We have archived this repository and moved the code to a private repository. This decision was made to provide shorter development cycles and allow us to react faster on issues.

Sadly, this change comes with the bittersweet price of not having this repository open source anymore.

We apologize for this inconvenience and still want to hear from you on issues you encounter or feature requests.

To support your troubleshooting, we will still publish the build-image to Docker Hub for now. We would love to make troubleshooting easier for you, but first we need to understand your unique situation.

Since we would love to understand the troubleshooting issues youโ€™re encountering, we kindly ask you to reach out to our Support team in the Forums. Again, we would love to make troubleshooting easier for you, but first we need to understand your unique situation.

How to report features and bugs?

To build a better web, we still need your valuable input and feedback! Help us build a better web by reporting issues or proposing feature requests to our build system through our Support Forum.

Find out which software & version is available inside your builds

We updated our documentation page to reflect an accurate list of all the languages and software that is currently available in our builds.

You can check it out at our docs page.

This repository contains the tools to make the build image that Netlify's continuous deployment buildbot uses to build a site from a connected Git repository.

If you're having problems with your build, you can also use these tools to test locally.

Available images

Netlify maintains multiple build images for testing new development as well as supporting legacy builds. Each image uses a different version of Ubuntu Linux, with a slightly different list of included language and software versions.

The following image is currently available:

  • focal - Default build image for all new sites; Running Ubuntu 20.04 and this software

Each image name above corresponds to a branch in this repository.

Running locally

Emulating Netlify's buildbot on your local machine requires the following:

  • Docker
  • A local clone of this build-image repository
  • A local clone of the site repository you want to test, checked out to the branch you want to be built, with a clean git status (nothing to commit).

Step 1: Pull the build image

Open your Docker terminal, and run the following command to pull the default image:

docker pull netlify/build:focal
or
docker pull netlify/build:v3.0.2 # replace the version with a git tag of the specific version you want to test

Step 2: Start the script to run interactively

Still in your Docker terminal, change directories into your local clone of this build-image repository.

If you pulled an alternate image in Step 1, check out the corresponding branch in this repository.

Run the following command to start the interactive shell within the container:

./test-tools/start-image.sh path/to/site/repo

If you receive a command not found message, make sure you are in the base of the build-image repository.

If the command works correctly, you should see a new prompt, with the user buildbot.

Step 3: Have the buildbot run your build command

In the buildbot shell, run build followed by your site build command. For example, for a site build command of npm run build, you would run the following:

/opt/build-bin/build npm run build

This will run the build as it would run on Netlify, displaying logs in your terminal as it goes. When you are done testing, you can exit the buildbot shell by typing exit.

Build environment variables

Your local buildbot emulator doesn't have access to build environment variables set in the Netlify UI or netlify.toml file. However, you can explicitly set them in the interactive buildbot shell before running your build command.

Here is an example that sets NODE_VERSION and NODE_ENV before running a build command of npm run build:

export NODE_VERSION=8 NODE_ENV=production ; build npm run build

Testing it for a mono repository

If you like to run a debugging build for your mono repository you need to pass the Base directory like in the Netlify UI.

./test-tools/test-build.sh path/to/site/repo base/directory 'your build command'

Testing locally with cache

If you'd like to run a debugging build using our caching mechanisms, with verbose shell output, you can replace steps 2 and 3 above with the following command:

./test-tools/test-build.sh path/to/site/repo 'your build command'

This will create a tmp directory that will have the repo that the buildbot cloned, the scripts run by the buildbot, and the cache (with hidden files). The terminal displays the path to the tmp directory at the start of each build. You specify this path in an environment variable prepended to the command above, like so:

T=tmp/tmp.XXXXX ./test-tools/test-build.sh path/to/site/repo 'your build command'

Development

Visit the development section in our CONTRIBUTING.md

Contributing

Pull requests welcome, as long as they're not overly specific to a niche use-case.

Please see our contributing documentation.

More info

How we use this and some best practices are documented here: https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/

More Repositories

1

netlify-cms

A Git-based CMS for Static Site Generators
JavaScript
16,192
star
2

gotrue

An SWT based API for managing users and issuing SWT tokens.
Go
3,530
star
3

staticgen

StaticGen.com, A leaderboard of top open-source static site generators
JavaScript
2,471
star
4

cli

Netlify Command Line Interface
TypeScript
1,543
star
5

gocommerce

A headless e-commerce for JAMstack sites.
Go
1,465
star
6

netlify-identity-widget

A zero config, framework free Netlify Identity widget
JavaScript
735
star
7

next-on-netlify

Build and deploy Next.js applications with Server-Side Rendering on Netlify!
JavaScript
720
star
8

headlesscms.org

Source for headlesscms.org
JavaScript
628
star
9

netlify-lambda

Helps building and serving lambda functions locally and in CI environments
JavaScript
601
star
10

next-runtime

The Next.js Runtime allows Next.js to run on Netlify with zero configuration
TypeScript
575
star
11

functions.netlify.com

Tutorials, examples, workshops and a playground for serverless with Netlify Functions
SCSS
515
star
12

gotrue-js

JavaScript client library for GoTrue
JavaScript
457
star
13

create-react-app-lambda

JavaScript
414
star
14

netlify-faunadb-example

Using FaunaDB with netlify functions
JavaScript
388
star
15

actions

Shell
360
star
16

git-gateway

A Gateway to Git APIs
Go
355
star
17

zip-it-and-ship-it

Intelligently prepare Node.js Lambda functions for deployment
JavaScript
305
star
18

gotell

Netlify Comments is an API and build tool for handling large amounts of comments for JAMstack products
Go
276
star
19

explorers

JavaScript
262
star
20

million-devs

Microsite for the 1 Million Developers announcement.
Vue
250
star
21

netlify-statuskit

Netlify StatusKit is a template to deploy your own Status pages on Netlify.
HTML
237
star
22

open-api

Open API specification of Netlify's API
Go
234
star
23

js-client

A Open-API derived JS + Node.js API client for Netlify
JavaScript
214
star
24

build

Netlify Build (node process) runs the build command, Build Plugins and bundles Netlify Functions. Can be run in Buildbot or locally using Netlify CLI
TypeScript
207
star
25

netlify-plugin-lighthouse

Netlify Plugin to run Lighthouse on each build
JavaScript
198
star
26

netlifyctl

Go
178
star
27

netlify-dev-plugin

Local dev server with functions, rules engine and add-on support
JavaScript
176
star
28

framework-info

Framework detection utility
JavaScript
136
star
29

jekyll-srcset

Dead simple responsive images for jekyll
Ruby
136
star
30

gocommerce-js

A gocommerce client library
JavaScript
130
star
31

jekyll-gdrive

Access a Google Drive Spreadsheet from your Jekyll templates
Ruby
116
star
32

plugins

Netlify plugins directory.
JavaScript
95
star
33

prerender

Automatically rendering JS-driven pages for crawlers and social sharing
JavaScript
94
star
34

netlify-playground

89
star
35

netlify-plugin-gatsby

A build plugin to integrate Gatsby seamlessly with Netlify
TypeScript
88
star
36

code-examples

Code snippets for customers
HTML
87
star
37

labs

Documentation and samples for Netlify Labs features.
76
star
38

templates

This is board to showcase templates and boilerplates https://templates.netlify.com
Nunjucks
76
star
39

vue-cli-plugin-netlify-lambda

Netlify Lambda plugin for Vue CLI
JavaScript
76
star
40

remix-template

Deploy your Remix site to Netlify Edge Functions
JavaScript
73
star
41

netlify-cms-widget-starter

A boilerplate for creating Netlify CMS widgets.
JavaScript
73
star
42

classnames-template-literals

Small utility to format long classnames with template literals
JavaScript
70
star
43

gotiator

A tiny JWT based API gateway
Go
70
star
44

matterday.netlify.com

A site that asks us what we could do with more time.
CSS
70
star
45

react-server-components-demo

Minimal implementation on server components via Netlify functions
JavaScript
67
star
46

edge-functions-examples

Explore a library of reference examples for learning about Edge Functions on Netlify.
JavaScript
67
star
47

binrc

Binrc is a command line application to manage different versions of binaries stored on GitHub releases.
Makefile
52
star
48

next-on-netlify-demo

Demo of a Next.js app with Server-Side Rendering on Netlify
JavaScript
52
star
49

go-functions-example

Go
49
star
50

petsofnetlify

pets of netlifiers
Nunjucks
47
star
51

full-react-server-demo

JavaScript
45
star
52

rust-functions-example

Deploy Rust lambda functions on Netlify
Rust
45
star
53

culture-handbook

The philosophy and values of Netlify's diverse, globally distributed workforce
44
star
54

gojoin

Mini API wrapping Stripes Subscriptions for Single Page Aps and JAMstack sites
Go
41
star
55

netlify-git-api

Go
41
star
56

gatsby-parallel-runner

JavaScript
38
star
57

functions

JavaScript and TypeScript utilities for Netlify Functions.
TypeScript
38
star
58

elastinats

Go
36
star
59

netlify-photo-gallery

HTML
35
star
60

gocommerce-admin

Admin UI for Netlify Commerce
JavaScript
35
star
61

addons

Netlify add-on documentation
34
star
62

ask-netlify

A place to submit questions for Netlify to answer in tutorials, podcasts and blog posts
HTML
34
star
63

netlify-auth-demo

Demo for integrating GitHub OAuth with a Netlify site
HTML
33
star
64

explorers-up-and-running-with-serverless-functions

Free resource for learning how to use serverless functions!
HTML
31
star
65

hydrogen-netlify-starter

Get started with Hydrogen on Netlify
JavaScript
31
star
66

build-plugin-template

Template repository to create new Netlify Build plugins.
JavaScript
30
star
67

twickr

Twickr lets you send tweets of interest from Twitter to Slack
Go
30
star
68

remix-compute

Remix adapter and server runtime for Netlify
TypeScript
29
star
69

www-post-scheduler

This is a serverless function to auto publish blog posts
JavaScript
28
star
70

postcss-fout-with-a-class

Rewrite all selectors that will trigger a font load to be scoped under a class
JavaScript
28
star
71

micro-api-client

Small library for talking to micro REST APIs (not related to Netlify's main API)
JavaScript
28
star
72

next-edge-middleware

JavaScript
27
star
73

vue-lambda-starter

Starter Template for Vue + AWS Lambda with Netlify
Vue
27
star
74

netlify-browser-extension

netlify-chrome-extension
JavaScript
26
star
75

make-wp-epic

Migration tool for moving from WordPress to Victor Hugo
JavaScript
26
star
76

hydrogen-platform

Hydrogen support for Netlify Edge Functions
TypeScript
26
star
77

netlify-redirect-parser

Library for parsing Netlify redirects
JavaScript
23
star
78

next-react-server-components

JavaScript
22
star
79

netlify-auth-providers

JS library to use Netlify's OAuth providers
JavaScript
22
star
80

explorers-composition-api

Learn how the Composition API works in this Jamstack Explorers mission!
Vue
20
star
81

vite-plugin-netlify-edge

Netlify Edge Function support for Vite
TypeScript
19
star
82

angular-runtime

The Angular Runtime allows Angular to run on Netlify with zero configuration
JavaScript
18
star
83

mailme

MailMe sends mails with stylish templates
Go
18
star
84

eslint-config-node

ESLint, Prettier and Editorconfig shared by Netlify's Node.js projects
JavaScript
18
star
85

slate-markdown-serializer

JavaScript
17
star
86

delta-action

A GitHub Action for capturing benchmark data and tracking its variation against a baseline
JavaScript
17
star
87

netlify-credential-helper

Git credential helper to use Netlify's API as authentication backend
Go
16
star
88

netlify-cms-www

Former repo for netlifycms.org. Moved to the code repo at
CSS
15
star
89

go-client

Depreciated repo: home of the old go client. See netlify/open-api for the new home of the go client
Go
15
star
90

verify-okta

Small Lambda function for verifying and gating content with Okta
Go
14
star
91

netlify-oauth-example

JavaScript
14
star
92

fauna-one-click

Moved https://github.com/netlify/netlify-faunadb-example
JavaScript
13
star
93

screenshot

Take screenshots of websites
Shell
13
star
94

netlify-comments-starter

Start project for Netlify Comments
13
star
95

node-template

Netlify's Node.js repository template
Python
13
star
96

godoc-static

Generates static HTML of documentation of Go libraries
Go
12
star
97

streamer

tail files and send them to nats
Go
12
star
98

edge-bundler

Intelligently prepare Netlify Edge Functions for deployment
TypeScript
12
star
99

ruby-client

Netlify API client for Ruby
Ruby
11
star
100

gatsby-plugin-netlify

Gatsby plugin. Automatically generates a _headers file and a _redirects file at the root of the public folder to configure HTTP headers and redirects on Netlify.
TypeScript
11
star