New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's enable dependency tests on activiti-cloud-application-chart #2264

Closed
igdianov opened this Issue Dec 13, 2018 · 3 comments

Comments

3 participants
@igdianov
Copy link
Member

igdianov commented Dec 13, 2018

from upstream example app repos, so, that we can validate the same activiti-cloud-dependencies version between all microservices in Jenkins CI/CD for PRs and release pipelines to push a single application chart version with valid microservice into activiti-cloud-acceptance-test-scenarios repo.

To do that, we will use Maven in every microservice repo pipeline, i.e. activiti-cloud-query, to resolve ${activiti-cloud-dependencies.version} from pom.xml like so,

$(eval ACTIVITI_CLOUD_DEPENDENCIES_VERSION=$(shell mvn help:evaluate -Dexpression=activiti-cloud-dependencies.version -q -DforceStdout))

Then, it will use updatebot push-version to update requrements.yaml in Helm chart and Makefile variables to be able to aggregate and validate the same version for the group, like so,

@echo Doing updatebot push-version.....
updatebot push-version --kind helm $(RELEASE_ARTIFACT) $(RELEASE_VERSION)
updatebot push-version --kind make QUERY_ACTIVITI_CLOUD_DEPENDENCIES_VERSION $(ACTIVITI_CLOUD_DEPENDENCIES_VERSION)

The Makefile in activiti-cloud-application-chart root directory will aggregate ACTIVITI_CLOUD_DEPENDENCIES_VERSION for each microservice. like so,

ACTIVITI_CLOUD_DEPENDENCIES_ARTIFACT_ID := activiti-cloud-dependencies
QUERY_ACTIVITI_CLOUD_DEPENDENCIES_VERSION := 7.0.0
AUDIT_ACTIVITI_CLOUD_DEPENDENCIES_VERSION := 7.0.0
CONNECTOR_ACTIVITI_CLOUD_DEPENDENCIES_VERSION := 7.0.0
RB_ACTIVITI_CLOUD_DEPENDENCIES_VERSION := 7.0.0

DEPENDENCIES_VERSIONS := ${QUERY_ACTIVITI_CLOUD_DEPENDENCIES_VERSION} ${AUDIT_ACTIVITI_CLOUD_DEPENDENCIES_VERSION} ${CONNECTOR_ACTIVITI_CLOUD_DEPENDENCIES_VERSION} ${RB_ACTIVITI_CLOUD_DEPENDENCIES_VERSION}

# Validate same ACTIVITI_CLOUD_DEPENDENCIES_VERSION for all microservices.
validate:
	@echo "Validating dependencies to match ${ACTIVITI_CLOUD_DEPENDENCIES_ARTIFACT_ID} same versions..." 
	$(eval RESULT := $(subst ${QUERY_ACTIVITI_CLOUD_DEPENDENCIES_VERSION},,${DEPENDENCIES_VERSIONS}))
	$(if $(strip $(RESULT)), \
		@echo "Found entries in ${DEPENDENCIES_VERSIONS} with different versions"; exit 1, \
		@echo "All versions match to ${QUERY_ACTIVITI_CLOUD_DEPENDENCIES_VERSION}" \
	)

The pipeline in Jenkinsfile will use make validate step to enforce same activiti-cloud-dependencies version before building and releasing chart:


      stage('CI Build and push snapshot') {
        when {
          branch 'PR-*'
        }
        environment {
          PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
          PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase()
          HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase()
        }
        steps {
          container('maven') {
       
           // let's validate same versions dependencies
            sh 'make validate'

            dir("./charts/$APP_NAME") {
	            sh 'make build'
            }
          }
        }
      }

@almerico

This comment has been minimized.

Copy link
Member

almerico commented Dec 13, 2018

updated cloud audit, example connector, runtime bundle also I see an issue with updatebot --config ../../.updatebot.yml doesn't work and .updatebot.yml doesn't located in charts repo

@almerico

This comment has been minimized.

Copy link
Member

almerico commented Dec 13, 2018

looks like simple cd ../../ && updatebot ... is working

@salaboy salaboy added this to Open in Activiti 7.x via automation Dec 13, 2018

@salaboy salaboy added this to the Beta5 milestone Dec 13, 2018

@almerico

This comment has been minimized.

Copy link
Member

almerico commented Dec 14, 2018

done

@almerico almerico closed this Dec 14, 2018

Activiti 7.x automation moved this from Open to Closed Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment