45 Commits

Author SHA1 Message Date
Alex Ellis (OpenFaaS Ltd)
fcf50cef7b Upgrade to Go 1.18 and introduce timeout for deploy
* Go is upgraded to 1.18 for builds
* Alpine Linux is upgraded for the runtime container
* The deploy command gains a timeout for use with faaasd
which is synchronous and would time-out otherwise.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2022-08-22 17:52:57 +01:00
Alex Ellis (OpenFaaS Ltd)
d94600d2d2 Move to Go 1.17 and fix license-check
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2021-12-03 11:52:49 +00:00
Gábor Lipták
817968f250 Bump alpine to 3.13
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2021-04-29 14:25:57 +01:00
Alex Ellis (OpenFaaS Ltd)
e53b9c46b4 Bump Go version to 1.15
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-12-11 18:39:36 +00:00
Utsav Anand
9ec31877e9 Leverage buildx to generate binaries in parallel
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
2020-12-03 20:25:05 +00:00
Utsav Anand
15cc71aa64 Migrate builds from Travis to Github Actions
Fixes #838

Thanks to Lucas Roesler for his PR for buildx support #836
Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
2020-11-17 14:46:47 +00:00
Alex Ellis (OpenFaaS Ltd)
98b2bde0bf Run build_redist as part of the main build
build_redist runs cross-compilations, which really need to be
part of the main build, so this is being moved up in the
ordering to prevent issues like #825

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-09-17 09:49:10 +01:00
Lucas Roesler
40884c98a9 Initialize the go module and update docker/docker
**What**
- Initialize the go.mod from the existing Gopkg.lock
- Update to a more go module friendly version of docker/docker

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2020-09-13 09:02:38 +01:00
Alex Ellis (OpenFaaS Ltd)
0d2db5d7a9 Update redist Dockerfile
Uses license-check image instead of the binary

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-04-23 15:58:31 +01:00
Alex Ellis (OpenFaaS Ltd)
49d3de1a11 Fix issue with redist script
Also bumps Go to 1.13

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-14 14:28:42 +00:00
Alex Ellis (OpenFaaS Ltd)
c9a0585959 Move faas-cli image to non-root user
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2020-01-14 14:23:20 +00:00
Alex Ellis (OpenFaaS Ltd)
38ecd73a60 Consolidate exec package with go-execute
This patch consolidates the exec package for docker build so that
it uses the the go-execute package used in other OpenFaaS projects.

The aim is to allow for conditional printing of stdio whilst also
being able to capture the output.

In a future PR a CLI animation can replace the Docker build, which
will be default, but optional. If an error is found then the
result of the build will be buffered and available to print to the
user.

This change stops Docker from printing progress bars when
downloading layers. Instead a line is printed when pulling and
when a layer is complete.

* Tested for faas-cli build with multiple functions using the
sample stack.yml and --parallel=1/4.

* Adds StreamStdio option and updates Docker build version to use
Go 1.12.

* Add complete build time to output

* Add duration of each build to output

* Add --quiet flag for faas-cli build

* The --quiet flag hides output from Docker during the execution
of the docker build.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2019-12-07 20:05:54 +00:00
Vivek Singh
7971e8c388 Remove platform package, address review comments
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-11-05 16:03:35 +00:00
Vivek Singh
44116bb931 Add unit test for filter store and review update
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-11-05 16:03:35 +00:00
Vivek Singh
f200fafb58 Update the default value to x86_64
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-11-05 16:03:35 +00:00
Vivek Singh
e678d7f9cb Inject default platform value at build time
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2019-11-05 16:03:35 +00:00
Alex Ellis
5640d72d41 Update license-check URL
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-04-11 20:53:21 +01:00
Alex Ellis
7b091eadc7 Update URL for license-check
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-04-11 20:53:04 +01:00
Alex Ellis (VMware)
3fe00afbdd Update Go version to 1.11
- tests pass and ran some exploratory tested with
build_redist.sh and binaries used on MacOS, Arch Linux (x86_64)
and Raspbian (armhf).

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-11-27 20:38:54 +00:00
Alex Ellis (VMware)
a0e326bee1 Update remaining copyright headers to author(s)
OpenFaaS project -> OpenFaaS Author(s) to show distributed
copyright.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-11-13 21:37:01 +00:00
Alex Ellis (VMware)
7a861dbc0e Bump version to Go 1.10.4
- references https://github.com/openfaas/faas/issues/875

Tested with build.sh / build_redist.sh

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-10-02 22:05:49 +01:00
Alex Ellis (VMware)
8f14b230f6 Bump Go to 1.9.7
- Bumped Go builder / sdk to latest minor version for x86_64

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-09-24 21:04:13 +01:00
Alex Ellis (VMware)
dbb4c78462 Get license-check via get.sh
Uses utility script which is multi-arch meaning we can use
one Dockerfile for varying platforms.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-21 13:05:50 +01:00
Alex Ellis
418db17725 Update license-check to allow "Author(s)" term
This was causing build to fail after being introduced in a new
PR.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-08-09 18:02:07 +01:00
James Smith
d703c207c4 [#448] Update Alpine image to 3.7
Regulatory upgrade of Alpine image.

Signed-off-by: James Smith <jamessmithsmusic@gmail.com>
2018-07-19 19:27:29 +01:00
James Smith
fba36a4a62 Include git in the apk packages of Docker image
With this change, the OpenFaaS CLI tool will be able to pull function
templates from within the Docker container.

Signed-off-by: James Smith <jamessmithsmusic@gmail.com>
2018-07-19 19:27:29 +01:00
Alex Ellis (VMware)
493bef2ce3 Add faas-cli to PATH for Dockerfiles
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-05-20 19:27:51 +01:00
Alex Ellis (VMware)
fff19eba33 Update CMD to faas-cli from faas
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-05-20 19:24:27 +01:00
Minh-Quan TRAN
669f5a3ac3 add build_samples to Makefile, remove go get in travis, mark build stage with as build
Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
2018-01-23 09:50:59 +00:00
Minh-Quan TRAN
e0d611e9e5 use alpine:3.6 instead of latest
Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
2018-01-23 09:50:59 +00:00
Minh-Quan TRAN
e1f7c39d28 use golang 1.9.2 to build & use multi-line commands for readability
Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
2018-01-23 09:50:59 +00:00
Alex Ellis
fc0721c231 Ignore build folder from tests, restore unit test RUN step
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-09 08:40:37 +00:00
Lewis Cowles
47abbdf3d7 Version relocation works
Signed-off-by: Lewis Cowles <lewiscowles@me.com>
2017-11-08 19:36:01 +00:00
Alex Ellis
96155667fa Scan for license compliance during build
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-11-06 20:22:27 +00:00
John McCabe
b6d7fc1931 Migrate all imports/references to OpenFaaS org
This commit updates all imports and references in documentation/scripts to
point at the new github OpenFaaS org.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-25 17:19:20 +01:00
Alex Ellis
64475aee1f Support ARM64 for Packet
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-09-22 11:20:02 +01:00
Minh-Quan TRAN
17b39a94f6 Add tag into version command and shorten SHA1
resolve #105

Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
2017-09-21 09:38:44 +01:00
Minh-Quan TRAN
09c255a550 Stop build if gofmt returns files need to be re-formatted
Fix syntax for stack/stack.go and stack/stack_test.go

Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
2017-09-13 17:27:14 -07:00
Alex Ellis
6cc7925120 Add gofmt to build
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-09-12 09:50:49 -07:00
Alex Ellis
2d1281e036 Update Dockerfile.redist 2017-09-12 09:48:02 -07:00
Alex Ellis
0bdfbcb26b Reduce binary output size via ldflags stripping:
Before:

8.2M    faas-cli
6.9M    faas-cli-armhf
8.1M    faas-cli-darwin
8.2M    faas-cli.exe

After stripping with -s -w:

5.5M    faas-cli
4.5M    faas-cli-armhf
5.9M    faas-cli-darwin
5.5M    faas-cli.exe

Add invoke/list function

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-09-04 08:55:05 +01:00
John McCabe
ef8ba0fc0b Fix importpath in Go linker -X ldflag
This commit fixes the importpath to fully identify the `commands`
package so that the GitCommit var can be populated at build time.

This will fix binaries build by the `build_redist.sh` script, with the
Brew built release requiring the same update in the homebrew-core
formula (ie bumping the version on the command line isn't sufficient
this time).

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-03 16:54:08 +01:00
Alex Ellis
b877c56f07 Post-merge fixes
* Reinstate Windows build
* Mention Dockerfile --lang type in help
* Validate that "lang" is passed in YAML
* Add vendoring packages for Windows

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-08-31 16:12:32 +01:00
Alex
3f97a37ff2 Update to Golang 1.8.3
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-08-27 09:15:43 +01:00
Alex Ellis
a0084331e6 Add get helper script and include commit info in binaries 2017-06-23 15:26:00 +01:00