commit
0cdf4811b9
@ -0,0 +1,26 @@
|
||||
name: Continuous Delivery
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.14
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -1,2 +1,3 @@
|
||||
.idea/
|
||||
**/**_mock.go
|
||||
**/**_mock.go
|
||||
dist/
|
||||
|
@ -0,0 +1,96 @@
|
||||
before:
|
||||
hooks:
|
||||
- go mod download
|
||||
builds:
|
||||
- id: bs-blacklister
|
||||
main: ./cmd/bs-blacklister/bs-blacklister.go
|
||||
binary: bs-blacklister
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- id: bs-configapi
|
||||
main: ./cmd/bs-configapi/bs-configapi.go
|
||||
binary: bs-configapi
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- id: bs-crawler
|
||||
main: ./cmd/bs-crawler/bs-crawler.go
|
||||
binary: bs-crawler
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- id: bs-indexer
|
||||
main: ./cmd/bs-indexer/bs-indexer.go
|
||||
binary: bs-indexer
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- id: bs-scheduler
|
||||
main: ./cmd/bs-scheduler/bs-scheduler.go
|
||||
binary: bs-scheduler
|
||||
goos:
|
||||
- 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:
|
||||
name_template: "{{ .Tag }}-{{ .ShortCommit }}"
|
||||
release:
|
||||
prerelease: true
|
@ -0,0 +1,16 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
|
||||
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.0.0-rc1] - 2021-01-12
|
||||
|
||||
Initial stable release candidate.
|
||||
|
||||
[unreleased]: https://github.com/creekorful/bathyscaphe/compare/v1.0.0-rc1...HEAD
|
||||
|
||||
[v1.0.0-rc1]: https://github.com/creekorful/bathyscaphe/releases/tag/v1.0.0-rc1
|
@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD bs-blacklister /usr/bin/bs-blacklister
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bs-blacklister"]
|
@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD bs-configapi /usr/bin/bs-configapi
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bs-configapi"]
|
@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD bs-crawler /usr/bin/bs-crawler
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bs-crawler"]
|
@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD bs-indexer /usr/bin/bs-indexer
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bs-indexer"]
|
@ -0,0 +1,5 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ADD bs-scheduler /usr/bin/bs-scheduler
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bs-scheduler"]
|
@ -1,24 +0,0 @@
|
||||
# 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/trandoshan/cmd/tdsh-blacklister
|
||||
|
||||
# runtime image
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/tdsh-blacklister /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["./tdsh-blacklister"]
|
@ -1,24 +0,0 @@
|
||||
# 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/trandoshan/cmd/tdsh-configapi
|
||||
|
||||
# runtime image
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/tdsh-configapi /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["./tdsh-configapi"]
|
@ -1,24 +0,0 @@
|
||||
# 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/trandoshan/cmd/tdsh-crawler
|
||||
|
||||
# runtime image
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/tdsh-crawler /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["./tdsh-crawler"]
|
@ -1,24 +0,0 @@
|
||||
# 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/trandoshan/cmd/tdsh-indexer
|
||||
|
||||
# runtime image
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/tdsh-indexer /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["./tdsh-indexer"]
|
@ -1,24 +0,0 @@
|
||||
# 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/trandoshan/cmd/tdsh-scheduler
|
||||
|
||||
# runtime image
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/tdsh-scheduler /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["./tdsh-scheduler"]
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/creekorful/trandoshan/internal/blacklister"
|
||||
"github.com/creekorful/trandoshan/internal/process"
|
||||
"github.com/creekorful/bathyscaphe/internal/blacklister"
|
||||
"github.com/creekorful/bathyscaphe/internal/process"
|
||||
"os"
|
||||
)
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/creekorful/trandoshan/internal/configapi"
|
||||
"github.com/creekorful/trandoshan/internal/process"
|
||||
"github.com/creekorful/bathyscaphe/internal/configapi"
|
||||
"github.com/creekorful/bathyscaphe/internal/process"
|
||||
"os"
|
||||
)
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/creekorful/trandoshan/internal/crawler"
|
||||
"github.com/creekorful/trandoshan/internal/process"
|
||||
"github.com/creekorful/bathyscaphe/internal/crawler"
|
||||
"github.com/creekorful/bathyscaphe/internal/process"
|
||||
"os"
|
||||
)
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/creekorful/trandoshan/internal/indexer"
|
||||
"github.com/creekorful/trandoshan/internal/process"
|
||||
"github.com/creekorful/bathyscaphe/internal/indexer"
|
||||
"github.com/creekorful/bathyscaphe/internal/process"
|
||||
"os"
|
||||
)
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/creekorful/trandoshan/internal/process"
|
||||
"github.com/creekorful/trandoshan/internal/scheduler"
|
||||
"github.com/creekorful/bathyscaphe/internal/process"
|
||||
"github.com/creekorful/bathyscaphe/internal/scheduler"
|
||||
"os"
|
||||
)
|
||||
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set image tag if provided
|
||||
tag="latest"
|
||||
if [ "$1" ]; then
|
||||
tag="$1"
|
||||
fi
|
||||
|
||||
# build docker images
|
||||
for path in build/docker/Dockerfile.*; do
|
||||
name=$(echo "$path" | cut -d'.' -f2)
|
||||
docker build . -f "$path" -t "creekorful/$name:$tag"
|
||||
done
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# set image tag if provided
|
||||
tag="latest"
|
||||
if [ "$1" ]; then
|
||||
tag="$1"
|
||||
fi
|
||||
|
||||
# push docker images
|
||||
for path in build/docker/Dockerfile.*; do
|
||||
name=$(echo "$path" | cut -d'.' -f2)
|
||||
docker push "creekorful/$name:$tag"
|
||||
done
|
@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# make sure we have passed a tag as version
|
||||
if [ "$1" ]; then
|
||||
tag="$1"
|
||||
else
|
||||
echo "correct usage ./release.sh <tag>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create signed tag
|
||||
git tag -s "v$tag" -m "Release $tag"
|
||||
|
||||
# build the docker images
|
||||
./scripts/build.sh "$tag" # create version tag
|
||||
./scripts/build.sh # create latest tag
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Release $tag is ready!"
|
||||
echo "Please validate the changes, and once everything is confirmed, run the following:"
|
||||
echo ""
|
||||
echo "Update the git repository:"
|
||||
echo ""
|
||||
echo "$ git push && git push --tags"
|
||||
echo ""
|
||||
echo "Update the docker images:"
|
||||
echo ""
|
||||
echo "$ ./scripts/push.sh $tag"
|
||||
echo "$ ./scripts/push.sh"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Happy hacking ;D"
|
Loading…
Reference in New Issue