Giter Club home page Giter Club logo

ccd-case-migration-starter's Introduction

ccd-case-migration-starter

CCD Case Migration Starter provides a framework for data migrations within CCD , to assist with case migrations that are required when the case definition changes in a way that requires existing cases to be updated to match the new case definition.

The framework runs the following process :-

diagram

The source code is maintained as a template within GitHub and is typically either cloned by a service team to establish a migration capability , or branched within the repository.

CCD Case Migration Starter framework source code is located in HMCTS GitHub repository https://github.com/hmcts/ccd-case-migration-starter

It is built by Jenkins using HMCTS Jenkins job https://build.platform.hmcts.net/job/HMCTS_a_to_c/job/ccd-case-migration-starter/

Getting started

To utilise the CCD Case Migration Starter :-

  1. Clone the GitHub repository and create a branch for the migration task.

  2. Make the required source code changes for the migration task (see section below).

  3. Create a pull request.

  4. Request PlatOps to copy the JAR that was built using the pipeline from the repository to the bastion server for operation.

Required source code changes

As a minimum , the source code changes described below should be made.

Create a Java class which implements uk.gov.hmcts.reform.migration.service.DataMigrationService interface in similar way as shown below :-

package uk.gov.hmcts.reform.migration.service;

import org.springframework.stereotype.Component;
import uk.gov.hmcts.reform.ccd.client.model.CaseDetails;

import java.util.function.Predicate;

@Component
public class DataMigrationServiceImpl implements DataMigrationService {
    @Override
    public Predicate<CaseDetails> accepts() {
        return true; // Predicate that allows to narrow number of cases that gets migrated
    }

    @Override
    public void migrate(CaseDetails caseDetails) {
        // Case data migration logic goes here
    }
}

Ensure that the application properties below are configured as required in application.properties file :-

idam.api.url= # IDAM API URL used to authenticate system update user (pointing to localhost version of IDAM API by default)
idam.client.id= # IDAM OAuth2 client ID used to authenticate system update user
idam.client.secret= # IDAM OAuth2 client secret used to authenticate system update user
idam.client.redirect_uri= # IDAM OAuth2 redirect URL used to authenticate system update user

idam.s2s-auth.url= # S2S API URL used to authenticate service (pointing to localhost version of S2S API by default)
idam.s2s-auth.microservice= # S2S micro service name used to authenticate service
idam.s2s-auth.totp_secret= # S2S micro service secret used to authenticate service

core_case_data.api.url= # CCD data store API URL used to fetch / update case details (pointing to localhost version of CCD by default)

migration.idam.username= # IDAM username of a system update user that performs data migration
migration.idam.password= # IDAM password of a system update user that performs data migration
migration.jurisdiction= # CCD jurisdiction that data migration is run against
migration.casetype= # CCD case type that data migration is run against
migration.caseId= # optional CCD case ID in case only one case needs to be migrated

case-migration.elasticsearch.querySize= # Elasticsearch query size limit
case-migration.processing.limit= # Migration processing size limit

Unit tests

To run all unit tests please execute following command :-

    ./gradlew test

License

This project is licensed under the MIT License - see the LICENSE file for details.

ccd-case-migration-starter's People

Contributors

aktaskaan avatar chris-hodgson-hmcts avatar damiandunajski avatar danlysiak avatar dharmendrak avatar dinesh1patel avatar jamescollettcgi avatar kiran-yenigala-hmcts avatar marvincudjoe avatar mokainos avatar nathan-clark avatar rajaram-nagarajan avatar rebeccabaker avatar renovate[bot] avatar shahir-ali avatar tomaszpowroznik avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

ccd-case-migration-starter's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • Update actions/cache action to v4
  • Update actions/checkout action to v4
  • Update actions/setup-java action to v4
  • Update dependency com.github.hmcts:core-case-data-store-client to v5
  • Update dependency com.github.tomakehurst:wiremock to v3
  • Update dependency com.google.guava:guava to v33
  • Update dependency io.rest-assured:rest-assured to v5
  • Update dependency org.mockito:mockito-junit-jupiter to v5
  • Update dependency org.springframework.cloud:spring-cloud-dependencies to v2023
  • Update hmctspublic.azurecr.io/base/java Docker tag to v21
  • Update io.rest-assured:4.5.1 to v5 (major) (io.rest-assured:xml-path, io.rest-assured:json-path)
  • Update plugin org.sonarqube to v5
  • Update spring security to v6 (major) (org.springframework.security:spring-security-config, org.springframework.security:spring-security-oauth2-core, org.springframework.security:spring-security-oauth2-jose, org.springframework.security:spring-security-oauth2-client, org.springframework.security:spring-security-oauth2-resource-server)
  • Update stefanzweifel/git-auto-commit-action action to v5
  • Update tibdex/github-app-token action to v2
  • ๐Ÿ” Create all pending approval PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 17-distroless
github-actions
.github/workflows/dependency-check.yml
  • tibdex/github-app-token v1
  • actions/checkout v3
  • actions/cache v3
  • actions/setup-java v3
  • stefanzweifel/git-auto-commit-action v4
gradle
settings.gradle
build.gradle
  • io.freefair.lombok 6.6.3
  • io.spring.dependency-management 1.1.0
  • org.springframework.boot 2.7.12
  • com.github.kt3k.coveralls 2.12.2
  • com.github.ben-manes.versions 0.46.0
  • org.sonarqube 3.5.0.2730
  • uk.gov.hmcts.java 0.12.43
  • checkstyle 9.3
  • com.github.hmcts:idam-java-client 1.5.5
  • com.github.hmcts:service-auth-provider-java-client 3.1.4
  • com.github.hmcts:core-case-data-store-client 4.9.2
  • com.github.tomakehurst:wiremock 2.33.2
  • org.springdoc:springdoc-openapi-ui 1.7.0
  • com.github.hmcts.java-logging:logging 6.0.1
  • org.apache.logging.log4j:log4j-api 2.20.0
  • org.apache.logging.log4j:log4j-to-slf4j 2.20.0
  • io.rest-assured:rest-assured 4.5.1
  • org.junit.jupiter:junit-jupiter 5.9.3
  • org.junit.jupiter:junit-jupiter-api 5.9.3
  • org.junit.jupiter:junit-jupiter-engine 5.9.3
  • org.junit.vintage:junit-vintage-engine 5.9.3
  • org.mockito:mockito-junit-jupiter 3.12.4
  • org.powermock:powermock-api-mockito2 2.0.9
  • org.powermock:powermock-module-junit4 2.0.9
  • org.junit.platform:junit-platform-commons 1.9.3
  • org.projectlombok:lombok 1.18.28
  • com.github.hmcts:fortify-client 1.3.0
  • commons-fileupload:commons-fileupload 1.5
  • commons-io:commons-io 2.12.0
  • org.springframework.security:spring-security-oauth2-resource-server 5.8.10
  • org.springframework.security:spring-security-oauth2-client 5.8.10
  • org.springframework.security:spring-security-oauth2-jose 5.8.10
  • org.springframework.security:spring-security-oauth2-core 5.8.10
  • org.springframework.security:spring-security-config 5.8.10
  • org.springframework.cloud:spring-cloud-dependencies 2021.0.7
  • com.google.guava:guava 30.1.1-jre
  • commons-beanutils:commons-beanutils 1.9.4
  • io.rest-assured:json-path 4.5.1
  • io.rest-assured:xml-path 4.5.1
  • org.codehaus.groovy:groovy 3.0.17
  • org.codehaus.groovy:groovy-xml 3.0.17
  • org.codehaus.groovy:groovy-json 3.0.17
gradle/suppress.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 7.6.1
helm-values
charts/ccd-migration/values.yaml
helmv3
charts/ccd-migration/Chart.yaml
  • job 2.1.1
regex
Dockerfile
  • microsoft/ApplicationInsights-Java 3.4.13

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.