Pull request #8: Deployment config
Merge in RR/pyinfra from deployment-config to master
Squashed commit of the following:
commit 5551b4261c974cc083f91fc5cf5b935235dc8651
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 09:30:52 2022 +0100
fixed logging
commit 514ab86f9e4b4996b44f098cbd23a878633c951e
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 09:29:50 2022 +0100
fixed logging
commit 02471fe463da48effaf128ef04d8dd8887f4c6a0
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 09:18:16 2022 +0100
repaired build plan
commit 160c52c2a4c79d7d22b4f0925d1712dacc6ae56a
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 09:14:56 2022 +0100
repairing build plan WIP
commit 24b4ebd0f09447cbaea3b4ef97384b8802578a01
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 08:43:28 2022 +0100
more general log message
commit e9a1a7a86d857a9eaf7bcab60174fab40fe16a72
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 08:36:27 2022 +0100
💖 beautification
commit d41adda60cea70e34d3f6c8d22bcd555f646eb55
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Tue Feb 22 08:35:31 2022 +0100
added more logging
commit cc3a37d5dc07ae58c9c2c456b68d7c40c50528ee
Author: Julius Unverfehrt <Julius.Unverfehrt@iqser.com>
Date: Fri Feb 18 12:54:38 2022 +0100
adjusted build script for pyinfra; incremented bamboo builder version
This commit is contained in:
parent
eb2686b027
commit
b2c4ab0129
@ -33,7 +33,7 @@ import com.atlassian.bamboo.specs.model.task.ScriptTaskProperties.Location;
|
||||
@BambooSpec
|
||||
public class PlanSpec {
|
||||
|
||||
private static final String SERVICE_NAME = "PyInfra";
|
||||
private static final String SERVICE_NAME = "pyinfra";
|
||||
|
||||
private static final String SERVICE_KEY = SERVICE_NAME.toUpperCase().replaceAll("-","");
|
||||
|
||||
@ -71,7 +71,7 @@ public class PlanSpec {
|
||||
return new Plan(
|
||||
project(),
|
||||
SERVICE_NAME, new BambooKey(SERVICE_KEY))
|
||||
.description("Docker build for mini-queue-service-v1")
|
||||
.description("Docker build for pyinfra")
|
||||
// .variables()
|
||||
.stages(new Stage("Build Stage")
|
||||
.jobs(
|
||||
@ -94,7 +94,7 @@ public class PlanSpec {
|
||||
.description("Build Docker container.")
|
||||
.location(Location.FILE)
|
||||
.fileFromPath("bamboo-specs/src/main/resources/scripts/docker-build.sh")
|
||||
.argument(SERVICE_NAME)
|
||||
.argument(SERVICE_NAME))
|
||||
.dockerConfiguration(
|
||||
new DockerConfiguration()
|
||||
.image("nexus.iqser.com:5001/infra/release_build:4.2.0")
|
||||
@ -150,7 +150,7 @@ public class PlanSpec {
|
||||
.defaultRepository())
|
||||
.dockerConfiguration(
|
||||
new DockerConfiguration()
|
||||
.image("nexus.iqser.com:5001/infra/release_build:2.7.0")),
|
||||
.image("nexus.iqser.com:5001/infra/release_build:4.4.1")),
|
||||
new Job("Licence Job", new BambooKey("LICENCE"))
|
||||
.enabled(false)
|
||||
.tasks(
|
||||
|
||||
@ -29,7 +29,7 @@ def make_storage_data_loader(storage):
|
||||
try:
|
||||
return decompress(download(payload))
|
||||
except Exception as err:
|
||||
logging.warning(f"Loading data from storage failed for {payload}")
|
||||
logging.warning(f"Loading data from storage failed for {payload}.")
|
||||
raise DataLoadingFailure() from err
|
||||
|
||||
return load_data
|
||||
@ -38,9 +38,11 @@ def make_storage_data_loader(storage):
|
||||
def make_analyzer(analysis_endpoint):
|
||||
def analyze(data):
|
||||
try:
|
||||
logging.debug(f"Requesting analysis from {analysis_endpoint}...")
|
||||
analysis_response = requests.post(analysis_endpoint, data=data)
|
||||
analysis_response.raise_for_status()
|
||||
analysis_response = analysis_response.json()
|
||||
logging.debug(f"Received response.")
|
||||
return analysis_response
|
||||
except Exception as err:
|
||||
logging.warning("Exception caught when calling analysis endpoint.")
|
||||
@ -50,7 +52,6 @@ def make_analyzer(analysis_endpoint):
|
||||
|
||||
|
||||
def make_payload_processor(load_data, analyze_file):
|
||||
|
||||
@json_wrap
|
||||
def process(payload: dict):
|
||||
logging.info(f"Processing {payload}...")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user