CI: build repochecker and generate repochecker.version
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
3bc8f0bf95
commit
38c18ef1aa
21
.drone.yml
21
.drone.yml
@ -20,6 +20,7 @@ steps:
|
|||||||
- go get -v -d srs.epita.fr/fic-server/backend
|
- go get -v -d srs.epita.fr/fic-server/backend
|
||||||
- go get -v -d srs.epita.fr/fic-server/frontend
|
- go get -v -d srs.epita.fr/fic-server/frontend
|
||||||
- go get -v -d srs.epita.fr/fic-server/dashboard
|
- go get -v -d srs.epita.fr/fic-server/dashboard
|
||||||
|
- go get -v -d srs.epita.fr/fic-server/repochecker
|
||||||
- go get -v -d srs.epita.fr/fic-server/qa
|
- go get -v -d srs.epita.fr/fic-server/qa
|
||||||
- mkdir deploy
|
- mkdir deploy
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ steps:
|
|||||||
- go vet -v srs.epita.fr/fic-server/backend
|
- go vet -v srs.epita.fr/fic-server/backend
|
||||||
- go vet -v srs.epita.fr/fic-server/frontend
|
- go vet -v srs.epita.fr/fic-server/frontend
|
||||||
- go vet -v srs.epita.fr/fic-server/dashboard
|
- go vet -v srs.epita.fr/fic-server/dashboard
|
||||||
|
- go vet -v srs.epita.fr/fic-server/repochecker
|
||||||
- go vet -v srs.epita.fr/fic-server/qa
|
- go vet -v srs.epita.fr/fic-server/qa
|
||||||
|
|
||||||
- name: build admin
|
- name: build admin
|
||||||
@ -53,6 +55,20 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
||||||
|
|
||||||
|
- name: build repochecker
|
||||||
|
image: golang:alpine
|
||||||
|
commands:
|
||||||
|
- go build -v -o deploy/repochecker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
|
||||||
|
- grep "const version" repochecker/update.go | sed -r 's/^.*=\s*(\S.*)$/\1/' > deploy/repochecker.version
|
||||||
|
|
||||||
|
- name: build repochecker for macOS
|
||||||
|
image: golang:alpine
|
||||||
|
commands:
|
||||||
|
- go build -v -o deploy/repochecker-darwin-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
|
||||||
|
environment:
|
||||||
|
GOOS: darwin
|
||||||
|
GOARCH: amd64
|
||||||
|
|
||||||
- name: build qa
|
- name: build qa
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
commands:
|
commands:
|
||||||
@ -116,6 +132,11 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
- go build -v -o deploy/dashboard-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/dashboard
|
||||||
|
|
||||||
|
- name: build repochecker
|
||||||
|
image: golang:alpine
|
||||||
|
commands:
|
||||||
|
- go build -v -o deploy/repochecker-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} srs.epita.fr/fic-server/repochecker
|
||||||
|
|
||||||
- name: build qa
|
- name: build qa
|
||||||
image: golang:alpine
|
image: golang:alpine
|
||||||
commands:
|
commands:
|
||||||
|
@ -3,6 +3,8 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- mysql-data:/var/lib/mysql
|
- mysql-data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
@ -20,12 +22,15 @@ services:
|
|||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
links:
|
links:
|
||||||
- mysql
|
- mysql
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/fic:/mnt/fic:ro
|
- /mnt/fic:/mnt/fic:ro
|
||||||
- dashboard:/srv/DASHBOARD
|
- dashboard:/srv/DASHBOARD
|
||||||
- files:/srv/FILES
|
- files:/srv/FILES
|
||||||
- pki:/srv/PKI
|
- pki:/srv/PKI
|
||||||
- settings:/srv/SETTINGS
|
- settings:/srv/SETTINGS
|
||||||
|
- submissions:/srv/submissions
|
||||||
- teams:/srv/TEAMS
|
- teams:/srv/TEAMS
|
||||||
command: -baseurl /admin/ -localimport /mnt/fic -localimportsymlink
|
command: -baseurl /admin/ -localimport /mnt/fic -localimportsymlink
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -41,6 +46,8 @@ services:
|
|||||||
image: nemunaire/fic-backend:latest
|
image: nemunaire/fic-backend:latest
|
||||||
links:
|
links:
|
||||||
- mysql
|
- mysql
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- files:/srv/FILES:ro
|
- files:/srv/FILES:ro
|
||||||
- teams:/srv/TEAMS
|
- teams:/srv/TEAMS
|
||||||
@ -51,6 +58,25 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- MYSQL_HOST=mysql
|
- MYSQL_HOST=mysql
|
||||||
|
|
||||||
|
fic-qa:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile-qa
|
||||||
|
image: nemunaire/fic-qa:latest
|
||||||
|
ports:
|
||||||
|
- "8083:8083"
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
|
volumes:
|
||||||
|
- teams:/srv/TEAMS
|
||||||
|
command: -baseurl /qa/
|
||||||
|
depends_on:
|
||||||
|
- mysql
|
||||||
|
environment:
|
||||||
|
- MYSQL_HOST=mysql
|
||||||
|
|
||||||
fic-frontend:
|
fic-frontend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@ -59,6 +85,8 @@ services:
|
|||||||
command: "-startedFile /srv/startingblock/started"
|
command: "-startedFile /srv/startingblock/started"
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- htdocs:/srv/htdocs-frontend:ro
|
- htdocs:/srv/htdocs-frontend:ro
|
||||||
- files:/srv/FILES:ro
|
- files:/srv/FILES:ro
|
||||||
@ -77,6 +105,8 @@ services:
|
|||||||
command: "-baseurl /dashboard/"
|
command: "-baseurl /dashboard/"
|
||||||
ports:
|
ports:
|
||||||
- "8082:8082"
|
- "8082:8082"
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- dashboard:/srv/DASHBOARD
|
- dashboard:/srv/DASHBOARD
|
||||||
- teams:/srv/TEAMS:ro
|
- teams:/srv/TEAMS:ro
|
||||||
@ -88,6 +118,8 @@ services:
|
|||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
ports:
|
ports:
|
||||||
- "8042:80"
|
- "8042:80"
|
||||||
|
networks:
|
||||||
|
- fic-net
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/fic:/mnt/fic:ro
|
- /mnt/fic:/mnt/fic:ro
|
||||||
- ./configs/nginx-frontend-htpasswd.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./configs/nginx-frontend-htpasswd.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
@ -114,3 +146,6 @@ volumes:
|
|||||||
device: tmpfs
|
device: tmpfs
|
||||||
submissions:
|
submissions:
|
||||||
teams:
|
teams:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
fic-net:
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = 0
|
const version = 9
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
go checkUpdate()
|
go checkUpdate()
|
||||||
@ -24,7 +24,7 @@ func checkUpdate() {
|
|||||||
var v int
|
var v int
|
||||||
if err := dec.Decode(&v); err == io.EOF || err == nil {
|
if err := dec.Decode(&v); err == io.EOF || err == nil {
|
||||||
if v > version {
|
if v > version {
|
||||||
log.Println("Your repochecker version is outdated, please update it:\n wget https://srs.nemunai.re/repochecker")
|
log.Println("Your repochecker version is outdated, please update it:\n https://srs.nemunai.re/fic-binaries/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user