Commit 3a4ba170 authored by j.vondoemming's avatar j.vondoemming
Browse files

Update .gitlab-ci_alt.yml, .gitlab-ci.yml files

parent 448e87b1
Pipeline #240031 canceled with stage
in 0 seconds
image: ubuntu:20.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
DEBIAN_FRONTEND: noninteractive
stages:
- build:renderer
- build:site
- deploy:site
build-renderer:
stage: build:renderer
before_script:
- apt update && apt install -y build-essential
script:
- make build-renderer
artifacts:
paths:
- "./renderer-src/renderer"
- "./renderer-src/*.o"
build-site:
stage: build:site
needs: ["build-renderer"]
build-docker-master:
image: docker:19.03.1
stage: build
services:
- docker:19.03.1-dind
before_script:
- apt update && apt install -y build-essential git
script:
- make build-site
artifacts:
paths:
- "./renderer-src/renderer"
- "./build/"
- export DOCKER_REGISTRY_USER=$CI_REGISTRY_USER # built-in GitLab Registry User
- export DOCKER_REGISTRY_PASSWORD=$CI_REGISTRY_PASSWORD # built-in GitLab Registry Password
- export DOCKER_REGISTRY_URL=$CI_REGISTRY # built-in GitLab Registry URL
- export COMMIT_HASH=$CI_COMMIT_SHA # Your current commit sha
- export IMAGE_NAME_WITH_REGISTRY_PREFIX=$CI_REGISTRY_IMAGE # Your repository prefixed with GitLab Registry URL
- docker login -u "$DOCKER_REGISTRY_USER" -p "$DOCKER_REGISTRY_PASSWORD" $DOCKER_REGISTRY_URL # Instructs GitLab to login to its registry
pages:
stage: deploy:site
needs: ["build-site"]
before_script:
- apt update && apt install -y build-essential git
script:
- make deploy-site
artifacts:
paths:
- "./build/"
- "./public/"
- echo "Building..." # MAKE SURE NO SPACE ON EITHER SIDE OF = IN THE FOLLOWING LINE
- export CONTAINER_FULL_IMAGE_NAME_WITH_TAG=$IMAGE_NAME_WITH_REGISTRY_PREFIX/my-build-image:$COMMIT_HASH
- docker build -f ./Dockerfile --pull -t built-image-name .
- docker tag built-image-name "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
- docker push "$CONTAINER_FULL_IMAGE_NAME_WITH_TAG"
- echo $CONTAINER_FULL_IMAGE_NAME_WITH_TAG
- echo "Deploying on CapRover..."
- docker run caprover/cli-caprover:v2.1.1 caprover deploy --caproverUrl $CAPROVER_URL --caproverPassword $CAPROVER_PASSWORD --caproverApp $CAPROVER_APP --imageName $CONTAINER_FULL_IMAGE_NAME_WITH_TAG
only:
- master
- master
image: ubuntu:20.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
DEBIAN_FRONTEND: noninteractive
stages:
- build:renderer
- build:site
- deploy:site
build-renderer:
stage: build:renderer
before_script:
- apt update && apt install -y build-essential
script:
- make build-renderer
artifacts:
paths:
- "./renderer-src/renderer"
- "./renderer-src/*.o"
build-site:
stage: build:site
needs: ["build-renderer"]
before_script:
- apt update && apt install -y build-essential git
script:
- make build-site
artifacts:
paths:
- "./renderer-src/renderer"
- "./build/"
pages:
stage: deploy:site
needs: ["build-site"]
before_script:
- apt update && apt install -y build-essential git
script:
- make deploy-site
artifacts:
paths:
- "./build/"
- "./public/"
only:
- master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment