Add back continuous delivery
parent
ddcf5b40a8
commit
d7e663fef6
@ -1,2 +1,3 @@
|
|||||||
.idea/
|
.idea/
|
||||||
**/**_mock.go
|
**/**_mock.go
|
||||||
|
dist/
|
||||||
|
@ -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
|
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"]
|
@ -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
|
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"]
|
@ -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
|
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"]
|
@ -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
|
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"]
|
@ -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
|
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"]
|
@ -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/bs-$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