Skip to content

Commit

Permalink
feat: restart work on the topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanjerome committed May 1, 2024
1 parent 2cd65ef commit f69608f
Show file tree
Hide file tree
Showing 37 changed files with 1,727 additions and 3,444 deletions.
3 changes: 3 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# shellcheck disable=SC2148 disable=SC2034
LOG_LEVEL=0
LOG_DIR=tmp
SHELL_DIR=shell
CODECOV_TOKEN="<YOUR_CODECOV_TOKEN>"
GITHUB_TOKEN="<YOUR_GITHUB_TOKEN>"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
/test/gitlab/home/
/test/jenkins/home/
/test/jenkins/config/secrets.properties
/infra/jenkins/config/secrets.properties
/test/jenkins/config/secrets.yaml
/test/jenkins/config/exported-jenkins.yaml
/tmp/
.DS_Store
Expand Down
7 changes: 7 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ~/.shellcheckrc

external-sources=true
source-path="./shell"

# Suggest ${VAR} in place of $VAR
enable=require-variable-braces
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Embrace the enchantment of Wizard to fill the void in the DevOps approach and em

Currently, `Wizard` is tailored for seamless use on the following platforms:

- Your local environment (Unix-based systems)
- Jenkins
- GitLab-CI
- [ ] Your local environment (Unix-based systems)
- [x] Jenkins
- [ ] GitLab-CI (_WIP_)

Please note that our magical integration framework may expand its compatibility with more platforms in the future. Stay tuned for updates!

Expand All @@ -59,7 +59,7 @@ In order to utilize `Wizard` on your local machine, the following prerequisites

## Installation

### Install with Homebrew
### Install with Homebrew (_WIP_)

```bash
brew tap scalastic/tap
Expand All @@ -76,7 +76,7 @@ git clone

## Wizard CLI

### Usage
### Usage (_WIP_)

```bash
wizard [options] [command]
Expand Down Expand Up @@ -148,7 +148,7 @@ wizard [options] [command]

- [Semantic Versioning](https://semver.org/) - Semantic Versioning 2.0.0.

### Contributions
### Contributions (_WIP_)

All contributions are welcome!

Expand Down
2 changes: 1 addition & 1 deletion docs/src/lib/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
Common functions used in stage scripts

---------------------------------------
*Generated from [src/lib/common.sh](../../../src/lib/common.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/common.sh](../../../src/lib/common.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion docs/src/lib/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ log_banner "This is a banner message"
* `stdout`: Writes the banner message to stdout

---------------------------------------
*Generated from [src/lib/log.sh](../../../src/lib/log.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/log.sh](../../../src/lib/log.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion docs/src/lib/platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ platform_get_platform
* `stdout`: The platform where the script is running

---------------------------------------
*Generated from [src/lib/platform.sh](../../../src/lib/platform.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/platform.sh](../../../src/lib/platform.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion docs/src/lib/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ project__architecture_print_layers
* `stdout`: The project architecture layers as a formatted string

---------------------------------------
*Generated from [src/lib/project.sh](../../../src/lib/project.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/project.sh](../../../src/lib/project.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion docs/src/lib/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ tooling_set_jq
### `tooling_get_ip ✅ (public)`

---------------------------------------
*Generated from [src/lib/tooling.sh](../../../src/lib/tooling.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/tooling.sh](../../../src/lib/tooling.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion docs/src/lib/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ workflow_load_action_definition "action1" "config/workflow-default.json"
* `return`: Action definition as an array

---------------------------------------
*Generated from [src/lib/workflow.sh](../../../src/lib/workflow.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/workflow.sh](../../../src/lib/workflow.sh) on 18.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
2 changes: 1 addition & 1 deletion helm/create-ca-tls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

set -euo pipefail

COMPANY_NAME=${1:-scalastic}
COMPANY_NAME=${1:-macompanie}
CERT_CA_PATH="${CERT_CA_PATH:=openssl/ca}"

echo "Creating CA certificate..."
Expand Down
81 changes: 81 additions & 0 deletions infra/gitlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# GitLab-CI Installation

## Prerequisites

- A Kubernetes cluster
- The following tools installed on your local machine:
- [Helm](https://helm.sh/docs/intro/install/)
- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)

Both Helm and Kubectl are available in the Homebrew package manager. To install them, run the following commands:

- Install Homebrew:

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

- Install Helm and Kubectl:

```bash
brew install helm
brew install kubectl
```

## Configure Helm

```bash
helm repo add gitlab https://charts.gitlab.io
helm repo update
```

## Deploy GitLab-CI with Helm

```bash
helm install gitlab gitlab/gitlab --set global.edition=ce --set global.hosts.domain=scalastic.local --set certmanager.install=false
```

Get the Jenkins admin password:

```bash
kubectl get secret jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode; echo
```

## Configure Ingress to access Jenkins

- Install Nginx Ingress Controller:

```bash
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx
```

- Create a `jenkins-ingress.yaml` file:

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jenkins-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: jenkins.scalastic.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jenkins
port:
number: 8080
```
- Apply the configuration:
```bash
kubectl apply -f jenkins-ingress.yaml
```
4 changes: 4 additions & 0 deletions infra/gitlab/config/gitlab.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
external_url 'http://gitlab.scalastic.local'
registry_external_url 'https://gitlab.scalastic.local'
nginx['listen_port'] = 4000
nginx['listen_https'] = false
Loading

0 comments on commit f69608f

Please sign in to comment.