CI: add Dockerfile for repochecker (used for student's CI)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5c990de2a0
commit
d458ac963a
22
.drone-manifest-fic-repochecker.yml
Normal file
22
.drone-manifest-fic-repochecker.yml
Normal file
@ -0,0 +1,22 @@
|
||||
image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
manifests:
|
||||
- image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
- image: nemunaire/fic-repochecker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
41
.drone.yml
41
.drone.yml
@ -181,6 +181,21 @@ steps:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: docker repochecker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: nemunaire/fic-repochecker
|
||||
auto_tag: true
|
||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
dockerfile: Dockerfile-repochecker
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@ -346,6 +361,21 @@ steps:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: docker repochecker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: nemunaire/fic-repochecker
|
||||
auto_tag: true
|
||||
auto_tag_suffix: ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
dockerfile: Dockerfile-repochecker
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -395,6 +425,17 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
- name: publish repochecker
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
auto_tag: true
|
||||
ignore_missing: true
|
||||
spec: .drone-manifest-fic-repochecker.yml
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
- name: publish qa
|
||||
image: plugins/manifest
|
||||
settings:
|
||||
|
21
Dockerfile-repochecker
Normal file
21
Dockerfile-repochecker
Normal file
@ -0,0 +1,21 @@
|
||||
FROM golang:alpine as gobuild
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
WORKDIR /go/src/srs.epita.fr/fic-server/
|
||||
|
||||
ADD go.mod go.sum ./
|
||||
ADD settings settings/
|
||||
ADD libfic ./libfic/
|
||||
ADD admin ./admin/
|
||||
ADD repochecker ./repochecker/
|
||||
|
||||
RUN go get -d -v ./repochecker
|
||||
RUN go build -v -o repochecker/repochecker ./repochecker
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
||||
ENTRYPOINT ["/usr/bin/repochecker"]
|
||||
|
||||
COPY --from=gobuild /go/src/srs.epita.fr/fic-server/repochecker/repochecker /usr/bin/repochecker
|
Loading…
Reference in New Issue
Block a user