forj-oss / build-env Goto Github PK
View Code? Open in Web Editor NEWCollection of build environment scripts used by most all forjj repositories.
License: Other
Collection of build environment scripts used by most all forjj repositories.
License: Other
Docker multistage is another great new feature from docker which will simplify how we build and deliver in a final small image.
This was addressed in the GO module of build-env, but is a little bit complex and simplified by the module.
But the code itself could simplified as well now again.
Ref: https://docs.docker.com/develop/develop-images/multistage-build/
Related to forj-oss/forjj#207, a source to build-env.sh report an error in order to run create_build-env.sh which doesn't exist.
The issue is related to https://github.com/forj-oss/build-env/blob/master/lib/build-env.fcts.sh#L53 which is referring to GO in generic shell code.
Need to be fixed.
Module : GO
After build_env
script executed, the build environment gets loaded, and go and glide became available.
When you are in project root, go
start docker from the project root.
But if we move to a subdirectory, docker stay in the same working directory. But sometimes, we just need a simple module build and not all the application build.
Ex:
Following looks good:
[/home/larsonsh/src/forj/src/forjj] $ go build
++ sudo docker run --rm -i -t -v /home/me/src/forj/:/go -w /go/src/forjj -u 10001 forjj-go-env /usr/local/go/bin/go-static build -ldflags '-X main.build_branch=workspace-mgt -X main.build_commit=6ac25087d1fc45d4662d082943068129e4712f55 -X main.build_date=2018-09-06_22:18:07_+0200 -X main.build_tag=false'
Following do not looks good:
[/home/larsonsh/src/forj/src/forjj/workspace] $ go build
++ sudo docker run --rm -i -t -v /home/me/src/forj/:/go -w /go/src/forjj -u 10001 forjj-go-env /usr/local/go/bin/go-static build -ldflags '-X main.build_branch=workspace-mgt -X main.build_commit=6ac25087d1fc45d4662d082943068129e4712f55 -X main.build_date=2018-09-06_22:18:07_+0200 -X main.build_tag=false'
This last sentence build from the project root
and not from project root/
workspace
Requires to build only the sub-directory.
Today, the go wrapper run docker run to execute the go container.
Creating and deleting the container takes times which can be eliminated by a docker run + exec(s)
We would use this kind of features in Jenkins pipeline as well, so that Jenkins will have more stages while those steps can be executed from developer workstation, and have a global script to execute all those stages as single task.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.