Skip to content

Commit

Permalink
added files
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi9705 committed Aug 24, 2024
1 parent 6478c33 commit cf5aeec
Showing 1 changed file with 8 additions and 29 deletions.
37 changes: 8 additions & 29 deletions .github/workflows/mainPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

ShiftLeft_test:
runs-on: ubuntu-latest
if: false
# if: false
permissions:
actions: write
security-events: write
Expand Down Expand Up @@ -139,8 +139,8 @@ jobs:
Build_docker_Images:
runs-on: ubuntu-latest
# needs: ShiftLeft_test
if: false
needs: ShiftLeft_test
# if: false
steps:
- name: Checkout codes
uses: actions/checkout@v4
Expand All @@ -165,7 +165,7 @@ jobs:
Running_Stagging_Environment:
runs-on: self-hosted
# needs: Build_docker_Images
needs: Build_docker_Images
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -192,32 +192,10 @@ jobs:
echo "Starting new container 'forntend'."
sudo docker run -d -p 3000:3000 --name forntend wwag3/wednesdaywickedadventures:latest
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1


- name: Fetch EC2 Instance Public IP
id: ec2_ip
run: |
INSTANCE_ID=i-0609b0b289067d17d
PUBLIC_IP=$(aws ec2 describe-instances --instance-ids $INSTANCE_ID --query 'Reservations[0].Instances[0].PublicIpAddress' --output text)
echo "PUBLIC_IP=$PUBLIC_IP" >> $GITHUB_ENV
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-1




Chaos_Engineering:
runs-on: ubuntu-latest
needs: Running_Stagging_Environment
if: false
# if: false
steps:
- name: Checkout codes
uses: actions/checkout@v4
Expand All @@ -231,7 +209,7 @@ jobs:
- name: Trigger FIS Experiments
id: start_fis
run: |
for i in {1..2}; do
for i in {1..5}; do
echo "Running Chaos Engineering Experiment Iteration #$i"
FIS_EXP_ID=$(aws fis start-experiment --experiment-template-id EXTBY5y1A6MqkfjXn --query 'experiment.id' --output text)
echo "FIS_EXP_ID=$FIS_EXP_ID" >> $GITHUB_ENV
Expand Down Expand Up @@ -292,7 +270,8 @@ jobs:
Production_Environment:
runs-on: ubuntu-latest
needs: [Chaos_Engineering]
if: false
# needs: [Chaos_Engineering]
permissions: write-all
outputs:
target_url: ${{ steps.running-terraform-commands.outputs.target }}
Expand Down

0 comments on commit cf5aeec

Please sign in to comment.