reverting to previous method of building

This commit is contained in:
AHMZA
2022-02-23 22:39:34 +00:00
parent ea2b02e357
commit 987d2b5706
+32 -7
View File
@@ -1,15 +1,40 @@
stages: stages:
- build - build
- dockerize - dockerize
variables: variables:
TAG_LATEST: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:latest CONTAINER_IMAGE: registry.gitlab.com/ahmza/blog:latest
TAG_COMMIT: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_NAME:$CI_COMMIT_SHORT_SHA GIT_SUBMODULE_STRATEGY: recursive
Build: Build:
stage: build stage: build
image: docker:latest image: alpine:latest
services: before_script:
- docker:dind - which curl || ( apk update && apk add curl )
- curl -L https://github.com/gohugoio/hugo/releases/download/v0.90.0/hugo_0.90.0_Linux-64bit.tar.gz > hugo.tar.gz
- tar -zxf hugo.tar.gz
- mv hugo /usr/local/bin
script: script:
- docker build -t $TAG_COMMIT -t $TAG_LATEST . - hugo
artifacts:
name: "webfiles"
paths:
- public
only:
- main
Dockerize:
stage: dockerize
image:
name: nginx:latest
script:
- mv nginx.conf /etc/nginx/nginx.conf
- cd public
- mv * /usr/share/nginx/html
- ls /etc/nginx/
- cat /etc/nginx/nginx.conf
- ls /usr/share/nginx/html
only:
- main