Skip to content

Commit

Permalink
ref(14): Change project name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanjerome committed Sep 10, 2023
1 parent 6975686 commit 2c574e4
Show file tree
Hide file tree
Showing 32 changed files with 88 additions and 74 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library identifier: "wild@14-redesign-gitlab-ci-platform-for-testing", retriever: modernSCM(
library identifier: "wizard@14-redesign-gitlab-ci-platform-for-testing", retriever: modernSCM(
[$class: 'GitSCMSource',
remote: 'https://github.com/scalastic/wild.git',
credentialsId: 'wild-github-token']) _
remote: 'https://github.com/scalastic/wizard.git',
credentialsId: 'wizard-github-token']) _

wildPipeline()
4 changes: 2 additions & 2 deletions config/k8s/containers-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ metadata:
pipeline: jenkinsfile
spec:
containers:
- name: 'wild'
image: scalastic/wild
- name: 'wizard'
image: scalastic/wizard
command:
- cat
tty: true
Expand Down
2 changes: 1 addition & 1 deletion config/workflow-default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "wild-test-001",
"id": "wizard-test-001",
"name": "Sample Workflow for Testing",
"version": "1.0.0",
"actions": [
Expand Down
4 changes: 2 additions & 2 deletions contrib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set -euo pipefail
export WILD_CWD="${PWD}"

mkdir -p ./bin
rm -f ./bin/wild
./src/lib/ext/inline.sh --in-file ./src/wild.sh --out-file ./bin/wild
rm -f ./bin/wizard
./src/lib/ext/inline.sh --in-file ./src/wizard.sh --out-file ./bin/wizard
grep -Ev "^[[:blank:]]*#[^!]|^[[:blank:]]*$" ./bin/wild > ./bin/wild.tmp
mv ./bin/wild.tmp ./bin/wild
chmod u+x ./bin/wild
Expand Down
4 changes: 2 additions & 2 deletions contrib/make_package_json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export LANG=C

version() {
./bin/wild --version
./bin/wizard --version
}

files() {
Expand All @@ -21,7 +21,7 @@ cat<<JSON
"version": "$(version)",
"description": "Wild fills the missing link of the DevOps approach and its shift-left principal herein. With Wild the shifts are so close to the developer that they no longer exist.",
"homepage": "https://scalastic.io/en/",
"scripts": ["wild"],
"scripts": ["wizard"],
"license": "MIT",
"files": $(files),
"install": "make install"
Expand Down
2 changes: 1 addition & 1 deletion docker/basic/alpine/Dockerfile.02
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM bash:latest

LABEL Author="wild by scalastic"
LABEL Author="wizard by scalastic"

RUN apk update \
&& apk add --no-cache curl jq \
Expand Down
2 changes: 1 addition & 1 deletion docker/basic/alpine/Dockerfile.03
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:latest

LABEL Author="wild by scalastic"
LABEL Author="wizard by scalastic"

# make sure the package repository is up to date
RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion docker/basic/scratch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:latest as downloader

ENV JQ_VERSION jq-1.6/jq-linux64
LABEL Author="wild by scalastic"
LABEL Author="wizard by scalastic"

RUN apk add --no-cache curl ca-certificates

Expand Down
4 changes: 2 additions & 2 deletions docker/build-all-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -euo pipefail

docker build -t scalastic/wild:latest "./docker/basic/ubi/"
docker build -t scalastic/wizard:latest "./docker/basic/ubi/"

docker push scalastic/wild:latest
docker push scalastic/wizard:latest
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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/common.sh](../../../src/lib/common.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
6 changes: 5 additions & 1 deletion docs/src/lib/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Logger functions for bash scripts
log__log "$LOG_LEVEL_DEBUG" "This is a debug message" "$LOG_LEVEL_DEBUG_COLOR" "$LOG_COLOR_OFF"
```

* Output

* `stdout`: Redirects and writes the message to stderr and file log/stdout.log

### `log__banner 🚫 (private)`

* Log a banner message.
Expand Down Expand Up @@ -211,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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/log.sh](../../../src/lib/log.sh) on 10.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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/platform.sh](../../../src/lib/platform.sh) on 10.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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/project.sh](../../../src/lib/project.sh) on 10.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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/tooling.sh](../../../src/lib/tooling.sh) on 10.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 08.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
*Generated from [src/lib/workflow.sh](../../../src/lib/workflow.sh) on 10.09.2023 (writen with ✨ by [gendoc](../../../src/lib/ext/gendoc.sh))*
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "Wild",
"version": "0.0.1",
"version": "",
"description": "Wild fills the missing link of the DevOps approach and its shift-left principal herein. With Wild the shifts are so close to the developer that they no longer exist.",
"homepage": "https://scalastic.io/en/",
"scripts": ["wild"],
"scripts": ["wizard"],
"license": "MIT",
"files": [
"src/.DS_Store",
"src/action/build/build.sh",
"src/lib/common.sh",
"src/lib/log.sh",
Expand Down
12 changes: 0 additions & 12 deletions resources/config/banner/wild.txt

This file was deleted.

12 changes: 12 additions & 0 deletions resources/config/banner/wizard.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
___ ___ ___ ___ _____
/__/\ ___ / /\ / /\ / /\ / /::\
_\_ \:\ / /\ / /::| / /::\ / /::\ / /:/\:\
/__/\ \:\ / /:/ / /:/:| / /:/\:\ / /:/\:\ / /:/ \:\
_\_ \:\ \:\ /__/::\ / /:/|:|__ / /:/~/::\ / /:/~/:/ /__/:/ \__\:|
/__/\ \:\ \:\ \__\/\:\__ /__/:/ |:| /\ /__/:/ /:/\:\ /__/:/ /:/___ \ \:\ / /:/
\ \:\ \:\/:/ \ \:\/\ \__\/ |:|/:/ \ \:\/:/__\/ \ \:\/:::::/ \ \:\ /:/
\ \:\ \::/ \__\::/ | |:/:/ \ \::/ \ \::/~~~~ \ \:\/:/
\ \:\/:/ /__/:/ | |::/ \ \:\ \ \:\ \ \::/
\ \::/ \__\/ | |:/ \ \:\ \ \:\ \__\/
\__\/ |__|/ \__\/ \__\/
Wizard by Scalastic 💫 - isometric3
2 changes: 1 addition & 1 deletion spec/lib/tooling_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Describe "Test that tooling.sh"
When call tooling_set_jq

The status should be success
The variable JQ should eq "FAKE_DOCKER run -i scalastic/wild:latest"
The variable JQ should eq "FAKE_DOCKER run -i scalastic/wizard:latest"
The variable IS_DOCKERIZED_JQ should eq "true"
The stderr should be present # for logs redirected into stderr
End
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/workflow_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Describe "Test that workflow.sh"
When run workflow_get_workflows_containers_names "${TEST_WORKFLOW_DEFINITION_FILENAME}"

The status should be success
The output should eq "wild maven"
The output should eq "wizard maven"
The stderr should be present # for logs redirected into stderr
End

Expand All @@ -117,7 +117,7 @@ Describe "Test that workflow.sh"
When run workflow_load_action_definition "action1" "${TEST_WORKFLOW_DEFINITION_FILENAME}"

The status should be success
The output should eq "{\"id\":\"action1\",\"name\":\"Action 1\",\"container\":\"wild\",\"script\":\"test/action/bash-version.sh\"}"
The output should eq "{\"id\":\"action1\",\"name\":\"Action 1\",\"container\":\"wizard\",\"script\":\"test/action/bash-version.sh\"}"
The stderr should be present # for logs redirected into stderr
End

Expand Down
2 changes: 1 addition & 1 deletion src/lib/log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ log__prerequisite() {
#@arg message: message to log
#@arg color: color to use for the message
#@arg color_off: color to use to turn off the color
#@sdtout Redirects and writes the message to stderr and file log/stdout.log
#@stdout Redirects and writes the message to stderr and file log/stdout.log
log__log() {
local level=$1
local message=$2
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tooling_set_jq() {

elif tooling__check_command docker; then
# shellcheck disable=SC2155
export JQ="$(tooling__get_command docker) run -i scalastic/wild:latest"
export JQ="$(tooling__get_command docker) run -i scalastic/wizard:latest"
export IS_DOCKERIZED_JQ=true
log_info "Using dockerized jq command $JQ"

Expand Down
6 changes: 3 additions & 3 deletions src/wild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION="0.0.1"
source "${WILD_CWD}/src/lib/ext/getoptions.sh"

parser_definition() {
setup REST help:usage -- "Usage: wild.sh [options]... [arguments]..." ''
setup REST help:usage -- "Usage: wizard.sh [options]... [arguments]..." ''
msg -- 'Options:'
flag PARAM_DOCKER -d -- "executes on docker images"
disp :usage -h --help
Expand All @@ -29,8 +29,8 @@ if [ -n "${PARAM_DOCKER}" ] && [ "${PARAM_DOCKER}" -eq "1" ]; then
# Start containers
#docker container run \
# --mount type=bind,source="$WILD_CWD/config",target="/app/config"\
# -td --name basic-wild \
# scalastic/wild:latest \
# -td --name basic-wizard \
# scalastic/wizard:latest \
# /bin/bash
fi

Expand Down
4 changes: 2 additions & 2 deletions test/config/test-workflow-default.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"id": "wild-test-001",
"id": "wizard-test-001",
"name": "Sample Workflow for Testing",
"version": "1.0.0",
"actions": [
{
"id": "action1",
"name": "Action 1",
"container": "wild",
"container": "wizard",
"script": "test/action/bash-version.sh"
},
{
Expand Down
2 changes: 1 addition & 1 deletion test/config/workflow-action.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "wild-test-001",
"id": "wizard-test-001",
"name": "Sample Workflow for Testing",
"version": "1.0.0",
"actions": [
Expand Down
4 changes: 2 additions & 2 deletions test/config/workflow-default.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"id": "wild-test-001",
"id": "wizard-test-001",
"name": "Sample Workflow for Testing",
"version": "1.0.0",
"actions": [
{
"id": "action1",
"name": "Action 1",
"container": "wild",
"container": "wizard",
"script": "test/action/bash-version.sh"
},
{
Expand Down
29 changes: 19 additions & 10 deletions test/gitlab/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,31 @@ GITLAB_INSTALLATION_CONFIG="${GITLAB_PATH}/config"

export GITLAB_HOME="${GITLAB_VOLUME_HOME}"

#docker build \
# -t gitlab: \
# "${GITLAB_INSTALLATION_CONFIG}"

docker run \
--rm \
docker run --detach \
--hostname gitlab.scalastic.local \
--add-host=gitlab.scalastic.local:192.168.0.100 \
--publish 127.0.0.1:4443:443 --publish 127.0.0.1:4080:80 --publish 127.0.0.1:4022:22 \
--name gitlab \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--restart always \
--volume "${GITLAB_VOLUME_HOME}/config:/etc/gitlab" \
--volume "${GITLAB_VOLUME_HOME}/logs:/var/log/gitlab" \
--volume "${GITLAB_VOLUME_HOME}/data:/var/opt/gitlab" \
--env GITLAB_ROOT_PASSWORD=p@ssw0rd \
--shm-size 256m \
gitlab/gitlab-ce:latest

# docker logs -f gitlab
#docker run \
# --rm \
# --name gitlab \
# --hostname gitlab.example.com \
# --publish 443:443 --publish 80:80 --publish 22:22 \
# --volume "${GITLAB_VOLUME_HOME}/config:/etc/gitlab" \
# --volume "${GITLAB_VOLUME_HOME}/logs:/var/log/gitlab" \
# --volume "${GITLAB_VOLUME_HOME}/data:/var/opt/gitlab" \
# --env GITLAB_ROOT_PASSWORD=p@ssw0rd \
# --shm-size 256m \
# gitlab/gitlab-ce:latest

docker logs -f gitlab

# docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
2 changes: 1 addition & 1 deletion test/jenkins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Installation

1. Start by copying the contents of `.env.template` into a new file named `.env`. In this newly created file, provide your GitHub Token. This token is necessary to access the Git repository where the "wild" application is installed.
1. Start by copying the contents of `.env.template` into a new file named `.env`. In this newly created file, provide your GitHub Token. This token is necessary to access the Git repository where the "wizard" application is installed.

2. To set up a fresh Jenkins instance, execute the following command:
```bash
Expand Down
8 changes: 4 additions & 4 deletions test/jenkins/config/casc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ credentials:
scope: GLOBAL
secret: ${JENKINS_KUBERNETES_TOKEN}
- usernamePassword:
description: wild-github-token
description: wizard-github-token
scope: GLOBAL
id: wild-github-token
id: wizard-github-token
username: oauth2
password: ${WILD_GITHUB_TOKEN}
jenkins:
Expand Down Expand Up @@ -62,8 +62,8 @@ jobs:
scm {
git {
remote {
url('https://github.com/scalastic/wild.git')
credentials('wild-github-token')
url('https://github.com/scalastic/wizard.git')
credentials('wizard-github-token')
}
branch('*/14-redesign-gitlab-ci-platform-for-testing')
}
Expand Down
4 changes: 2 additions & 2 deletions test/jenkins/config/exported-jenkins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ credentials:
scope: GLOBAL
secret: "{AQAAABAAAAOwXX63gVCVOwTvhbYt1LPl8FQ5DprGNEsgYmLkMRLlZ6SUzz5Glo8C86jBRDcQqnWBTAOCZkg3s09XUHAeCFvKBP+n4yymIBNXwD1kg5IM+tsM1Me+cxGWfwdA3mHC81TQX0CAskbKL0LUC4G9SYm93G90tHEX7QpxczFWbGFVrdWdTDn1xuEMBBOTeObSx60mKY8g0HOqzy06ct2V/RmWIaO/j00ByztNZBdhoZe87+tFJ0Fox8yqKITZF7aQkbvpXIM0xH2qtWR2Zw5BAIFOSAXjCOO5YJ+v7hyFEFpYgMacFSIrJLOel5kqHY9Tupb5/0znKZit7uVI5JOzNGGJzqVVkt4HQk0WnNd/Fss8vyi4surN53eqbhudvu2KXIDK3IW3JajVGYGGZNLDnQcvY37pLLec1uZrtiQKYeK3YPcP/GTDEXkKYR4iYv9l0xiwBd4oZlXsU/S1aLSRcOaNwnh7t03b2USXIS6bfcPIGNGPEqIq9pkNQ6FIdhWKXsJsC3R0aTk0F0bJF7q/MmYAqux3HUovv5eeD7mwLs9qhO0t32aphQfO/0IQCsFroIm2I4S35tDvqGuOmCDXfxYA823zLFq01y408TRi9BRQT+c/eKVGNbdE/NqxJaQvZng1nwQMBFhgzePmtuZbwtH9rxYBNsda6/X1v9tl6mcDBCivxjfMcR1/jSA0l7wWAnBe8Ud+KTiOogyHS50TMmrZdneqs2sm3z21iwb0hmGykMPjJKO7B7OPAt1SyGWSo5Ao4MXKYweR+l1wXWCD27d/1g2+cmcohM06Xq7IJuAIk4UjsygEsR9qG6YGcpI61QhnXEGdP9Uaemn1Atz2jixg+oTlboWT9O2TLBpfCqtqVskkTY9ntX+Cq/M+Xj8GoMCQy2dc+2kqbD9CW3tG3OYTIz0QETt9Ka161Xfk3R4XuSV9T3vK8hRvBc4e0vJltwLx9agSuFY/Wf63QN4ib9n9RGAjslrqC+7QSJ3eJ1DjhmkgN6EuHT2edtfjPOHiuvPnsIVi0xQ+V9aFNobQmrsumaeTOwtthSuCknaQ4Rd2lYM2H/UhE7jfvQpSX1EN2ngRzVuWLmrp7JqnUL/B2636eYDACl8uNtt5kbvOAYvd+wCqeG2Nk3BcZsPiygEkSycBX/I9pW2s2PdOm+6NDjbwptrMUvEMvDJRm0zuzOo8fxdwbqhMf3m+Kh0p5s5rM9lsISjOy/1gEwr5yQjJFEHmZk1AseyTXnYyL6SqS9p1RDCzzgcm2gylbU4NWJm5gAIx}"
- usernamePassword:
description: "wild-github-token"
id: "wild-github-token"
description: "wizard-github-token"
id: "wizard-github-token"
password: "{AQAAABAAAABgMBbHt+2lG9HjgZyFFlI6kIhkBgUPO2z+zXWwddZJTSa34qiQYuxYwaNzJhpZaGxnnhViqzYWKfVAn5DJRXhSN7Rgo2zZC+0flYKZq3Adf68/HHcdoqVnHHaYZOMebuEwPKVYn0UR7FVgZfIVYFEgsA==}"
scope: GLOBAL
username: "oauth2"
Expand Down
2 changes: 1 addition & 1 deletion vars/containerConfig.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

def getContainerConfig(appConfig, selectedContainerNames = null) {
//def appConfig = readYaml(file: "./wild-workdir/config/containers-config.yaml")
//def appConfig = readYaml(file: "./wizard-workdir/config/containers-config.yaml")

if (selectedContainerNames) {
appConfig.container = appConfig.container.findAll { container ->
Expand Down
Loading

0 comments on commit 2c574e4

Please sign in to comment.