Git: Add Date to Git Commit
To add a date to a git commit message from the command line:
To add a date to a git commit message from the command line:
In Spring you can enable a component using a profile:
YAGNI is an acronym for “You Aren’t Gonna Need It”.
When making changes to config maps or other things - it’s tempting to restart all the pods for a particular service (select them all, delete, and let them come back up). This may work in the majority of cases, but if something goes wrong, it’ll be hard to tell if the recent change caused it or if it’s unrelated.
To access a shell in a particular pod:
To run a batch job, a JobLauncher needs a batch JobConfiguration and JobParameters. This creates a JobInstance.
If you need to checkout a single file from another branch in git use:
Batch jobs are created in Spring Batch using the JobBuilderFactory. A custom job builder factory can be created and re-used to allow common job configurations to be shared across all batch jobs in a project.
When a batch job fails it’s useful to automatically send a notification or trigger some sort of an action.
public static LocalDate parseDate(String date) {
DateTimeFormatter formatter =
DateTimeFormatter.ofPattern("M/d/y");
return LocalDate.parse(date,formatter);
}
@Test
public void testDateParsing() {
String testDate;
testDate ="01/01/2022";
LocalDate expected = LocalDate.of(2022, 1, 1);
assertEquals(expected, DateParser.parseDate(testDate));
}
@Test
public void testDateParsingSingleDigitMonthAndYear() {
String testDate;
testDate = "1/1/2022";
LocalDate expected = LocalDate.of(2022, 1, 1);
assertEquals(expected, DateParser.parseDate(testDate));
}