Part of my release process is attempting to run a Bash script against a custom Container Image (set as the Container Image property within the step). The container image is being retrieved from a private Google Cloud Registry.
Unfortunately when this step runs, it fails and gives the following error:
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
February 24th 2022 11:44:30Error
at System.Environment.FailFast(System.String)
February 24th 2022 11:44:30Error
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
February 24th 2022 11:44:30Error
at System.Globalization.GlobalizationMode..cctor()
February 24th 2022 11:44:30Error
at System.Globalization.CultureData.CreateCultureWithInvariantData()
February 24th 2022 11:44:30Error
at System.Globalization.CultureData.get_Invariant()
February 24th 2022 11:44:30Error
at System.Globalization.TextInfo..cctor()
February 24th 2022 11:44:30Error
at System.String.ToLowerInvariant()
February 24th 2022 11:44:30Error
at System.Text.EncodingHelper.GetCharset()
February 24th 2022 11:44:30Error
at System.Text.EncodingHelper.GetEncodingFromCharset()
February 24th 2022 11:44:30Error
at System.ConsolePal.GetConsoleEncoding()
February 24th 2022 11:44:30Error
at System.Console.get_OutputEncoding()
February 24th 2022 11:44:30Error
at System.Console.CreateOutputWriter(System.IO.Stream)
February 24th 2022 11:44:30Error
at System.Console.<get_Out>g__EnsureInitialized|25_0()
February 24th 2022 11:44:30Error
at System.Console.get_Out()
February 24th 2022 11:44:30Error
at Calamari.Common.Plumbing.Logging.ConsoleLog..ctor()
February 24th 2022 11:44:30Error
at Calamari.Common.Plumbing.Logging.ConsoleLog..cctor()
February 24th 2022 11:44:30Error
at Calamari.GoogleCloudScripting.Program.Main(System.String[])
February 24th 2022 11:44:31Error
at Calamari.GoogleCloudScripting.Program.<Main>(System.String[])
February 24th 2022 11:44:31Fatal
The remote script failed with exit code 139
February 24th 2022 11:44:31Fatal
The action Migrate Database on a Worker failed
I’ve checked this forum post: Couldn’t find a valid ICU package and have validated that my container (which derives from python:3.8.10-slim) has the requirements for Linux targets:
- The
$HOME
environment variable is available. -
bash
3+ is available at/bin/bash
. -
tar
is available. -
base64
is available. -
grep
is available
The JSON for the failing step is as follows:
{
"Id": "1b32ee3f-d655-48b1-abc3-257415be8b03",
"Name": "Migrate Database",
"PackageRequirement": "LetOctopusDecide",
"Properties": {},
"Condition": "Success",
"StartTrigger": "StartAfterPrevious",
"Actions": [
{
"Id": "66d2abdb-d724-49d0-8b37-30ab77e90018",
"Name": "Migrate Database",
"ActionType": "Octopus.GoogleCloudScripting",
"Notes": null,
"IsDisabled": false,
"CanBeUsedForProjectVersioning": true,
"IsRequired": false,
"WorkerPoolId": "WorkerPools-3",
"Container": {
"Image": "REDACTED",
"FeedId": "Feeds-1001"
},
"WorkerPoolVariable": null,
"Environments": [],
"ExcludedEnvironments": [],
"Channels": [],
"TenantTags": [],
"Packages": [],
"Condition": "Success",
"Properties": {
"Octopus.Action.GoogleCloud.UseVMServiceAccount": "False",
"Octopus.Action.GoogleCloud.ImpersonateServiceAccount": "False",
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.Script.Syntax": "Bash",
"Octopus.Action.GoogleCloudAccount.Variable": "GCP.DatabaseAccount",
"Octopus.Action.GoogleCloud.Project": "#{GCP.Project.Id}",
"Octopus.Action.GoogleCloud.Region": "#{GCP.Region}",
"Octopus.Action.GoogleCloud.Zone": "#{GCP.Zone}",
"Octopus.Action.Script.ScriptBody": "\nVERSION=v1.21.0 # see Releases for other versions\nwget \"https://storage.googleapis.com/cloudsql-proxy/$VERSION/cloud_sql_proxy.linux.amd64\" -O cloud_sql_proxy\nchmod +x cloud_sql_proxy\n\nDB_CONNECTION_STRING=\"$(get_octopusvariable \"GCP.Database.Connection\")\" \nACCOUNT_TOKEN=\"$(get_octopusvariable \"GCP.DatabaseToken\")\" \necho \"*** Start migration\" \ncloud_sql_proxy -token=$ACCOUNT_TOKEN -instances=$DB_CONNECTION_STRING=tcp:5433\npython manage.py migrate \npython manage.py createcachetable \necho \"*** End migration\"",
"Octopus.Action.RunOnServer": "true",
"OctopusUseBundledTooling": "False"
},
"Links": {}
}
]
},
Additionally when setting the worker pool to Default Worker Pool
the worker doesn’t pull the docker image correctly but does when the worker pool is set to Host Ubuntu
Any support you can give would be greatly appreciated