Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/magento-cloud-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string
required: true
environment:
description: "Target environment (integration/staging/production)"
description: "Target environment (integration/staging/staging2/production)"
type: string
required: false
default: "integration"
Expand Down Expand Up @@ -84,8 +84,9 @@ jobs:

if [ "${INPUTS_ENVIRONMENT}" != "integration" ] && \
[ "${INPUTS_ENVIRONMENT}" != "staging" ] && \
[ "${INPUTS_ENVIRONMENT}" != "staging2" ] && \
[ "${INPUTS_ENVIRONMENT}" != "production" ]; then
echo "❌ Error: environment must be one of: integration, staging, production"
echo "❌ Error: environment must be one of: integration, staging, staging2, production"
exit 1
fi

Expand Down Expand Up @@ -159,8 +160,8 @@ jobs:
echo "Deploying to integration environment..."
magento-cloud push --force --wait $debug
;;
"staging"|"production")
# Push to staging/production branch
"staging"|"staging2"|"production")
# Push to staging/staging2/production branch
echo "Deploying to ${INPUTS_ENVIRONMENT} environment..."
magento-cloud push --environment "${INPUTS_ENVIRONMENT}" --force --wait $debug
;;
Expand Down Expand Up @@ -227,6 +228,11 @@ jobs:
echo "Staging environment updated successfully:" >> $GITHUB_STEP_SUMMARY
echo "**[$DEPLOY_URL]($DEPLOY_URL)**" >> $GITHUB_STEP_SUMMARY
;;
"staging2")
echo "### 🚧 Staging2 Environment" >> $GITHUB_STEP_SUMMARY
echo "Staging2 environment updated successfully:" >> $GITHUB_STEP_SUMMARY
echo "**[$DEPLOY_URL]($DEPLOY_URL)**" >> $GITHUB_STEP_SUMMARY
;;
*)
echo "### 🔧 Integration Environment" >> $GITHUB_STEP_SUMMARY
echo "Integration environment deployed for testing:" >> $GITHUB_STEP_SUMMARY
Expand Down
4 changes: 2 additions & 2 deletions docs/magento-cloud-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A simple Magento Cloud deployment workflow that pushes code to your Magento Cloud git repository with optional NewRelic monitoring and CST reporting.

#### **Features**
- **Multi-environment support**: integration, staging, and production deployments
- **Multi-environment support**: integration, staging, staging2 and production deployments
- **Simple git push**: No composer install, patching, or building - just pushes code
- **NewRelic integration**: Optional deployment markers for tracking deployment lifecycle (start/complete)
- **CST system integration**: Optional composer.lock reporting to Confidentiality and Security Team
Expand All @@ -15,7 +15,7 @@ A simple Magento Cloud deployment workflow that pushes code to your Magento Clou
|------|----------|------|---------|-------------|
| **Magento Cloud Configuration** |
| magento-cloud-project-id | ✅ | string | | Magento Cloud project ID (required) |
| environment | ❌ | string | integration | Target environment (integration/staging/production) |
| environment | ❌ | string | integration | Target environment (integration/staging/staging2/production) |
| **Monitoring and Reporting** |
| newrelic-app-id | ❌ | string | | NewRelic application ID for deployment markers (optional) |
| **CST Reporting Configuration** |
Expand Down