clippable/.gitlab-ci.yml
shockrah ba0d75d383 + New jobs for building both admin and normal docker images
+ New jobs for building both admin and normal binary packages

! NOTE: This commit is likely broken so do not use it to checkout
2022-03-27 00:45:07 -07:00

83 lines
1.5 KiB
YAML

stages:
- pages
- build-frontend
- build-backend
- deploy
include:
- local: 'ci/cargo.yml'
- local: 'ci/docker.yml'
pages:
image: shockrah/website:latest
stage: pages
only:
refs:
- master
before_script:
- git submodule init
- git submodule update
script:
- cd gitpage
- hugo
- mv public/ ..
- ls ../public -R
artifacts:
paths:
- public/
# Webpack bundles everything anyway so both admin/non-admin builds have
# the same frontend code.
build-frontend-js:
image: codesignal/typescript:v9.6.0
stage: build-frontend
only:
refs:
- master
script:
- cd ts/
- npm i
- npm run build
artifacts:
paths:
- api/static/
build-server-no-admin:
extends: .cargo-builder
script:
- cd api/
- cargo build --release
- cd ../
build-server-admin-enabled:
extends: .cargo-builder
script:
- cd api/
- cargo build --release --features admin
- cd ../
deploy-no-admin-docker:
stage: deploy
extends: .docker-deploy
needs:
- build-server-no-admin
dependencies:
- build-server-no-admin
script:
- docker build -t registry.gitlab.com/shockrah/clippable .
- docker push registry.gitlab.com/shockrah/clippable
deploy-admin-docker:
stage: deploy
extends: .docker-deploy
needs:
- build-server-admin-enabled
dependencies:
- build-server-admin-enabled
script:
- docker build -t registry.gitlab.com/shockrah/clippable:admin .
- docker push registry.gitlab.com/shockrah/clippable:admin