clippable/.gitlab-ci.yml
shockrah ef0981b68f + Adding build stage for the docker image
Kinda yolo'ing this one but hey lets see
2021-10-22 20:41:38 -07:00

53 lines
1.1 KiB
YAML

stages:
- pages
- build
# Builds out the intended zip package
package:
image: rustlang/rust:nightly
stage: build
script:
- rustup default nightly-2021-09-18
- mkdir -p build
- cp api/templates/ api/static/ build -r
- cargo --version
- cargo build --release
- cp target/release/api build/server
- cp ./scripts/generate-thumbnail.sh build/
- cp readme.md build/
- sh ./scripts/default-rocket-toml.sh
artifacts:
paths:
- build/
# Build the updated docker
build-docker-image:
stage: build
image: docker:stable
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
- docker build -t registry.gitlab.com/shockrah/clippable .
- docker push registry.gitlab.com/shockrah/clippable
pages:
image: shockrah/website:latest
stage: pages
before_script:
- git submodule init
- git submodule update
script:
- cd gitpage
- hugo
- mv public/ ..
- ls ../public -R
artifacts:
paths:
- public/
testing:
image: alpine
stage: build
script:
- echo $SOMEVAR