added gitlab ci pipeline

This commit is contained in:
AHMZA
2021-12-08 18:48:38 +00:00
parent 3b90124c66
commit b9f1e3e34c
+26
View File
@@ -0,0 +1,26 @@
image: "gitlab/dind"
stages:
- build
- dockerize
Build:
stage: build
image: alpine:latest
before_script:
- '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
- tar -zxf hugo_0.90.0_Linux-64bit.tar.gz
script:
- hugo
artifacts:
paths:
- public
Dockerize:
stage: dockerize
before_script:
- docker login $CI_REGISTRY -u ahmza -p $CI_DOCKER_ACCESS_TOKEN
script:
- docker build -t $CI_REGISTRY/ahmza/blog .
- docker push $CI_REGISTRY/ahmza/blog