removed gitlab ci cd

This commit is contained in:
ahmza
2024-11-26 00:02:56 +00:00
parent c7dac5ea69
commit f235480691
3 changed files with 0 additions and 68 deletions
-26
View File
@@ -1,26 +0,0 @@
default:
image: docker:27.0.3
services:
- docker:27.0.3-dind
before_script:
- docker info
variables:
# Major.Minor.Release
# 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
# Release - For each time a development milestone is reached
VERSION: 1.3.3
BUILD: 0 # If set to 0 gitlab will not build the image
IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION
DOCKER_TLS_CERTDIR: "/certs"
build:
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker context create tls-environment
- docker buildx create --use tls-environment --name multi-arch-builder
- docker buildx build --build-arg GITLAB_TOKEN=$GITLAB_TOKEN --no-cache --platform linux/arm64,linux/amd64 -t $IMAGE_TAG --push .
rules:
- if: $CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "staging") && $BUILD == "1"
-32
View File
@@ -1,32 +0,0 @@
FROM golang:1.22.5-alpine AS build
ARG GITLAB_TOKEN
ARG TARGETARCH
# install curl and git
RUN apk add --update curl git
# download and unnzip the hugo binary
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.128.2/hugo_0.128.2_linux-${TARGETARCH}.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
# clone the blog repository
RUN git clone https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git
# set blog (folder we just cloned) as the current DIR
WORKDIR blog
# run hugo --minify to generate static files
RUN hugo --minify --gc
# Nginx image is as basic as we can get without introducing further complexity
FROM nginx
# copy the nginx.conf file
COPY --from=build /go/blog/nginx.conf /etc/nginx/nginx.conf
# copy the static files
COPY --from=build /go/blog/public/ /usr/share/nginx/html
# Tell the image to expose port 80 for HTTP, SSL provided by reverse proxy.
EXPOSE 80
-10
View File
@@ -1,10 +0,0 @@
[build.environment]
GO_VERSION = "1.22.5"
HUGO_VERSION = "0.128.0"
TZ = "Europe/London"
[build]
publish = "public"
command = "hugo --gc --minify"