Add Environment v2 Builder (#298)
Build server and client for environments. This build server will run inside environment builders and invoke environment-specific scripts for doing builds. It provides a uniform language-independent API for builds to the fission build manager. The change also includes an implementation of a builder for Python -- this "builder" acts on requirements.txt and runs `pip install` to collect all function deps.
This commit is contained in:
committed by
Soam Vasani
parent
d83c89df69
commit
9d1b096bac
@@ -0,0 +1,11 @@
|
||||
FROM alpine:3.5
|
||||
|
||||
RUN apk update
|
||||
RUN apk add --no-cache python3 python3-dev build-base
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN rm -r /root/.cache
|
||||
|
||||
ADD defaultBuildCmd /usr/local/bin/build
|
||||
ADD builder /
|
||||
|
||||
EXPOSE 8000
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
builderDir=${GOPATH}/src/github.com/fission/fission/builder/cmd
|
||||
pushd ${builderDir}
|
||||
GOOS=linux GOARCH=386 go build -o builder .
|
||||
popd
|
||||
cp ${builderDir}/builder .
|
||||
docker build -t python-builder .
|
||||
docker tag python-builder fission/python-builder:$tag
|
||||
docker push fission/python-builder:$tag
|
||||
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
pip3 install -r ${SRC_PKG}/requirements.txt -t ${SRC_PKG} && cp -r ${SRC_PKG} ${DEPLOY_PKG}
|
||||
Reference in New Issue
Block a user