//Cloudogu EcoSystem Docs

Requirements to execute integration tests on local CES:

  • Local ecosystem with nexus and scm dogu
  • Terraform on host

Steps:

1. Start ecosystem with nexus and scm dogu

2. Execute terraform to create nexus repositories and clone the petclinic project. Change ecosystem.auto.tfvars with local admin credentials. Afterwards execute following commands:

cd integrationTests/initData/terraform
mkdir -p ~/.terraform.d/plugins/cloudogu.com/tf/scm/1.0/linux_amd64
cp .terraform/providers/cloudogu.com/tf/scm/1.0/linux_amd64/terraform-provider-scm_1.0_linux_amd64 ~/.terraform.d/plugins/cloudogu.com/tf/scm/1.0/linux_amd64
terraform init -input=false
terraform plan -input=false -var="fqdn=<fqdn>" -var="scm_username=<scm_username>" -var="scm_password=<scm_password>"
terraform apply -input=false -auto-approve -var="fqdn=<fqdn>" -var="scm_username=<scm_username>" -var="scm_password=<scm_password>"
Info:
  • scm_username username of ecosystem.cloudogu.com
  • scm_password password of ecosystem.cloudogu.com
  • TF_LOG=trace terraform can be used to debug terraform
  • It is not necessary to build the scm provider locally. .terraformrc points to the binary in the repo.

3. Create git-tags in the imported repository

git clone https://192.168.56.2/scm/repo/demo/spring-petclinic \
&& cd spring-petclinic \
&& git tag 1.0.0 && git tag 1.0.1 && git tag 1.1.0 \
&& git push --tags \
&& cd .. && rm -rf spring-petclinic

git clone https://192.168.56.2/scm/repo/demo/spring-petclinic-clone \
&& cd spring-petclinic-clone \
&& git tag 1.0.0 && git tag 1.0.1 && git tag 1.1.0 \
&& git push --tags \
&& cd .. && rm -rf spring-petclinic-clone

4. Build baseline-dogu

  • Configure registry like Here
  • Configure registry keys:

    etcdctl set /config/baseline/projects_json_url "https://192.168.56.2/nexus/repository/projects/projects.json"
    etcdctl set /config/baseline/baseline_repository_url "https://192.168.56.2/nexus/repository/baselines/"
    etcdctl set /config/baseline/groups/readers "baselineReaders"
    etcdctl set /config/baseline/groups/editors "baselineEditors"
    etcdctl set /config/baseline/groups/admins "baselineAdmins"

    Finally, restart the baseline dogu: docker restart baseline.

5. Execute curl command to create maven-artifacts in nexus

  • Template integrationTests/initData/http/projects/projects.json with local FQDN (192.168.56.2)

    cd integrationTests/initData/http
    FQDN=192.168.56.2 CES_USERNAME=<local username> CES_PASSWORD=<local password> ./initHttpData.sh

6. Start tests

cd integrationTests && yarn install && yarn cypress open

7. Cleanup Script (deletes artifacts from nexus, scm project stays with tags) Alternativ: delete baseline.json in nexus manually

cd integrationTests/initData/http
FQDN=192.168.56.2 CES_USERNAME=<local username> CES_PASSWORD=<local password> ./cleanup.sh