initial config based of jenkins-x/jenkins-x-boot-config with ref v1.0.82

This commit is contained in:
jenkins-x-bot
2020-04-15 12:37:41 +02:00
commit 9434645ce5
106 changed files with 2971 additions and 0 deletions

89
bdd/bdd.sh Executable file
View File

@@ -0,0 +1,89 @@
#!/usr/bin/env bash
set -euo pipefail
set -x
if [ $# -ne 2 ]; then
echo "Please provide the source and destination paths for configuration"
exit -1
fi
SRC_PATH=$1
DST_PATH=$2
export GH_USERNAME="jenkins-x-bot-test"
export GH_EMAIL="jenkins-x@googlegroups.com"
export GH_OWNER="jenkins-x-bot-test"
# fix broken `BUILD_NUMBER` env var
export BUILD_NUMBER="$BUILD_ID"
JX_HOME="/tmp/jxhome"
KUBECONFIG="/tmp/jxhome/config"
# lets avoid the git/credentials causing confusion during the test
export XDG_CONFIG_HOME=$JX_HOME
mkdir -p $JX_HOME/git
jx --version
# replace the credentials file with a single user entry
echo "https://$GH_USERNAME:$GH_ACCESS_TOKEN@github.com" > $JX_HOME/git/credentials
# setup GCP service account
gcloud auth activate-service-account --key-file $GKE_SA
# setup git
git config --global --add user.name JenkinsXBot
git config --global --add user.email jenkins-x@googlegroups.com
echo "running the BDD tests with JX_HOME = $JX_HOME"
# setup jx boot parameters
export JX_VALUE_ADMINUSER_PASSWORD="$JENKINS_PASSWORD"
export JX_VALUE_PIPELINEUSER_USERNAME="$GH_USERNAME"
export JX_VALUE_PIPELINEUSER_EMAIL="$GH_EMAIL"
export JX_VALUE_PIPELINEUSER_TOKEN="$GH_ACCESS_TOKEN"
export JX_VALUE_PROW_HMACTOKEN="$GH_ACCESS_TOKEN"
# TODO temporary hack until the batch mode in jx is fixed...
export JX_BATCH_MODE="true"
# prepare the BDD configuration
mkdir -p $DST_PATH
cp -r `ls -A | grep -v "${DST_PATH}"` $DST_PATH
cp $SRC_PATH/jx-requirements.yml $DST_PATH
cp $SRC_PATH/parameters.yaml $DST_PATH/env
cd $DST_PATH
# Rotate the domain to avoid cert-manager API rate limit
if [[ "${DOMAIN_ROTATION}" == "true" ]]; then
SHARD=$(date +"%l" | xargs)
DOMAIN="${DOMAIN_PREFIX}${SHARD}${DOMAIN_SUFFIX}"
if [[ -z "${DOMAIN}" ]]; then
echo "Domain rotation enabled. Please set DOMAIN_PREFIX and DOMAIN_SUFFIX environment variables"
exit -1
fi
echo "Using domain: ${DOMAIN}"
sed -i "/^ *ingress:/,/^ *[^:]*:/s/domain: .*/domain: ${DOMAIN}/" jx-requirements.yml
fi
echo "Using jx-requirements.yml"
cat jx-requirements.yml
# TODO hack until we fix boot to do this too!
helm init --client-only
helm repo add jenkins-x https://storage.googleapis.com/chartmuseum.jenkins-x.io
jx step bdd \
--use-revision \
--versions-repo https://github.com/jenkins-x/jenkins-x-versions.git \
--config $SRC_PATH/cluster.yaml \
--gopath /tmp \
--git-provider=github \
--git-username $GH_USERNAME \
--git-owner $GH_OWNER \
--git-api-token $GH_ACCESS_TOKEN \
--default-admin-password $JENKINS_PASSWORD \
--no-delete-app \
--no-delete-repo \
--tests install \
--tests test-create-spring

1
bdd/boot-local/README.md Normal file
View File

@@ -0,0 +1 @@
## BDD test using JX Boot with Local secrets

View File

@@ -0,0 +1,18 @@
clusters:
- name: boot-local
args:
- create
- cluster
- gke
- --project-id=jenkins-x-bdd3
- -m=n1-standard-2
- --min-num-nodes=3
- --max-num-nodes=5
- -z=europe-west1-c
- --skip-login
- --skip-installation
commands:
- command: jx
args:
- boot
- -b

View File

@@ -0,0 +1,39 @@
cluster:
clusterName: bdd-boot-local
environmentGitOwner: jenkins-x-bot-test
project: jenkins-x-bdd3
provider: gke
zone: europe-west1-c
environments:
- key: dev
owner: ""
repository: ""
- key: staging
owner: ""
repository: ""
- key: production
owner: ""
repository: ""
ingress:
domain: ""
externalDNS: false
tls:
email: ""
enabled: false
production: false
kaniko: true
secretStorage: local
storage:
logs:
enabled: false
url: ""
reports:
enabled: false
url: ""
repository:
enabled: false
url: ""
versionStream:
ref: "master"
url: https://github.com/jenkins-x/jenkins-x-versions.git
webhook: prow

View File

@@ -0,0 +1,10 @@
adminUser:
username: admin
enableDocker: false
gitProvider: github
gpg: {}
pipelineUser:
github:
host: github.com
username: jenkins-x-bot-test
email: jenkins-x@googlegroups.com

1
bdd/boot-vault/README.md Normal file
View File

@@ -0,0 +1 @@
## BDD test using JX Boot with Vault secrets

View File

@@ -0,0 +1,18 @@
clusters:
- name: boot-vault
args:
- create
- cluster
- gke
- --project-id=jenkins-x-bdd3
- -m=n1-standard-2
- --min-num-nodes=3
- --max-num-nodes=5
- -z=europe-west1-c
- --skip-login
- --skip-installation
commands:
- command: jx
args:
- boot
- -b

View File

@@ -0,0 +1,42 @@
cluster:
clusterName: bdd-boot-vault
environmentGitOwner: jenkins-x-bot-test
project: jenkins-x-bdd3
provider: gke
zone: europe-west1-c
environments:
- key: dev
owner: ""
repository: ""
- key: staging
owner: ""
repository: ""
- key: production
owner: ""
repository: ""
ingress:
domain: ""
externalDNS: false
tls:
email: ""
enabled: false
production: false
kaniko: true
secretStorage: vault
repository: nexus
storage:
logs:
enabled: false
url: ""
reports:
enabled: false
url: ""
repository:
enabled: false
url: ""
versionStream:
ref: "master"
url: https://github.com/jenkins-x/jenkins-x-versions.git
vault:
disableURLDiscovery: true
webhook: prow

View File

@@ -0,0 +1,10 @@
adminUser:
username: admin
enableDocker: false
gitProvider: github
gpg: {}
pipelineUser:
github:
host: github.com
username: jenkins-x-bot-test
email: jenkins-x@googlegroups.com