From 828b700f834d517ea0c897a89c414bcbfa176cd7 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 3 Oct 2024 07:37:29 +0000 Subject: [PATCH] Auto-update from backup job --- .../test/test.txt | 4 + .../ber/and/to/a.txt | 2 + .../test/test.txt | 3 + .../ber/and/to/a.txt | 1 + .../ce/mostat.txt | 1 + .../README.md | 100 +++++++++++++++++ .../README.md | 101 ++++++++++++++++++ 7 files changed, 212 insertions(+) create mode 100644 data/1981640cc5ff6284950e828afd0156e3051ed1a2/test/test.txt create mode 100644 data/21892142b6b87680fb0a1d92ae66c66d315d2da7/ber/and/to/a.txt create mode 100644 data/4d7164ebb606f7db8d580f08e92a975a436643a3/test/test.txt create mode 100644 data/bd2cda0fb5e289756e4d22225af242dcf5556498/ber/and/to/a.txt create mode 100644 data/ff58d4299a849be51027591d53e19b61508d8fb1/ce/mostat.txt create mode 100644 data_main/6ecb78baff8d90ab131bca39b0be3bcb898ab30e/README.md create mode 100644 data_main/cf20a9fa58761a60a3b0dc8573be942a635ca2ea/README.md diff --git a/data/1981640cc5ff6284950e828afd0156e3051ed1a2/test/test.txt b/data/1981640cc5ff6284950e828afd0156e3051ed1a2/test/test.txt new file mode 100644 index 0000000..fb2a3e4 --- /dev/null +++ b/data/1981640cc5ff6284950e828afd0156e3051ed1a2/test/test.txt @@ -0,0 +1,4 @@ +This is a test file + +Of Scientific Alaska USGS real-time, geographic, and other deciduous +Particles. Induction gained from \ No newline at end of file diff --git a/data/21892142b6b87680fb0a1d92ae66c66d315d2da7/ber/and/to/a.txt b/data/21892142b6b87680fb0a1d92ae66c66d315d2da7/ber/and/to/a.txt new file mode 100644 index 0000000..ab48f7f --- /dev/null +++ b/data/21892142b6b87680fb0a1d92ae66c66d315d2da7/ber/and/to/a.txt @@ -0,0 +1,2 @@ +(Special Operations Vista, Salvador. +Other geometric levied include raw fish taxes, hotel, motel, and bed-and-breakfast \ No newline at end of file diff --git a/data/4d7164ebb606f7db8d580f08e92a975a436643a3/test/test.txt b/data/4d7164ebb606f7db8d580f08e92a975a436643a3/test/test.txt new file mode 100644 index 0000000..486860e --- /dev/null +++ b/data/4d7164ebb606f7db8d580f08e92a975a436643a3/test/test.txt @@ -0,0 +1,3 @@ +This is a test file + +Of Scientific Alaska USGS real-time, geographic, and other deciduous \ No newline at end of file diff --git a/data/bd2cda0fb5e289756e4d22225af242dcf5556498/ber/and/to/a.txt b/data/bd2cda0fb5e289756e4d22225af242dcf5556498/ber/and/to/a.txt new file mode 100644 index 0000000..a0c0da4 --- /dev/null +++ b/data/bd2cda0fb5e289756e4d22225af242dcf5556498/ber/and/to/a.txt @@ -0,0 +1 @@ +(Special Operations Vista, Salvador. \ No newline at end of file diff --git a/data/ff58d4299a849be51027591d53e19b61508d8fb1/ce/mostat.txt b/data/ff58d4299a849be51027591d53e19b61508d8fb1/ce/mostat.txt new file mode 100644 index 0000000..31c3bf7 --- /dev/null +++ b/data/ff58d4299a849be51027591d53e19b61508d8fb1/ce/mostat.txt @@ -0,0 +1 @@ +And taxes, cooler, higher-density air. The species fractus shows variable instability because \ No newline at end of file diff --git a/data_main/6ecb78baff8d90ab131bca39b0be3bcb898ab30e/README.md b/data_main/6ecb78baff8d90ab131bca39b0be3bcb898ab30e/README.md new file mode 100644 index 0000000..e66289a --- /dev/null +++ b/data_main/6ecb78baff8d90ab131bca39b0be3bcb898ab30e/README.md @@ -0,0 +1,100 @@ +# Descartes Underwriting + +## Context + +We wish to create a backup tool that will save only the last modified files of a storage unit. + +In our example, the storage unit is **not a bucket**. + +The storage unit is the `DD-MM-YYYY-test` branch of the current `descartes-underwriting/devops-technical-test-data` git repository. + +## Property + +The `descartes-underwriting/devops-technical-test-data` repository is not frozen and will have new commits. + +Commits will be added to the `DD-MM-YYYY-test` branch multiple times every day. + +The `DD-MM-YYYY-test` branch name will be adapted using standard datetime convention eg: `01-01-2022-test` for the 1st of January 2022. + +## Task + +Develop a backup tool to save the modified files at each commit. + +### Submission + +If something is not clear, you can ask questions to the recruiter. + +When submitting your project, your version should **not be draft** but complete and following best practices. + +The solution should be saved on a **private** `descartes-devops` repository on your github account. + +The solution should include: + +- source code +- test code + +When the final version is ready: + +1. Send an email to the recruiter indicating that you finished the project and sharing the url of the project +2. Grant access to: + +- +- +- + +### Script + +Create a script to automate the backup process using open source software. + +The script should track the changes fo the branch `DD-MM-YYYY-test` of the `descartes-underwriting/devops-technical-test-data` repository. + +The execution of the script should be carried out with a github-action / gitlab-pipeline or any other tool automating git workflow on your git project. + +It is highly recommended to use a scheduling tool to execute the back up process. + +### Data + +The backup should store files in separate folders. + +The backup file structure should be based on the sha1 of the `descartes-underwriting/devops-technical-test-data`. + +Starting from the initial commit [282180fe7e5d9cbf297f2f0ef813cffe60ce2328](https://github.com/descartes-underwriting/devops-technical-test-data/commit/282180fe7e5d9cbf297f2f0ef813cffe60ce2328), all the history should be backup. + +## File structure example + +For the following commits on the `descartes-underwriting/devops-technical-test-data`: + +| SHA | OPERATION | +|-----|-----------| +| Commit_N | create readme.md | +| Commit_N+1 | create doc.txt | +| Commit_N+2 | create data/test/test.txt | +| Commit_N+3 | append text to ./doc.txt | +| Commit_N+4 | create test/project/project1.txt | + +The `candidate/descartes-backup-project` repository should have + +```bash +$ tree . +. +├── .gitworkflow +│   └── workflows +│   └── my-lovely-workflow.yml +├── data +│   ├── N +│   │   └── readme.md +│   ├── N+1 +│   │   └── doc.txt +│   ├── N+2 +│   │   └── data +│   │   └── test +│   │   └── test.txt +│   ├── N+3 +│   │   └── doc.txt +│   └── N+4 +│   └── test +│   └── project +│   └── project1.txt +└── script + └── my-beautiful-script.best-language +``` diff --git a/data_main/cf20a9fa58761a60a3b0dc8573be942a635ca2ea/README.md b/data_main/cf20a9fa58761a60a3b0dc8573be942a635ca2ea/README.md new file mode 100644 index 0000000..a355c18 --- /dev/null +++ b/data_main/cf20a9fa58761a60a3b0dc8573be942a635ca2ea/README.md @@ -0,0 +1,101 @@ +# Descartes Underwriting + +## Context + +We wish to create a backup tool that will save only the last modified files of a storage unit. + +In our example, the storage unit is **not a bucket**. + +The storage unit is the `DD-MM-YYYY-test` branch of the current `descartes-underwriting/devops-technical-test-data` git repository. + +## Property + +The `descartes-underwriting/devops-technical-test-data` repository is not frozen and will have new commits. + +Commits will be added to the `DD-MM-YYYY-test` branch multiple times every day. + +The `DD-MM-YYYY-test` branch name will be adapted using standard datetime convention eg: `01-01-2022-test` for the 1st of January 2022. + +## Task + +Develop a backup tool to save the modified files at each commit. + +### Submission + +If something is not clear, you can ask questions to the recruiter. + +When submitting your project, your version should **not be draft** but complete and following best practices. + +The solution should be saved on a **private** `descartes-devops` repository on your github account. + +The solution should include: + +- source code +- test code + +When the final version is ready: + +1. Send an email to the recruiter indicating that you finished the project and sharing the url of the project +2. Grant access to: + +- +- +- +- + +### Script + +Create a script to automate the backup process using open source software. + +The script should track the changes fo the branch `DD-MM-YYYY-test` of the `descartes-underwriting/devops-technical-test-data` repository. + +The execution of the script should be carried out with a github-action / gitlab-pipeline or any other tool automating git workflow on your git project. + +It is highly recommended to use a scheduling tool to execute the back up process. + +### Data + +The backup should store files in separate folders. + +The backup file structure should be based on the sha1 of the `descartes-underwriting/devops-technical-test-data`. + +Starting from the initial commit [282180fe7e5d9cbf297f2f0ef813cffe60ce2328](https://github.com/descartes-underwriting/devops-technical-test-data/commit/282180fe7e5d9cbf297f2f0ef813cffe60ce2328), all the history should be backup. + +## File structure example + +For the following commits on the `descartes-underwriting/devops-technical-test-data`: + +| SHA | OPERATION | +|-----|-----------| +| Commit_N | create readme.md | +| Commit_N+1 | create doc.txt | +| Commit_N+2 | create data/test/test.txt | +| Commit_N+3 | append text to ./doc.txt | +| Commit_N+4 | create test/project/project1.txt | + +The `candidate/descartes-backup-project` repository should have + +```bash +$ tree . +. +├── .gitworkflow +│   └── workflows +│   └── my-lovely-workflow.yml +├── data +│   ├── N +│   │   └── readme.md +│   ├── N+1 +│   │   └── doc.txt +│   ├── N+2 +│   │   └── data +│   │   └── test +│   │   └── test.txt +│   ├── N+3 +│   │   └── doc.txt +│   └── N+4 +│   └── test +│   └── project +│   └── project1.txt +└── script + └── my-beautiful-script.best-language +```