Skip to content

Commit

Permalink
Add back continuous delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
creekorful committed Jan 11, 2021
1 parent ddcf5b4 commit d7e663f
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 167 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
**/**_mock.go
**/**_mock.go
dist/
51 changes: 51 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,57 @@ builds:
- linux
goarch:
- amd64
dockers:
- goos: linux
goarch: amd64
binaries:
- bs-blacklister
image_templates:
- "creekorful/bs-blacklister:latest"
- "creekorful/bs-blacklister:{{ replace .Tag \"v\" \"\" }}"
- "creekorful/bs-blacklister:{{ .Major }}"
skip_push: false
dockerfile: build/docker/Dockerfile.blacklister
- goos: linux
goarch: amd64
binaries:
- bs-configapi
image_templates:
- "creekorful/bs-configapi:latest"
- "creekorful/bs-configapi:{{ replace .Tag \"v\" \"\" }}"
- "creekorful/bs-configapi:{{ .Major }}"
skip_push: false
dockerfile: build/docker/Dockerfile.configapi
- goos: linux
goarch: amd64
binaries:
- bs-crawler
image_templates:
- "creekorful/bs-crawler:latest"
- "creekorful/bs-crawler:{{ replace .Tag \"v\" \"\" }}"
- "creekorful/bs-crawler:{{ .Major }}"
skip_push: false
dockerfile: build/docker/Dockerfile.crawler
- goos: linux
goarch: amd64
binaries:
- bs-indexer
image_templates:
- "creekorful/bs-indexer:latest"
- "creekorful/bs-indexer:{{ replace .Tag \"v\" \"\" }}"
- "creekorful/bs-indexer:{{ .Major }}"
skip_push: false
dockerfile: build/docker/Dockerfile.indexer
- goos: linux
goarch: amd64
binaries:
- bs-scheduler
image_templates:
- "creekorful/bs-scheduler:latest"
- "creekorful/bs-scheduler:{{ replace .Tag \"v\" \"\" }}"
- "creekorful/bs-scheduler:{{ .Major }}"
skip_push: false
dockerfile: build/docker/Dockerfile.scheduler
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ If you've made a change to one of the crawler component and wish to use the upda
just need to issue the following command:

```sh
$ ./script/build.sh
$ goreleaser --snapshot --skip-publish --rm-dist
```

this will rebuild all crawler images using local changes. After that just run start.sh again to have the updated version
this will rebuild all images using local changes. After that just run start.sh again to have the updated version
running.

# Architecture
Expand Down
23 changes: 2 additions & 21 deletions build/docker/Dockerfile.blacklister
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# build image
FROM golang:1.15.0-alpine as builder

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

WORKDIR /app

# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# Test then build app
RUN go build -v github.com/creekorful/bathyscaphe/cmd/bs-blacklister

# runtime image
FROM alpine:latest
COPY --from=builder /app/bs-blacklister /app/

WORKDIR /app/
ADD bs-blacklister /usr/bin/bs-blacklister

ENTRYPOINT ["./bs-blacklister"]
ENTRYPOINT ["/usr/bin/bs-blacklister"]
23 changes: 2 additions & 21 deletions build/docker/Dockerfile.configapi
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# build image
FROM golang:1.15.0-alpine as builder

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

WORKDIR /app

# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# Test then build app
RUN go build -v github.com/creekorful/bathyscaphe/cmd/bs-configapi

# runtime image
FROM alpine:latest
COPY --from=builder /app/bs-configapi /app/

WORKDIR /app/
ADD bs-configapi /usr/bin/bs-configapi

ENTRYPOINT ["./bs-configapi"]
ENTRYPOINT ["/usr/bin/bs-configapi"]
23 changes: 2 additions & 21 deletions build/docker/Dockerfile.crawler
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# build image
FROM golang:1.15.0-alpine as builder

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

WORKDIR /app

# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# Test then build app
RUN go build -v github.com/creekorful/bathyscaphe/cmd/bs-crawler

# runtime image
FROM alpine:latest
COPY --from=builder /app/bs-crawler /app/

WORKDIR /app/
ADD bs-crawler /usr/bin/bs-crawler

ENTRYPOINT ["./bs-crawler"]
ENTRYPOINT ["/usr/bin/bs-crawler"]
23 changes: 2 additions & 21 deletions build/docker/Dockerfile.indexer
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# build image
FROM golang:1.15.0-alpine as builder

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

WORKDIR /app

# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# Test then build app
RUN go build -v github.com/creekorful/bathyscaphe/cmd/bs-indexer

# runtime image
FROM alpine:latest
COPY --from=builder /app/bs-indexer /app/

WORKDIR /app/
ADD bs-indexer /usr/bin/bs-indexer

ENTRYPOINT ["./bs-indexer"]
ENTRYPOINT ["/usr/bin/bs-indexer"]
23 changes: 2 additions & 21 deletions build/docker/Dockerfile.scheduler
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
# build image
FROM golang:1.15.0-alpine as builder

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh

WORKDIR /app

# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download

COPY . .

# Test then build app
RUN go build -v github.com/creekorful/bathyscaphe/cmd/bs-scheduler

# runtime image
FROM alpine:latest
COPY --from=builder /app/bs-scheduler /app/

WORKDIR /app/
ADD bs-scheduler /usr/bin/bs-scheduler

ENTRYPOINT ["./bs-scheduler"]
ENTRYPOINT ["/usr/bin/bs-scheduler"]
13 changes: 0 additions & 13 deletions scripts/build.sh

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/push.sh

This file was deleted.

33 changes: 0 additions & 33 deletions scripts/release.sh

This file was deleted.

0 comments on commit d7e663f

Please sign in to comment.