fixed dodgy Dockerfile and cleaned up .gitlab-ci.yml
This commit is contained in:
+3
-7
@@ -1,19 +1,15 @@
|
|||||||
image: jdrouet/docker-with-buildx:stable
|
image: jdrouet/docker-with-buildx:stable
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# If set to 0 gitlab will not build the image
|
|
||||||
BUILD: 1
|
|
||||||
DOCKER_HOST: tcp://docker:2375
|
DOCKER_HOST: tcp://docker:2375
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
# Major.Minor.Release
|
# Major.Minor.Release
|
||||||
# Major - Shouldn't change often, Big changes to the site
|
# Major - Shouldn't change often, Big changes to the site
|
||||||
# Minor - starts from 0 when Major is incremented +1 for each version that goes public
|
# Minor - starts from 0 when Major is incremented +1 for each version that goes public
|
||||||
# Release - For each time a development milestone is reached
|
# Release - For each time a development milestone is reached
|
||||||
VERSION: 1.1.1
|
VERSION: 1.2.0
|
||||||
|
BUILD: 1 # If set to 0 gitlab will not build the image
|
||||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION
|
||||||
# Grab Variables for TINA CMS
|
|
||||||
TINA_CID: $TINA_CID
|
|
||||||
TINA_TOKEN: $TINA_TOKEN
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
@@ -23,6 +19,6 @@ build:
|
|||||||
script:
|
script:
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- docker buildx create --use
|
- docker buildx create --use
|
||||||
- docker buildx build --build-arg TINA_CID="${TINA_CID}" --build-arg TINA_TOKEN="{$TINA_TOKEN}" --no-cache --platform linux/arm64,linux/amd64 -t $IMAGE_TAG --push .
|
- docker buildx build --build-arg --no-cache --platform linux/arm64,linux/amd64 -t $IMAGE_TAG --push .
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "staging") && $BUILD == "1"
|
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "staging") && $BUILD == "1"
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ RUN git clone --recurse-submodules https://gitlab.com/AHMZA/blog.git
|
|||||||
WORKDIR blog
|
WORKDIR blog
|
||||||
|
|
||||||
# run hugo --minify to generate static files
|
# run hugo --minify to generate static files
|
||||||
hugo --minify
|
RUN hugo --minify
|
||||||
|
|
||||||
|
|
||||||
# Nginx image is as basic as we can get
|
# Nginx image is as basic as we can get
|
||||||
|
|||||||
Reference in New Issue
Block a user