diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7c6d07c4074f3783d661c1888c89b1671cc30df..596f960f36cee571a21904195a1d4687d4390c49 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,21 +8,21 @@ 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 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 + - hugo + artifacts: + paths: + - public only: - master @@ -31,9 +31,11 @@ deploy: tags: - deploy image: - name: lachlanevenson/k8s-kubectl + name: minio/mc:RELEASE.2020-01-13T22-49-03Z entrypoint: [""] script: - - cat $CI_PROJECT_DIR/k8s.yml | sed "s/latest/$CI_COMMIT_SHORT_SHA/" | kubectl apply -f - + - 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 only: - - master \ No newline at end of file + - master diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ac9ac025a9bba6e63e287d50874ba256d6f9c3af..0000000000000000000000000000000000000000 --- 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 32957e760ecd2f9bab118cedf64e9fc20e9bf3ee..0000000000000000000000000000000000000000 --- 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