Skip to content

Commit

Permalink
Merge pull request #42 from FlowCI/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gy2006 authored Feb 10, 2021
2 parents 2155cbb + 0e36cea commit 4e00a2c
Show file tree
Hide file tree
Showing 29 changed files with 1,131 additions and 377 deletions.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04

RUN apt update
RUN apt install git curl -y
RUN apt install git curl wget -y

## docker ##
RUN curl -L https://github.com/FlowCI/docker/releases/download/v0.20.9/docker-19_03_5 -o /usr/local/bin/docker \
Expand All @@ -17,6 +17,15 @@ RUN curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-c
RUN mkdir -p $HOME/.ssh
RUN echo "StrictHostKeyChecking=no" >> $HOME/.ssh/config

## install python3 environment
RUN apt install python3.6-distutils -y
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6

RUN ln -s /usr/bin/python3.6 /usr/bin/python

## install required pip packages
RUN python3 -m pip install requests==2.22.0 python-lib-flow.ci==1.21.5

## default work dir
ENV FLOWCI_AGENT_WORKSPACE=/ws
RUN mkdir -p $FLOWCI_AGENT_WORKSPACE
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ CURRENT_DIR := $(shell pwd)

LINUX_AMD64 := GOOS=linux GOARCH=amd64
MAC_AMD64 := GOOS=darwin GOARCH=amd64
WIN_AMD64 := GOOS=windows GOARCH=amd64

GO := go
GOGEN := $(GO) generate ./...
GOBUILD_LINUX := $(LINUX_AMD64) $(GO) build -o bin/$(PROJECT)-linux -v
GOBUILD_MAC := $(MAC_AMD64) $(GO) build -o bin/$(PROJECT)-mac -v
GOBUILD_WIN := $(WIN_AMD64) $(GO) build -o bin/$(PROJECT)-win -v

GOTEST_MOCK_GEN := docker run --rm -v "$(CURRENT_DIR)":/src -w /src vektra/mockery --all
GOTEST := $(GO) test ./... -v -timeout 10s
Expand All @@ -21,7 +23,7 @@ DOCKER_BUILD := ./build.sh
.PHONY: build protogen test docker clean cleanall

build:
$(DOCKER_RUN) "$(GOGEN) && $(GOBUILD_LINUX) && $(GOBUILD_MAC)"
$(DOCKER_RUN) "$(GOGEN) && $(GOBUILD_LINUX) && $(GOBUILD_MAC) && $(GOBUILD_WIN)"

test:
$(GOTEST_MOCK_GEN)
Expand Down
Loading

0 comments on commit 4e00a2c

Please sign in to comment.