diff --git a/README.md b/README.md
index 845bb922a1..93b9cfdff5 100644
--- a/README.md
+++ b/README.md
@@ -178,7 +178,7 @@ LocalStack's community edition [sunset in March 2026](https://blog.localstack.cl
| CodeBuild | Real Docker execution | No |
| Native binary | ~40 MB | No |
-**58 AWS services. Broad coverage. Free forever.**
+**59 AWS services. Broad coverage. Free forever.**
## Architecture Overview
@@ -190,7 +190,7 @@ flowchart LR
Router["HTTP Router\nJAX-RS / Vert.x"]
subgraph Stateless ["Stateless Services"]
- A["SSM · SQS · SNS\nIAM · STS · KMS\nSecrets Manager · SES\nCognito · Kinesis\nEventBridge · Scheduler · AppConfig\nCloudWatch · Step Functions\nCloudFormation · ACM · Config\nAPI Gateway · AppSync · ELB v2 · Auto Scaling\nCodeDeploy · Backup · Bedrock Runtime · Route53 · Transfer"]
+ A["SSM · SQS · SNS\nIAM · STS · KMS\nSecrets Manager · SES\nCognito · Kinesis\nEventBridge · Scheduler · AppConfig\nCloudWatch · Step Functions\nCloudFormation · ACM · Config\nAPI Gateway · AppSync · ELB v2 · Auto Scaling\nCodeDeploy · CodePipeline · Backup · Bedrock Runtime · Route53 · Transfer"]
end
subgraph Stateful ["Stateful Services"]
@@ -222,7 +222,7 @@ Floci supports local emulation for application services, data services, eventing
| Core app services | S3, SQS, SNS, DynamoDB, Lambda, IAM, STS, KMS, Secrets Manager |
| Events and workflows | EventBridge, EventBridge Pipes, EventBridge Scheduler, Step Functions, CloudWatch Logs, CloudWatch Metrics |
| API and identity | API Gateway REST, API Gateway v2, AppSync, Cognito, ACM, Route53, Cloud Map |
-| Containers and compute | ECS, EC2, EKS, CodeBuild, CodeDeploy, Auto Scaling, ELB v2 |
+| Containers and compute | ECS, EC2, EKS, CodeBuild, CodeDeploy, CodePipeline, Auto Scaling, ELB v2 |
| Data and analytics | Athena, Glue, EMR, Firehose, OpenSearch, Textract, Transcribe |
| Security and governance | WAF v2, CloudTrail |
| Databases | RDS, RDS Data API, Neptune, DocumentDB, MemoryDB |
@@ -287,6 +287,7 @@ For operation-level compatibility, see the [Services Overview](https://floci.io/
| ELB v2 | In-process | ALB, NLB, target groups, listeners, routing rules, Lambda targets, tags |
| CodeBuild | In-process with real Docker | Real buildspec execution, CloudWatch logs, S3 artifacts |
| CodeDeploy | In-process with Lambda traffic shifting | Deployment groups, configs, lifecycle hooks, auto-rollback |
+| CodePipeline | In-process orchestration | Pipelines, executions, S3 artifacts, approvals, local providers, custom workers |
| Auto Scaling | In-process with reconciler | Launch configs, ASGs, desired capacity reconciliation, lifecycle hooks |
| AWS Backup | In-process | Vaults, backup plans, selections, simulated job lifecycle, recovery points |
| AWS Config | In-process | Config rules, configuration recorders, delivery channels, conformance packs, tagging |
diff --git a/compatibility-tests/sdk-test-java/pom.xml b/compatibility-tests/sdk-test-java/pom.xml
index 791c778388..cb67dc6a57 100644
--- a/compatibility-tests/sdk-test-java/pom.xml
+++ b/compatibility-tests/sdk-test-java/pom.xml
@@ -271,6 +271,11 @@
software.amazon.awssdk
codedeploy
+
+
+ software.amazon.awssdk
+ codepipeline
+
software.amazon.awssdk
diff --git a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
index c54222f3db..ef8beedbe8 100644
--- a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
+++ b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java
@@ -50,6 +50,7 @@ import software.amazon.awssdk.services.ecr.EcrClient;
import software.amazon.awssdk.services.pipes.PipesClient;
import software.amazon.awssdk.services.codebuild.CodeBuildClient;
import software.amazon.awssdk.services.codedeploy.CodeDeployClient;
+import software.amazon.awssdk.services.codepipeline.CodePipelineClient;
import software.amazon.awssdk.services.ecs.EcsClient;
import software.amazon.awssdk.services.eks.EksClient;
import software.amazon.awssdk.services.scheduler.SchedulerClient;
@@ -673,6 +674,14 @@ public final class TestFixtures {
.build();
}
+ public static CodePipelineClient codePipelineClient() {
+ return CodePipelineClient.builder()
+ .endpointOverride(ENDPOINT)
+ .region(REGION)
+ .credentialsProvider(CREDENTIALS)
+ .build();
+ }
+
public static BackupClient backupClient() {
return BackupClient.builder()
.endpointOverride(ENDPOINT)
diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/CodePipelineTest.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/CodePipelineTest.java
new file mode 100644
index 0000000000..1bdbc02e92
--- /dev/null
+++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/CodePipelineTest.java
@@ -0,0 +1,147 @@
+package com.floci.test;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.MethodOrderer;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestMethodOrder;
+import software.amazon.awssdk.services.codepipeline.CodePipelineClient;
+import software.amazon.awssdk.services.codepipeline.model.ActionCategory;
+import software.amazon.awssdk.services.codepipeline.model.ActionDeclaration;
+import software.amazon.awssdk.services.codepipeline.model.ActionOwner;
+import software.amazon.awssdk.services.codepipeline.model.ActionTypeId;
+import software.amazon.awssdk.services.codepipeline.model.ArtifactStore;
+import software.amazon.awssdk.services.codepipeline.model.ArtifactStoreType;
+import software.amazon.awssdk.services.codepipeline.model.CreatePipelineResponse;
+import software.amazon.awssdk.services.codepipeline.model.DeleteWebhookResponse;
+import software.amazon.awssdk.services.codepipeline.model.GetPipelineResponse;
+import software.amazon.awssdk.services.codepipeline.model.ListPipelinesResponse;
+import software.amazon.awssdk.services.codepipeline.model.ListWebhooksResponse;
+import software.amazon.awssdk.services.codepipeline.model.OutputArtifact;
+import software.amazon.awssdk.services.codepipeline.model.PipelineDeclaration;
+import software.amazon.awssdk.services.codepipeline.model.PutWebhookResponse;
+import software.amazon.awssdk.services.codepipeline.model.StageDeclaration;
+import software.amazon.awssdk.services.codepipeline.model.UpdatePipelineResponse;
+import software.amazon.awssdk.services.codepipeline.model.WebhookAuthenticationType;
+import software.amazon.awssdk.services.codepipeline.model.WebhookDefinition;
+import software.amazon.awssdk.services.codepipeline.model.WebhookFilterRule;
+
+import java.util.Map;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
+class CodePipelineTest {
+ private static final String PIPELINE = "sdk-codepipeline";
+ private static CodePipelineClient codepipeline;
+
+ @BeforeAll
+ static void setup() {
+ codepipeline = TestFixtures.codePipelineClient();
+ }
+
+ @AfterAll
+ static void teardown() {
+ codepipeline.close();
+ }
+
+ @Test
+ @Order(1)
+ void createAndGetPipeline() {
+ CreatePipelineResponse created = codepipeline.createPipeline(r -> r.pipeline(declaration("Deploy")));
+ assertThat(created.pipeline().name()).isEqualTo(PIPELINE);
+ assertThat(created.pipeline().version()).isEqualTo(1);
+
+ GetPipelineResponse fetched = codepipeline.getPipeline(r -> r.name(PIPELINE));
+ assertThat(fetched.pipeline().stages()).hasSize(2);
+ assertThat(fetched.metadata().pipelineArn()).endsWith(":" + PIPELINE);
+ }
+
+ @Test
+ @Order(2)
+ void updateAndListPipeline() {
+ UpdatePipelineResponse updated = codepipeline.updatePipeline(r -> r.pipeline(declaration("Release")));
+ assertThat(updated.pipeline().version()).isEqualTo(2);
+ assertThat(updated.pipeline().stages().get(1).name()).isEqualTo("Release");
+
+ ListPipelinesResponse listed = codepipeline.listPipelines();
+ assertThat(listed.pipelines()).extracting(p -> p.name()).contains(PIPELINE);
+ }
+
+ @Test
+ @Order(3)
+ void webhookResponsesUseSdkModelShape() {
+ WebhookDefinition definition = WebhookDefinition.builder()
+ .name("sdk-webhook")
+ .targetPipeline(PIPELINE)
+ .targetAction("Source")
+ .authentication(WebhookAuthenticationType.UNAUTHENTICATED)
+ .filters(WebhookFilterRule.builder()
+ .jsonPath("$.ref")
+ .matchEquals("refs/heads/main")
+ .build())
+ .build();
+
+ PutWebhookResponse created = codepipeline.putWebhook(r -> r.webhook(definition));
+ assertThat(created.webhook().definition()).isEqualTo(definition);
+ assertThat(created.webhook().arn()).endsWith(":webhook/sdk-webhook");
+
+ ListWebhooksResponse listed = codepipeline.listWebhooks();
+ assertThat(listed.webhooks()).singleElement()
+ .extracting(webhook -> webhook.definition().name())
+ .isEqualTo("sdk-webhook");
+
+ DeleteWebhookResponse deleted = codepipeline.deleteWebhook(r -> r.name("sdk-webhook"));
+ assertThat(deleted.sdkFields()).isEmpty();
+ }
+
+ @Test
+ @Order(4)
+ void deletePipeline() {
+ codepipeline.deletePipeline(r -> r.name(PIPELINE));
+ assertThat(codepipeline.listPipelines().pipelines())
+ .extracting(p -> p.name())
+ .doesNotContain(PIPELINE);
+ }
+
+ private static PipelineDeclaration declaration(String secondStage) {
+ return PipelineDeclaration.builder()
+ .name(PIPELINE)
+ .roleArn("arn:aws:iam::000000000000:role/codepipeline-role")
+ .artifactStore(ArtifactStore.builder()
+ .type(ArtifactStoreType.S3)
+ .location("codepipeline-artifacts")
+ .build())
+ .stages(
+ StageDeclaration.builder()
+ .name("Source")
+ .actions(ActionDeclaration.builder()
+ .name("Source")
+ .actionTypeId(ActionTypeId.builder()
+ .category(ActionCategory.SOURCE)
+ .owner(ActionOwner.AWS)
+ .provider("S3")
+ .version("1")
+ .build())
+ .configuration(Map.of(
+ "S3Bucket", "codepipeline-source",
+ "S3ObjectKey", "source.zip"))
+ .outputArtifacts(OutputArtifact.builder().name("SourceOutput").build())
+ .build())
+ .build(),
+ StageDeclaration.builder()
+ .name(secondStage)
+ .actions(ActionDeclaration.builder()
+ .name("Approval")
+ .actionTypeId(ActionTypeId.builder()
+ .category(ActionCategory.APPROVAL)
+ .owner(ActionOwner.AWS)
+ .provider("Manual")
+ .version("1")
+ .build())
+ .build())
+ .build())
+ .build();
+ }
+}
diff --git a/docs/index.md b/docs/index.md
index 7543bbab9c..7f39c851ac 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -12,7 +12,7 @@ Floci is a fast, free, and open-source local AWS service emulator built for deve
## Supported Services
-Floci emulates 58 AWS services. See the [Services Overview](services/index.md) for per-service operation counts, endpoints, and full protocol details.
+Floci emulates 59 AWS services. See the [Services Overview](services/index.md) for per-service operation counts, endpoints, and full protocol details.
| Service | Protocol |
|---|---|
@@ -60,6 +60,7 @@ Floci emulates 58 AWS services. See the [Services Overview](services/index.md) f
| Auto Scaling | Query |
| CodeBuild | JSON 1.1 |
| CodeDeploy | JSON 1.1 |
+| CodePipeline | JSON 1.1 |
| AWS Backup | REST JSON |
| CloudFront | REST XML |
| Route53 | REST XML |
@@ -107,7 +108,7 @@ docker compose up -d
aws --endpoint-url http://localhost:4566 s3 mb s3://my-bucket
```
-All 58 AWS services are immediately available at `http://localhost:4566`.
+All 59 AWS services are immediately available at `http://localhost:4566`.
[Get started →](getting-started/quick-start.md){ .md-button .md-button--primary }
[View services →](services/index.md){ .md-button }
diff --git a/docs/services/codepipeline.md b/docs/services/codepipeline.md
new file mode 100644
index 0000000000..5e6c10177e
--- /dev/null
+++ b/docs/services/codepipeline.md
@@ -0,0 +1,61 @@
+# CodePipeline
+
+Floci implements the AWS CodePipeline JSON 1.1 API and a local pipeline execution engine.
+
+**Protocol:** `POST /` with `Content-Type: application/x-amz-json-1.1` and
+`X-Amz-Target: CodePipeline_20150709.`.
+
+## Supported Operations (44 total)
+
+The complete CodePipeline 2015-07-09 API surface is routed:
+
+- Pipeline lifecycle, state, execution history, start, stop, retry, and rollback
+- Stage transitions, manual approvals, action and rule execution history
+- Custom action types and AWS/third-party worker job polling
+- Webhook registration and tag lifecycle
+
+Pipeline definitions, executions, custom action types, jobs, webhooks, tags, and transition
+state use Floci's configured storage backend.
+
+## Execution
+
+Stages execute in declaration order. Actions with the same `runOrder` execute in parallel.
+`SUPERSEDED`, `QUEUED`, and `PARALLEL` execution modes are recognized, with `QUEUED` and
+`PARALLEL` restricted to V2 pipelines.
+
+The following providers execute against local Floci services:
+
+| Category | Provider | Behavior |
+|---|---|---|
+| Source | S3 | Reads the configured object and publishes the output artifact |
+| Build/Test | CodeBuild | Starts and monitors the configured local CodeBuild project |
+| Deploy | S3 | Writes the input artifact to the configured bucket and key |
+| Deploy | CodeDeploy | Starts and monitors a local CodeDeploy deployment |
+| Invoke | Lambda | Invokes the configured local Lambda function |
+| Invoke | CodePipeline | Starts a nested local pipeline execution |
+| Approval | Manual | Waits for `PutApprovalResult` |
+| Custom/third-party | Any registered action | Uses poll, acknowledge, success, and failure job APIs |
+
+AWS-managed providers without a corresponding Floci execution adapter fail the action with an
+AWS-shaped action error. Floci does not call real AWS accounts or third-party SaaS providers.
+
+## Configuration
+
+| Variable | Default | Description |
+|---|---|---|
+| `FLOCI_SERVICES_CODEPIPELINE_ENABLED` | `true` | Enables the CodePipeline API |
+| `FLOCI_STORAGE_SERVICES_CODEPIPELINE_MODE` | global mode | Overrides CodePipeline storage mode |
+| `FLOCI_STORAGE_SERVICES_CODEPIPELINE_FLUSH_INTERVAL_MS` | `5000` | Hybrid storage flush interval |
+
+## Example
+
+```bash
+aws --endpoint-url http://localhost:4566 codepipeline create-pipeline \
+ --pipeline file://pipeline.json
+
+aws --endpoint-url http://localhost:4566 codepipeline start-pipeline-execution \
+ --name local-release
+
+aws --endpoint-url http://localhost:4566 codepipeline list-pipeline-executions \
+ --pipeline-name local-release
+```
diff --git a/docs/services/index.md b/docs/services/index.md
index 765e26dc6a..c19a3e8457 100644
--- a/docs/services/index.md
+++ b/docs/services/index.md
@@ -1,6 +1,6 @@
# Services Overview
-Floci emulates 58 AWS services on a single port (`4566`). All services use the real AWS wire protocol, your existing AWS CLI commands and SDK clients work without modification.
+Floci emulates 59 AWS services on a single port (`4566`). All services use the real AWS wire protocol, your existing AWS CLI commands and SDK clients work without modification.
This page is the canonical reference for supported service and operation counts. Some services expose separate control-plane and data-plane rows below. Other docs (and the README) should link here rather than duplicating the table.
@@ -62,6 +62,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [CodeBuild](codebuild.md) | `POST /` + `X-Amz-Target: CodeBuild_20161006.*` | JSON 1.1 | 20 |
| [AWS Batch](batch.md) | `/v1/...` | REST JSON | 10 |
| [CodeDeploy](codedeploy.md) | `POST /` + `X-Amz-Target: CodeDeploy_20141006.*` | JSON 1.1 | 30 |
+| [CodePipeline](codepipeline.md) | `POST /` + `X-Amz-Target: CodePipeline_20150709.*` | JSON 1.1 | 44 |
| [AWS Backup](backup.md) | `/backup-vaults/*`, `/backup/plans/*`, `/backup-jobs/*`, `/supported-resource-types` | REST JSON | 20 |
| [CloudFront](cloudfront.md) | `/2020-05-31/distribution/*`, `/2020-05-31/cache-policy/*`, `/2020-05-31/function/*` | REST XML | 50 |
| [Route53](route53.md) | `/2013-04-01/hostedzone/*`, `/2013-04-01/healthcheck/*`, `/2013-04-01/change/*` | REST XML | 17 |
diff --git a/mkdocs.yml b/mkdocs.yml
index bc2a6091cc..442277fb1b 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -118,6 +118,7 @@ nav:
- CodeBuild: services/codebuild.md
- AWS Batch: services/batch.md
- CodeDeploy: services/codedeploy.md
+ - CodePipeline: services/codepipeline.md
- AWS Backup: services/backup.md
- CloudFront: services/cloudfront.md
- Route53: services/route53.md
diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
index 6909a28b6d..296b70a895 100644
--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
@@ -175,6 +175,7 @@ public interface EmulatorConfig {
CloudFrontStorageConfig cloudfront();
AppSyncStorageConfig appsync();
BatchStorageConfig batch();
+ CodePipelineStorageConfig codepipeline();
S3VectorsStorageConfig s3vectors();
}
@@ -314,6 +315,13 @@ public interface EmulatorConfig {
long flushIntervalMs();
}
+ interface CodePipelineStorageConfig {
+ Optional mode();
+
+ @WithDefault("5000")
+ long flushIntervalMs();
+ }
+
interface S3VectorsStorageConfig {
Optional mode();
@@ -384,6 +392,7 @@ public interface EmulatorConfig {
ElbV2ServiceConfig elbv2();
CodeBuildServiceConfig codebuild();
CodeDeployServiceConfig codedeploy();
+ CodePipelineServiceConfig codepipeline();
AutoScalingServiceConfig autoscaling();
BackupServiceConfig backup();
NeptuneServiceConfig neptune();
@@ -478,6 +487,11 @@ public interface EmulatorConfig {
boolean enabled();
}
+ interface CodePipelineServiceConfig {
+ @WithDefault("true")
+ boolean enabled();
+ }
+
interface SsmServiceConfig {
@WithDefault("true")
boolean enabled();
diff --git a/src/main/java/io/github/hectorvent/floci/core/common/AwsJson11Controller.java b/src/main/java/io/github/hectorvent/floci/core/common/AwsJson11Controller.java
index 1f7e4e6e43..6fcf740b0b 100644
--- a/src/main/java/io/github/hectorvent/floci/core/common/AwsJson11Controller.java
+++ b/src/main/java/io/github/hectorvent/floci/core/common/AwsJson11Controller.java
@@ -6,6 +6,7 @@ import io.github.hectorvent.floci.services.acm.AcmJsonHandler;
import io.github.hectorvent.floci.services.athena.AthenaJsonHandler;
import io.github.hectorvent.floci.services.codebuild.CodeBuildJsonHandler;
import io.github.hectorvent.floci.services.codedeploy.CodeDeployJsonHandler;
+import io.github.hectorvent.floci.services.codepipeline.CodePipelineJsonHandler;
import io.github.hectorvent.floci.services.ecr.EcrJsonHandler;
import io.github.hectorvent.floci.services.transfer.TransferHandler;
import io.github.hectorvent.floci.services.ecs.EcsJsonHandler;
@@ -78,6 +79,7 @@ public class AwsJson11Controller {
private final ResourceGroupsTaggingJsonHandler resourceGroupsTaggingJsonHandler;
private final CodeBuildJsonHandler codeBuildJsonHandler;
private final CodeDeployJsonHandler codeDeployJsonHandler;
+ private final CodePipelineJsonHandler codePipelineJsonHandler;
private final Ec2MessagesJsonHandler ec2MessagesJsonHandler;
private final TransferHandler transferHandler;
private final TextractJsonHandler textractJsonHandler;
@@ -109,6 +111,7 @@ public class AwsJson11Controller {
ResourceGroupsTaggingJsonHandler resourceGroupsTaggingJsonHandler,
CodeBuildJsonHandler codeBuildJsonHandler,
CodeDeployJsonHandler codeDeployJsonHandler,
+ CodePipelineJsonHandler codePipelineJsonHandler,
Ec2MessagesJsonHandler ec2MessagesJsonHandler,
TransferHandler transferHandler,
TextractJsonHandler textractJsonHandler,
@@ -143,6 +146,7 @@ public class AwsJson11Controller {
this.resourceGroupsTaggingJsonHandler = resourceGroupsTaggingJsonHandler;
this.codeBuildJsonHandler = codeBuildJsonHandler;
this.codeDeployJsonHandler = codeDeployJsonHandler;
+ this.codePipelineJsonHandler = codePipelineJsonHandler;
this.ec2MessagesJsonHandler = ec2MessagesJsonHandler;
this.transferHandler = transferHandler;
this.textractJsonHandler = textractJsonHandler;
@@ -202,6 +206,8 @@ public class AwsJson11Controller {
case "tagging" -> resourceGroupsTaggingJsonHandler.handle(action, request, region);
case "codebuild" -> codeBuildJsonHandler.handle(action, request, region, regionResolver.getAccountId());
case "codedeploy" -> codeDeployJsonHandler.handle(action, request, region);
+ case "codepipeline" -> codePipelineJsonHandler.handle(
+ action, request, region, regionResolver.getAccountId());
case "ec2messages" -> ec2MessagesJsonHandler.handle(action, request, region);
case "transfer" -> transferHandler.handle(action, request, region);
case "textract" -> textractJsonHandler.handle(action, request, region);
diff --git a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
index 0cc8da640f..974f077fa8 100644
--- a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
+++ b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java
@@ -263,6 +263,12 @@ public class ResolvedServiceCatalog {
null, null, 5000L, null, ServiceProtocol.JSON,
protocols(ServiceProtocol.JSON),
Set.of("CodeDeploy_20141006."), Set.of("codedeploy"), Set.of(), Set.of()),
+ descriptor("codepipeline", "codepipeline", config.services().codepipeline().enabled(), true,
+ "codepipeline",
+ storageMode(config.storage().services().codepipeline().mode(), config.storage().mode()),
+ config.storage().services().codepipeline().flushIntervalMs(), null, ServiceProtocol.JSON,
+ protocols(ServiceProtocol.JSON),
+ Set.of("CodePipeline_20150709."), Set.of("codepipeline"), Set.of(), Set.of()),
descriptor("config", "configservice", config.services().configservice().enabled(), true,
null, null, 5000L, null, ServiceProtocol.JSON,
protocols(ServiceProtocol.JSON),
diff --git a/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineJsonHandler.java b/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineJsonHandler.java
new file mode 100644
index 0000000000..6cf105cdb9
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineJsonHandler.java
@@ -0,0 +1,21 @@
+package io.github.hectorvent.floci.services.codepipeline;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.core.Response;
+
+@ApplicationScoped
+public class CodePipelineJsonHandler {
+ private final CodePipelineService service;
+
+ @Inject
+ public CodePipelineJsonHandler(CodePipelineService service) {
+ this.service = service;
+ }
+
+ public Response handle(String action, JsonNode request, String region, String account) {
+ JsonNode response = service.handle(action, request, region, account);
+ return Response.ok(response).build();
+ }
+}
diff --git a/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java b/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java
new file mode 100644
index 0000000000..a238bd5860
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java
@@ -0,0 +1,1370 @@
+package io.github.hectorvent.floci.services.codepipeline;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import io.github.hectorvent.floci.core.common.AwsArnUtils;
+import io.github.hectorvent.floci.core.common.AwsException;
+import io.github.hectorvent.floci.core.storage.AccountAwareStorageBackend;
+import io.github.hectorvent.floci.core.storage.StorageBackend;
+import io.github.hectorvent.floci.core.storage.StorageFactory;
+import io.github.hectorvent.floci.services.codebuild.CodeBuildService;
+import io.github.hectorvent.floci.services.codebuild.model.Build;
+import io.github.hectorvent.floci.services.codedeploy.CodeDeployService;
+import io.github.hectorvent.floci.services.codedeploy.model.Deployment;
+import io.github.hectorvent.floci.services.codepipeline.model.CodePipelineExecution;
+import io.github.hectorvent.floci.services.codepipeline.model.CodePipelineExecution.ActionExecution;
+import io.github.hectorvent.floci.services.codepipeline.model.CodePipelinePipeline;
+import io.github.hectorvent.floci.services.codepipeline.model.CodePipelinePipeline.TransitionState;
+import io.github.hectorvent.floci.services.codepipeline.model.CodePipelineStoredItem;
+import io.github.hectorvent.floci.services.lambda.LambdaService;
+import io.github.hectorvent.floci.services.lambda.model.InvocationType;
+import io.github.hectorvent.floci.services.lambda.model.InvokeResult;
+import io.github.hectorvent.floci.services.s3.S3Service;
+import io.github.hectorvent.floci.services.s3.model.S3Object;
+import jakarta.annotation.PreDestroy;
+import jakarta.annotation.PostConstruct;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import org.jboss.logging.Logger;
+
+import java.nio.charset.StandardCharsets;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+@ApplicationScoped
+public class CodePipelineService {
+ private static final Logger LOG = Logger.getLogger(CodePipelineService.class);
+ private static final String DEFAULT_EXECUTION_MODE = "SUPERSEDED";
+ private static final String DEFAULT_PIPELINE_TYPE = "V1";
+ private static final long POLL_INTERVAL_MS = 100L;
+
+ private final AccountAwareStorageBackend pipelineStore;
+ private final AccountAwareStorageBackend executionStore;
+ private final AccountAwareStorageBackend itemStore;
+ private final ObjectMapper mapper;
+ private final CodeBuildService codeBuildService;
+ private final CodeDeployService codeDeployService;
+ private final LambdaService lambdaService;
+ private final S3Service s3Service;
+ private final ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
+ private final Map pipelineLocks = new ConcurrentHashMap<>();
+ private final Map runtimeArtifacts = new ConcurrentHashMap<>();
+
+ @Inject
+ @SuppressWarnings("unchecked")
+ public CodePipelineService(StorageFactory storageFactory, ObjectMapper mapper,
+ CodeBuildService codeBuildService, CodeDeployService codeDeployService,
+ LambdaService lambdaService, S3Service s3Service) {
+ this.pipelineStore = (AccountAwareStorageBackend) storageFactory.create(
+ "codepipeline", "codepipeline-pipelines.json", new TypeReference