feat(samples): add Unity build pipeline with TeamCity integration#775
feat(samples): add Unity build pipeline with TeamCity integration#775gabebatista wants to merge 1 commit intomainfrom
Conversation
0341cee to
c9be979
Compare
8318d2c to
96ba3fa
Compare
96ba3fa to
06fc1ff
Compare
joshral7459
left a comment
There was a problem hiding this comment.
Minor issues that prevent progress. Would be happy to do a working session and step through the deployment together.
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Outdated
Show resolved
Hide resolved
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Outdated
Show resolved
Hide resolved
samples/unity-build-pipeline/docker/teamcity-unity-build-agent/Dockerfile
Show resolved
Hide resolved
| # Navigate to your workspace root | ||
| cd ~/perforce/<workspace-name>/ |
There was a problem hiding this comment.
My workspace root defaulted to my current directory which happened to be the unity sample folder in the toolkit. Did i miss a step to set it to something else?
There was a problem hiding this comment.
The workspace location is not explicitly defined in that command. When you run:
p4 client -o -S //game/main | p4 client -i
Here's what happens:
Where the location comes from:
p4 client -ogenerates a client spec template with Perforce's default values- The Root: field in that spec determines the workspace location
- By default, Perforce sets Root: to your current working directory (where you run the command)
The command breakdown:
p4 client -o- Output a client spec template-S //game/main- Base it on the stream //game/main| p4 client -i- Pipe that spec to create the client
To control the workspace location:
You need to modify the client spec before piping it to p4 client -i. Here are better approaches:
Option 1: Set it explicitly
p4 client -o -S //game/main | \
sed 's|^Root:.*|Root: /path/to/your/workspace|' | \
p4 client -i
Option 2: Run from your desired directory
cd /path/to/your/workspace
p4 client -o -S //game/main | p4 client -i
Option 3: Edit manually
p4 client -S //game/main
# This opens an editor where you can set the Root field manually
The Root: field in the generated spec is what defines where files will be synced to on your local machine.
|
|
||
| **Step 2.1: Initial Access** | ||
|
|
||
| Visit `https://swarm.yourdomain.com` in your browser. On first access, Swarm will: |
There was a problem hiding this comment.
I was not able to access the swarm server at all.
|
|
||
| **Step 3.1: Complete Initial Setup Wizard** | ||
|
|
||
| 1. Visit `https://teamcity.yourdomain.com` |
There was a problem hiding this comment.
also was not able to access. When i did nslookup in the beginning, there were no errors
0afc884 to
1d59fe2
Compare
1d59fe2 to
996312e
Compare
| alias { | ||
| name = module.perforce.shared_application_load_balancer_dns_name | ||
| zone_id = module.perforce.shared_application_load_balancer_zone_id | ||
| evaluate_target_health = true | ||
| } | ||
| } |
There was a problem hiding this comment.
Since the NLB is the public entry point, the record should point to the NLB alias rather than the ALB
| project_prefix = local.project_prefix | ||
| vpc_id = aws_vpc.unity_pipeline_vpc.id | ||
|
|
||
| create_route53_private_hosted_zone = true |
There was a problem hiding this comment.
is the intention to create a 2nd hosted zone for perforce and its subdomains as defined in the perforce module, route53 file?
Issue number: N/A
Summary
Changes
This PR adds a new Unity build pipeline sample demonstrating how to deploy a production-ready Unity CI/CD infrastructure on AWS. The sample integrates Perforce (version control with code review), TeamCity
(CI/CD), Unity Accelerator (asset caching), and Unity Floating License Server with comprehensive documentation and a Docker image for Unity TeamCity build agents.
User experience
Before: Users had no reference sample showing how to deploy a complete Unity build pipeline on AWS. Individual Unity module documentation existed, but integration patterns were unclear.
After: Users can deploy a production-ready Unity build pipeline with
terraform apply, following clear step-by-step documentation. The sample demonstrates best practices for integrating all componentswith proper networking, security, and DNS configuration.
Testing This PR
To test this sample:
samples/unity-build-pipeline/README.mdto understand the architecture and deployment stepssamples/unity-build-pipeline/docker/teamcity-unity-build-agent/and run./build-and-push.shto verify the Unity TeamCity agent image builds successfully (~20minutes)
terraform initandterraform validatein the sample directoryterraform.tfvars.exampleandvariables.tffor proper variable definitionsterraform.tfvarswith your Route53 domain, license server zip path, and TeamCity agent image URIterraform applyto deploy all componentshttps://swarm.yourdomain.comand verify login with Perforce credentialsterraform output -raw teamcity_url