use prebuilt ocis binary for eos builds
This commit is contained in:
4 files changed
+15
-50
No files matched your search
+11
-4
@@ -988,15 +988,22 @@ def dockerEos(ctx):
|
|||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": "amd64",
|
"arch": "amd64",
|
||||||
},
|
},
|
||||||
"steps": makeGenerate("ocis") +
|
"steps": makeGenerate("") + [
|
||||||
build() + [
|
{
|
||||||
|
"name": "build",
|
||||||
|
"image": "owncloudci/golang:1.17",
|
||||||
|
"pull": "always",
|
||||||
|
"commands": [
|
||||||
|
"make -C ocis release-linux-docker",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dryrun-eos-ocis",
|
"name": "dryrun-eos-ocis",
|
||||||
"image": "plugins/docker:latest",
|
"image": "plugins/docker:latest",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dry_run": True,
|
"dry_run": True,
|
||||||
"context": "ocis/docker/eos-ocis",
|
"context": "ocis",
|
||||||
"tags": "linux-eos-ocis",
|
"tags": "linux-eos-ocis",
|
||||||
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
||||||
"repo": "owncloud/eos-ocis",
|
"repo": "owncloud/eos-ocis",
|
||||||
@@ -1021,7 +1028,7 @@ def dockerEos(ctx):
|
|||||||
"from_secret": "docker_password",
|
"from_secret": "docker_password",
|
||||||
},
|
},
|
||||||
"auto_tag": True,
|
"auto_tag": True,
|
||||||
"context": "ocis/docker/eos-ocis",
|
"context": "ocis",
|
||||||
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
|
||||||
"repo": "owncloud/eos-ocis",
|
"repo": "owncloud/eos-ocis",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
*
|
*
|
||||||
!dist/
|
!dist/
|
||||||
!bin/
|
!bin/
|
||||||
|
!docker
|
||||||
@@ -1,37 +1,7 @@
|
|||||||
FROM centos:7 as build
|
|
||||||
ARG BRANCH=master
|
|
||||||
|
|
||||||
ENV CGO_ENABLED=1
|
|
||||||
ENV GOOS=linux
|
|
||||||
RUN rpm --rebuilddb && yum -y install \
|
|
||||||
wget \
|
|
||||||
time \
|
|
||||||
make \
|
|
||||||
gcc \
|
|
||||||
git
|
|
||||||
RUN wget -q https://dl.google.com/go/go1.17.2.linux-amd64.tar.gz
|
|
||||||
RUN mkdir -p /usr/local/bin
|
|
||||||
RUN tar xf go1.17.2.linux-amd64.tar.gz -C /usr/local
|
|
||||||
RUN ln -s /usr/local/go/bin/* /usr/local/bin
|
|
||||||
RUN git clone https://github.com/owncloud/ocis.git
|
|
||||||
RUN cd ocis && git checkout ${BRANCH}
|
|
||||||
RUN cd ocis && git log -n 1
|
|
||||||
RUN cd ocis/ocis && go build -v -o ../bin/ocis -toolexec '/usr/bin/time -v' ./cmd/ocis
|
|
||||||
# RUN cd ocis && make generate bin/ocis
|
|
||||||
|
|
||||||
# build user lookup test program
|
|
||||||
RUN mkdir -p /build
|
|
||||||
COPY user.go /build/user.go
|
|
||||||
RUN cd /build && go build -o user user.go
|
|
||||||
|
|
||||||
|
|
||||||
FROM owncloud/eos-base:4.8.26
|
FROM owncloud/eos-base:4.8.26
|
||||||
RUN mkdir -p /usr/local/bin
|
RUN mkdir -p /usr/local/bin
|
||||||
COPY --from=build ocis/bin/ocis /usr/local/bin/
|
COPY dist/binaries/ocis-linux-amd64 /usr/local/bin/ocis
|
||||||
RUN chmod +x /usr/local/bin/ocis
|
RUN chmod +x /usr/local/bin/ocis
|
||||||
|
|
||||||
COPY --from=build /build/user /usr/local/bin/user
|
COPY docker/eos-ocis/setup /setup
|
||||||
RUN chmod +x /usr/local/bin/user
|
COPY docker/eos-ocis/entrypoint /entrypoint
|
||||||
|
|
||||||
COPY setup /setup
|
|
||||||
COPY entrypoint /entrypoint
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
gouser "os/user"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
username := os.Args[1]
|
|
||||||
user, err := gouser.Lookup(username)
|
|
||||||
fmt.Printf("User %#v %#v %#v\n", username, user, err)
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user