Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #!/bin/bash | |
| # Derived from https://www.reddit.com/r/kubernetes/comments/g3z5sp/microk8s_with_certmanager_and_letsecncrypt/fxcmq5k?utm_source=share&utm_medium=web2x&context=3 | |
| # Setup cert-manager | |
| kubectl create namespace cert-manager | |
| helm repo add jetstack https://charts.jetstack.io | |
| helm repo update | |
| helm install cert-manager jetstack/cert-manager \ | |
| --namespace cert-manager --version v1.1.0 \ | |
| --set installCRDs=true \ |
| image: alpine:latest | |
| variables: | |
| REVIEW_DISABLED: "true" | |
| SAST_DISABLED: "true" | |
| DAST_DISABLED: "true" | |
| CONTAINER_SCANNING_DISABLED: "true" | |
| CODE_QUALITY_DISABLED: "true" | |
| PERFORMANCE_DISABLED: "true" | |
| POSTGRES_ENABLED: "false" |
| apiVersion: v1 | |
| kind: Secret | |
| metadata: | |
| name: gitlab-runner-secret | |
| namespace: gitlab-managed-apps | |
| type: Opaque | |
| data: | |
| runner-registration-token: 'token here' #base64 encoded registration token | |
| runner-token: '' | |
| --- |
| ## GitLab Runner Image | |
| ## | |
| ## By default it's using gitlab/gitlab-runner:alpine-v{VERSION} | |
| ## where {VERSION} is taken from Chart.yaml from appVersion field | |
| ## | |
| ## ref: https://hub.docker.com/r/gitlab/gitlab-runner/tags/ | |
| ## | |
| ## Note: If you change the image to the ubuntu release | |
| ## don't forget to change the securityContext; | |
| ## these images run on different user IDs. |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: gitlab | |
| namespace: kube-system | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: gitlab-admin |
| #!/bin/bash -e | |
| # Custom Variables | |
| NODE_ARCH=$([ "$CI_RUNNER_EXECUTABLE_ARCH" == "linux/arm64" ] && echo "arm64v8" || echo "amd64") | |
| echo "NODE_ARCH: $NODE_ARCH" | |
| if [[ -z "$CI_COMMIT_TAG" ]]; then | |
| export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG} | |
| export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_SHA} | |
| else |
| build: | |
| stage: build | |
| image: docker:19.03.13 | |
| services: | |
| - docker:19.03.13-dind | |
| script: | |
| - | | |
| apk add bash ruby wget | |
| wget https://github.com/buildpacks/pack/releases/download/v0.12.0/pack-v0.12.0-linux.tgz && \ | |
| tar xvf pack-v0.12.0-linux.tgz && \ |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/