mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
Clean up pipeline:
- CI: remove prepare stage for redoc image from pipeline - remove obsolete API doc related files
This commit is contained in:
parent
3524564a0f
commit
de4ac7b9b5
4 changed files with 0 additions and 77 deletions
|
@ -15,23 +15,10 @@ variables:
|
||||||
PORT: 4000
|
PORT: 4000
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- prepare
|
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
# Stage: prepare
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# Build docker images
|
|
||||||
prepare:redoc:
|
|
||||||
stage: prepare
|
|
||||||
script:
|
|
||||||
- docker build -f doc/api/Dockerfile -t redoc .
|
|
||||||
tags:
|
|
||||||
- shell
|
|
||||||
- linux
|
|
||||||
|
|
||||||
# Stage: build
|
# Stage: build
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
@ -58,25 +45,9 @@ build:docker:
|
||||||
script:
|
script:
|
||||||
- docker build -t ${DOCKER_IMAGE} .
|
- docker build -t ${DOCKER_IMAGE} .
|
||||||
|
|
||||||
|
|
||||||
# Stage: test
|
# Stage: test
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
test:apidoc:
|
|
||||||
stage: test
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
image: redoc
|
|
||||||
script:
|
|
||||||
- cd doc/api
|
|
||||||
- redoc-cli bundle --cdn --title "VILLASweb Backend API Documentation" --output index.html swagger.json
|
|
||||||
dependencies:
|
|
||||||
- build:backend
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- doc/api/index.html
|
|
||||||
- doc/api/swagger.json
|
|
||||||
|
|
||||||
test:gotest:
|
test:gotest:
|
||||||
stage: test
|
stage: test
|
||||||
variables:
|
variables:
|
||||||
|
@ -180,19 +151,3 @@ deploy:docker:
|
||||||
tags:
|
tags:
|
||||||
- shell
|
- shell
|
||||||
- linux
|
- linux
|
||||||
|
|
||||||
# deploy:upload:
|
|
||||||
# stage: deploy
|
|
||||||
# image:
|
|
||||||
# name: rclone/rclone:1.50
|
|
||||||
# entrypoint: [""]
|
|
||||||
# before_script:
|
|
||||||
# - rclone config create fein webdav url ${DEPLOY_PATH} vendor other user ${DEPLOY_USER} pass ${DEPLOY_PASS}
|
|
||||||
# script:
|
|
||||||
# - rclone copy --include=index.html --include=swagger.json doc/api fein:villas/api/web
|
|
||||||
# dependencies:
|
|
||||||
# - test:apidoc
|
|
||||||
# only:
|
|
||||||
# - master
|
|
||||||
# tags:
|
|
||||||
# - shell
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM node:8
|
|
||||||
|
|
||||||
RUN npm -g install redoc-cli
|
|
|
@ -1,20 +0,0 @@
|
||||||
TITLE := "VILLASweb Backend API Documentation"
|
|
||||||
|
|
||||||
DEPLOY_USER ?= deploy
|
|
||||||
DEPLOY_HOST ?= acs-os-fein-website
|
|
||||||
DEPLOY_PATH ?= /var/www/villas/api/web/
|
|
||||||
|
|
||||||
RSYNC_OPTS ?= --recursive --ignore-missing-args --copy-links --chown $(DEPLOY_USER):$(DEPLOY_USER)
|
|
||||||
|
|
||||||
all: index.html
|
|
||||||
|
|
||||||
index.html: swagger.json
|
|
||||||
redoc-cli bundle --cdn --title $(TITLE) --output $@ swagger.json
|
|
||||||
|
|
||||||
deploy: index.html
|
|
||||||
rsync $(RSYNC_OPTS) index.html swagger.json $(DEPLOY_USER)@$(DEPLOY_HOST):$(DEPLOY_PATH)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf index.html
|
|
||||||
|
|
||||||
.PHONY: docs clean deploy
|
|
|
@ -1,9 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
|
|
||||||
cd ../../
|
|
||||||
go mod tidy
|
|
||||||
swag init -p pascalcase -g "start.go" -o "./doc/api/"
|
|
||||||
cd -
|
|
||||||
|
|
||||||
redoc-cli bundle --cdn --title "VILLASweb Backend API" --output index.html swagger.json
|
|
Loading…
Add table
Reference in a new issue