From 866d2dd9355f5d6773c523d230bbc29f16a785b5 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Tue, 16 Nov 2021 16:29:21 +0000 Subject: [PATCH 1/5] Builds directly. --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7c6d07..bc0e43c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,10 +8,12 @@ stages: test: stage: build image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] + name: registry.gitlab.com/pages/hugo:latest script: - - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --no-push + - hugo + artifacts: + paths: + - public except: - master @@ -36,4 +38,4 @@ deploy: script: - cat $CI_PROJECT_DIR/k8s.yml | sed "s/latest/$CI_COMMIT_SHORT_SHA/" | kubectl apply -f - only: - - master \ No newline at end of file + - master -- GitLab From 5a5da7292919cc03843000f077b571a56e23712b Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Tue, 16 Nov 2021 16:29:57 +0000 Subject: [PATCH 2/5] f --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc0e43c..f61ecfd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ test: - hugo artifacts: paths: - - public + - public except: - master -- GitLab From 880ebbea687c51bcf7efc83bddbe9d57ff504085 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Tue, 16 Nov 2021 16:45:06 +0000 Subject: [PATCH 3/5] tries. --- .gitlab-ci.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f61ecfd..0938420 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,21 +11,19 @@ test: name: registry.gitlab.com/pages/hugo:latest script: - hugo - artifacts: - paths: - - public except: - master build: stage: build image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] + name: registry.gitlab.com/pages/hugo:latest script: - - cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json - - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination indiepaas/website:$CI_COMMIT_SHORT_SHA - only: + - hugo + artifacts: + paths: + - public + except: - master deploy: @@ -33,9 +31,10 @@ deploy: tags: - deploy image: - name: lachlanevenson/k8s-kubectl - entrypoint: [""] + name: minio/mc:RELEASE.2020-01-13T22-49-03Z script: - - cat $CI_PROJECT_DIR/k8s.yml | sed "s/latest/$CI_COMMIT_SHORT_SHA/" | kubectl apply -f - - only: + - cd public/ + - export MC_HOST_minio=https://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@minio.k7.indie.host + - mc mirror --remove --overwrite . minio/k8s-libre-sh + except: - master -- GitLab From db70749b9a737e4506d7ec43b84acc8173903ab5 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Tue, 16 Nov 2021 16:48:13 +0000 Subject: [PATCH 4/5] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0938420..9b39154 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,7 @@ deploy: - deploy image: name: minio/mc:RELEASE.2020-01-13T22-49-03Z + entrypoint: [""] script: - cd public/ - export MC_HOST_minio=https://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@minio.k7.indie.host -- GitLab From 46e416148818526296caaefe63ad4bae718d5c80 Mon Sep 17 00:00:00 2001 From: Pierre Ozoux Date: Tue, 16 Nov 2021 17:55:18 +0100 Subject: [PATCH 5/5] f --- .gitlab-ci.yml | 4 ++-- Dockerfile | 12 ----------- k8s.yml | 57 -------------------------------------------------- 3 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 Dockerfile delete mode 100644 k8s.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b39154..596f960 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ build: artifacts: paths: - public - except: + only: - master deploy: @@ -37,5 +37,5 @@ deploy: - cd public/ - export MC_HOST_minio=https://${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}@minio.k7.indie.host - mc mirror --remove --overwrite . minio/k8s-libre-sh - except: + only: - master diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ac9ac02..0000000 --- a/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM unteem/nginx:1.16 -ENV HUGO_VERSION 0.58.3 -RUN apt-get update && apt-get install -y wget \ - && wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \ - && tar xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \ - && rm -r hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \ - && mv hugo /usr/bin/hugo \ - && rm -rf /var/lib/apt/lists/* -COPY . /usr/src/site -RUN cd /usr/src/site \ - && hugo -d /var/www -CMD 'nginx' diff --git a/k8s.yml b/k8s.yml deleted file mode 100644 index 32957e7..0000000 --- a/k8s.yml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: libresh -spec: - replicas: 1 - selector: - matchLabels: - app: nginx - template: - metadata: - labels: - app: nginx - spec: - containers: - - env: - image: indiepaas/website:latest - imagePullPolicy: Always - name: libresh - ports: - - containerPort: 80 ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - annotations: - kubernetes.io/tls-acme: "true" - certmanager.k8s.io/cluster-issuer: letsencrypt-prod - name: libre-sh - namespace: libre-sh -spec: - rules: - - host: k8s.libre.sh - http: - paths: - - backend: - serviceName: libresh-web - servicePort: http - path: / - tls: - - hosts: - - k8s.libre.sh - secretName: k8s-libresh-tls ---- -apiVersion: v1 -kind: Service -metadata: - name: libresh-web - namespace: libre-sh -spec: - ports: - - name: http - port: 80 - protocol: TCP - targetPort: 80 - selector: - app: nginx \ No newline at end of file -- GitLab