workflows

This commit is contained in:
Luke K 2020-07-08 09:41:46 +00:00
parent 161540c789
commit 287df42499
No known key found for this signature in database
GPG Key ID: 4896F75BAF2E1966
5 changed files with 72 additions and 10 deletions

20
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,20 @@
# Build and test every push to the main and
# develop branches.
name: Build
on:
push:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Test
run: make test
- name: Build
run: make build

15
.github/workflows/pull_requests.yaml vendored Normal file
View File

@ -0,0 +1,15 @@
# Build and test all pull requests
name: Pull Requests
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Test
run: make test
- name: Build
run: make build

30
.github/workflows/releases.yaml vendored Normal file
View File

@ -0,0 +1,30 @@
# Deploy artifacts for any pushes with a version tag (releases).
name: Releases
on:
push:
tags:
- 'v*'
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Test
run: make test
- name: Build
run: make build
- name: Image
run: make image
- name: Push Image
env:
USER: ${{ secrets.QUAY_USERNAME }}
PASS: ${{ secrets.QUAY_PASSWORD }}
run: docker login -u "$USER" -p "$PASS" quay.io && make push
# TODO: make release
# - build cross-platform binaries
# - create a release with assets

View File

@ -9,6 +9,7 @@ VTAG := $(shell git tag --points-at HEAD)
VERS := $(shell [ -z $(VTAG) ] && echo 'tip' || echo $(VTAG) )
all: $(BIN)
build: all
$(BIN): $(CODE)
go build -ldflags "-X main.brch=$(BRCH) -X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)

View File

@ -1,26 +1,22 @@
# faas
![Main Build Status](https://github.com/boson-project/faas/workflows/Build/badge.svg?branch=main)
![Development Build Status](https://github.com/boson-project/faas/workflows/Build/badge.svg?branch=develop)
Function as a Service CLI
## Setup and Configuration
With Go 1.13+ installed, build and install the binary to your path:
```
go install
go install ./cmd/faas
```
Install dependent binaries:
Install Docker
* `appsody` https://appsody.dev/docs/installing/installing-appsody
* `kn` https://github.com/knative/client/releases
* `kubectl` https://kubernetes.io/docs/tasks/tools/install-kubectl/
* `docker` https://docs.docker.com/get-docker/
Configure Boson appsody stack repository:
```
appsody repo add boson https://github.com/boson-project/stacks/releases/latest/download/boson-index.yaml
```
Configure Image repository:
Both the image repository and user/org namespace need to be defined either by