From f2354806910ea500567f4b148e4a086f2e351874 Mon Sep 17 00:00:00 2001 From: ahmza Date: Tue, 26 Nov 2024 00:02:56 +0000 Subject: [PATCH] removed gitlab ci cd --- .gitlab-ci.yml | 26 -------------------------- Dockerfile.old | 32 -------------------------------- netlify.toml | 10 ---------- 3 files changed, 68 deletions(-) delete mode 100644 .gitlab-ci.yml delete mode 100644 Dockerfile.old delete mode 100644 netlify.toml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f75f1c8..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -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" diff --git a/Dockerfile.old b/Dockerfile.old deleted file mode 100644 index b61696c..0000000 --- a/Dockerfile.old +++ /dev/null @@ -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 diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index 95f465e..0000000 --- a/netlify.toml +++ /dev/null @@ -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" - -