Loading .github/workflows/go.yml 0 → 100644 +25 −0 Original line number Diff line number Diff line name: Go on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.16 - name: Build run: go build -v ./... - name: Test run: make test Makefile +3 −2 Original line number Diff line number Diff line Loading @@ -24,11 +24,12 @@ TEST_IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):test build: CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/s3driver ./cmd/s3driver test: docker build -t $(FULL_IMAGE_TAG) -f cmd/s3driver/Dockerfile.full . docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile . docker run --rm --privileged -v $(PWD):$(PROJECT_DIR) --device /dev/fuse $(TEST_IMAGE_TAG) container: build container: docker build -t $(IMAGE_TAG) -f cmd/s3driver/Dockerfile . docker build -t $(FULL_IMAGE_TAG) --build-arg VERSION=$(VERSION) -f cmd/s3driver/Dockerfile.full . docker build -t $(FULL_IMAGE_TAG) -f cmd/s3driver/Dockerfile.full . push: container docker push $(IMAGE_TAG) docker push $(FULL_IMAGE_TAG) Loading cmd/s3driver/Dockerfile.full +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ COPY --from=s3backer /usr/bin/s3backer /usr/bin/s3backer RUN apt-get update && \ apt-get install -y \ libfuse2 gcc sqlite3 libsqlite3-dev \ s3fs psmisc procps libcurl3 xfsprogs curl unzip && \ s3fs psmisc procps libcurl4 xfsprogs curl unzip && \ rm -rf /var/lib/apt/lists/* # install rclone Loading test/Dockerfile +4 −3 Original line number Diff line number Diff line Loading @@ -7,9 +7,10 @@ RUN apt-get update && \ git wget make && \ rm -rf /var/lib/apt/lists/* RUN wget -q https://golang.org/dl/go1.15.7.linux-amd64.tar.gz && \ tar -xf go1.15.7.linux-amd64.tar.gz && \ rm go1.15.7.linux-amd64.tar.gz && \ ARG GOVERSION=1.16.3 RUN wget -q https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz && \ tar -xf go${GOVERSION}.linux-amd64.tar.gz && \ rm go${GOVERSION}.linux-amd64.tar.gz && \ mv go /usr/local ENV GOROOT /usr/local/go Loading Loading
.github/workflows/go.yml 0 → 100644 +25 −0 Original line number Diff line number Diff line name: Go on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.16 - name: Build run: go build -v ./... - name: Test run: make test
Makefile +3 −2 Original line number Diff line number Diff line Loading @@ -24,11 +24,12 @@ TEST_IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):test build: CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/s3driver ./cmd/s3driver test: docker build -t $(FULL_IMAGE_TAG) -f cmd/s3driver/Dockerfile.full . docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile . docker run --rm --privileged -v $(PWD):$(PROJECT_DIR) --device /dev/fuse $(TEST_IMAGE_TAG) container: build container: docker build -t $(IMAGE_TAG) -f cmd/s3driver/Dockerfile . docker build -t $(FULL_IMAGE_TAG) --build-arg VERSION=$(VERSION) -f cmd/s3driver/Dockerfile.full . docker build -t $(FULL_IMAGE_TAG) -f cmd/s3driver/Dockerfile.full . push: container docker push $(IMAGE_TAG) docker push $(FULL_IMAGE_TAG) Loading
cmd/s3driver/Dockerfile.full +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ COPY --from=s3backer /usr/bin/s3backer /usr/bin/s3backer RUN apt-get update && \ apt-get install -y \ libfuse2 gcc sqlite3 libsqlite3-dev \ s3fs psmisc procps libcurl3 xfsprogs curl unzip && \ s3fs psmisc procps libcurl4 xfsprogs curl unzip && \ rm -rf /var/lib/apt/lists/* # install rclone Loading
test/Dockerfile +4 −3 Original line number Diff line number Diff line Loading @@ -7,9 +7,10 @@ RUN apt-get update && \ git wget make && \ rm -rf /var/lib/apt/lists/* RUN wget -q https://golang.org/dl/go1.15.7.linux-amd64.tar.gz && \ tar -xf go1.15.7.linux-amd64.tar.gz && \ rm go1.15.7.linux-amd64.tar.gz && \ ARG GOVERSION=1.16.3 RUN wget -q https://golang.org/dl/go${GOVERSION}.linux-amd64.tar.gz && \ tar -xf go${GOVERSION}.linux-amd64.tar.gz && \ rm go${GOVERSION}.linux-amd64.tar.gz && \ mv go /usr/local ENV GOROOT /usr/local/go Loading