-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OTE-894] Pipeline test main replica #2547
base: main
Are you sure you want to change the base?
Changes from all commits
ae2e6ce
0ee20a7
74f627d
8fb5385
4cf57b5
f9e50ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Deploy indexer to staging | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
on-merge: | ||
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'pipeline-main-replica' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Echo Hello World | ||
run: echo "Hello World" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add newline at end of file Add a newline character at the end of the file to comply with YAML best practices. - name: Echo Hello World
run: echo "Hello World"
+
🧰 Tools🪛 yamllint
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,13 @@ | ||||||||||||||
name: Snapshot indexer staging | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve naming inconsistency between workflow name and filename The workflow name "Snapshot indexer staging" doesn't match the filename "pipeline-indexer-testnet-promotion.yml" which mentions testnet. This could cause confusion about whether this workflow is for staging or testnet environment. -name: Snapshot indexer staging
+name: Pipeline indexer testnet promotion 📝 Committable suggestion
Suggested change
|
||||||||||||||
|
||||||||||||||
on: | ||||||||||||||
schedule: | ||||||||||||||
# 12pm ET from Mar to Oct, 1pm ET from Nov to Feb due to daylight saving | ||||||||||||||
- cron: '0 16 * * *' | ||||||||||||||
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify cron schedule timezone calculation The cron expression
To run at 12pm ET (March-October) and 1pm ET (November-February), use: - - cron: '0 16 * * *'
+ - cron: '0 17 * * *' # 1pm ET (Nov-Feb) / 12pm ET (Mar-Oct) 📝 Committable suggestion
Suggested change
|
||||||||||||||
jobs: | ||||||||||||||
deploy: | ||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename job to match its current purpose The job name 'deploy' implies deployment functionality, but the job currently only outputs "Hello World". This could be misleading for other developers. If this is a placeholder: - deploy:
+ placeholder: If this will be a deployment job, please implement proper deployment steps including:
|
||||||||||||||
|
||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix YAML formatting issues There are two minor formatting issues:
runs-on: ubuntu-latest
-
+
steps:
- name: Echo Hello World
- run: echo "Hello World"
+ run: echo "Hello World"
+ Also applies to: 13-13 🧰 Tools🪛 yamllint
|
||||||||||||||
steps: | ||||||||||||||
- name: Echo Hello World | ||||||||||||||
run: echo "Hello World" | ||||||||||||||
Comment on lines
+1
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Add environment, permissions, and manual trigger to the promotion workflow The workflow requires several critical security and usability improvements:
Required changes:
🔗 Analysis chainVerify workflow triggers and permissions Since this is a promotion pipeline that likely involves deployments, we should verify:
Let me check the content of the related workflows to better understand the environment configurations and permissions. Let me check the content of the deployment workflows to understand the complete context. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for environment configurations and other workflow permissions
echo "Checking for environment configurations..."
rg -l "environment:" .github/workflows/
echo "Checking for workflow permissions..."
rg -l "permissions:" .github/workflows/
Length of output: 444 Script: #!/bin/bash
# Check content of workflows with environment configurations
echo "Content of indexer-reusable-build-and-push-ecs-service.yml:"
cat .github/workflows/indexer-reusable-build-and-push-ecs-service.yml
echo -e "\nContent of indexer-build-and-push-lambda.yml:"
cat .github/workflows/indexer-build-and-push-lambda.yml
# Check if there are any other promotion or deployment workflows
echo -e "\nChecking for other promotion workflows:"
rg -l "promotion|deploy" .github/workflows/
Length of output: 4509 Script: #!/bin/bash
# Check content of deployment workflows
echo "Content of deploy-to-dev.yml:"
cat .github/workflows/deploy-to-dev.yml
echo -e "\nContent of pipeline-indexer-testnet-promotion.yml:"
cat .github/workflows/pipeline-indexer-testnet-promotion.yml
# Check if there are any environment protection rules in other workflows
echo -e "\nChecking for environment protection rules:"
rg "environment:" -A 5 -B 5 .github/workflows/
Length of output: 10312 🧰 Tools🪛 yamllint
Comment on lines
+11
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implement required promotion pipeline steps The current implementation appears to be a placeholder. A promotion pipeline typically requires several essential steps: Consider implementing these critical steps: steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Promote indexer
run: |
# Add promotion logic here
set -e
# Example:
# - Verify current deployment
# - Update deployment tags
# - Deploy to target environment
# - Run health checks
- name: Notify status
if: always()
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: "Indexer promotion to testnet ${{ job.status }}" Would you like me to help create a complete implementation of the promotion pipeline? 🧰 Tools🪛 yamllint
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add security configurations and environment protection
The job configuration needs security enhancements:
📝 Committable suggestion