GithubHelp home page GithubHelp logo

jastang / build Goto Github PK

View Code? Open in Web Editor NEW

This project forked from upbound/build

0.0 1.0 0.0 399 KB

Upbound build and CI scripts

License: Apache License 2.0

Shell 26.34% Makefile 69.82% Dockerfile 3.85%

build's Introduction

Build

This project contains common build scripts that are used by a number of open source projects at Upbound. We standardize on a makefile interface to all projects with simple verbs. We attempt to put more logic in makefiles and closer to the project and less on side of CI. This enables the builds to run on multiple environments including laptops and different CI/CD systems. Most build and test operations are designed to run in a container that contains all the tools necessary.

Some features include:

  • support for multiple platforms and architectures
  • support for Linux and macOS hosts
  • support for build channels for releases
  • support for releasing artifacts
  • support for golang, helm, kubernetes, nodejs, yarn, s3, and docker

Quickstart

To use this build project just add a submodule to your project:

git submodule add https://github.com/upbound/build build

and add a Makefile in the root. For example, the following will build a go project that publishes containers and helm charts.

# Project Setup
PROJECT_NAME := myrepo
PROJECT_REPO := github.com/upbound/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64
include build/makelib/common.mk

S3_BUCKET ?= upbound.releases/myrepo
include build/makelib/output.mk

# Setup Go
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/api $(GO_PROJECT)/cmd/installer
GO_LDFLAGS += -X $(GO_PROJECT)/pkg/version.Version=$(VERSION)
include build/makelib/golang.mk

# Setup Helm
HELM_BASE_URL = https://charts.upbound.io
HELM_S3_BUCKET = upbound.charts
HELM_CHARTS = myrepo-api
HELM_CHART_LINT_ARGS_myrepo-api = --set nameOverride='',imagePullSecrets=''
include build/makelib/k8s_tools.mk
include build/makelib/helm.mk

# Docker images
DOCKER_myrepo = upbound
IMAGES = myrepo
include build/makelib/image.mk

Now build the project by running:

make -j build

and run tests:

make -j tests

To see the help run make help.

Local Development Setup

To use local development targets, first include deploy.mk in your make file:

include build/makelib/local.mk

Then, run the following command to initialize a local development configuration:

make local.scaffold

You can now configure and add more components (i.e. helm releases) to your local development setup.

Contributing

We welcome contributions. See Contributing to get started.

Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please open an issue.

Licensing

The build project is under the Apache 2.0 license.

build's People

Contributors

amitsadaphule avatar arturrez avatar artursouza avatar avalanche123 avatar bassam avatar cpanato avatar cychiang avatar defilan avatar displague avatar epk avatar haarchri avatar hasheddan avatar ichekrygin avatar jbw976 avatar lukeweber avatar mistermx avatar muvaf avatar natlg avatar negz avatar rbwsam avatar sergenyalcin avatar siredmar avatar soorena776 avatar thephred avatar tnthornton avatar turkenh avatar ulucinar avatar wickedgenius avatar wonderflow avatar zzxwill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.