Skip to content

Commit

Permalink
changing runscan version
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-rawat-akto committed Nov 1, 2023
1 parent 03966f6 commit 7fb4d6a
Showing 1 changed file with 73 additions and 73 deletions.
146 changes: 73 additions & 73 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,78 +55,78 @@ jobs:
id: docker_tag
# run: echo "IMAGE_TAG=${{ github.event.inputs.Tag }}_$(echo ${{ github.ref_name }} | sed 's/[^a-zA-Z0-9]/_/g')" >> $GITHUB_OUTPUT
run: echo "IMAGE_TAG=akto_staging1_feature_github_comments_cicd_test" >> $GITHUB_OUTPUT
- name: Download Akto templates zip
working-directory: ./apps/dashboard/src/main/resources
run: wget -O test-library-master.zip https://github.com/akto-api-security/tests-library/archive/refs/heads/master.zip
- name: Prepare Dashboard UI
working-directory: ./apps/dashboard/
run: npm install && export RELEASE_VERSION=${{steps.docker_tag.outputs.IMAGE_TAG}} && npm run build
- name: Prepare Dashboard polaris UI
working-directory: ./apps/dashboard/web/polaris_web
run: npm install && export RELEASE_VERSION=${{steps.docker_tag.outputs.IMAGE_TAG}} && npm run build
- name: Configure AWS Credentials
# if: ${{ github.event.inputs.Environment == 'prod' }}
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: ap-south-1

- name: Deploy static site to S3 bucket
# if: ${{ github.event.inputs.Environment == 'prod' }}
run: aws s3 sync ./apps/dashboard/web/dist s3://dashboard-on-cdn/web/${{steps.docker_tag.outputs.IMAGE_TAG}}/dist --delete
- name: Deploy polaris site to S3 bucket
# if: ${{ github.event.inputs.Environment == 'prod' }}
run: aws s3 sync ./apps/dashboard/web/polaris_web/web/dist s3://dashboard-on-cdn/polaris_web/${{steps.docker_tag.outputs.IMAGE_TAG}}/dist --delete

- run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}}
- name: DockerHub login
# if: ${{ github.event.inputs.Environment == 'prod' }}
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Build, tag, and push the image to DockerHub
# if: ${{ github.event.inputs.Environment == 'prod' }}
id: build-image-dockerhub
env:
ECR_REGISTRY: aktosecurity
ECR_REPOSITORY: akto-api-security
IMAGE_TAG: ${{ steps.docker_tag.outputs.IMAGE_TAG }}
IMAGE_TAG_DASHBOARD: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-security-dashboard:flash' || '' }}
IMAGE_TAG_TESTING: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-testing:flash' || '' }}
IMAGE_TAG_TESTING_CLI: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-testing-cli:flash' || '' }}
run: |
docker buildx create --use
# Build a docker container and push it to DockerHub
cd apps/dashboard
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY-dashboard:$IMAGE_TAG $IMAGE_TAG_DASHBOARD . --push
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY-dashboard:$IMAGE_TAG"
cd ../testing
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing:$IMAGE_TAG $IMAGE_TAG_TESTING . --push
echo "::set-output name=image::$ECR_REGISTRY/akto-api-testing:$IMAGE_TAG"
cd ../testing-cli
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing-cli:$IMAGE_TAG $IMAGE_TAG_TESTING_CLI . --push
echo "::set-output name=image::$ECR_REGISTRY/akto-api-testing-cli:$IMAGE_TAG"
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

# - name: Download Akto templates zip
# working-directory: ./apps/dashboard/src/main/resources
# run: wget -O test-library-master.zip https://github.com/akto-api-security/tests-library/archive/refs/heads/master.zip
# - name: Prepare Dashboard UI
# working-directory: ./apps/dashboard/
# run: npm install && export RELEASE_VERSION=${{steps.docker_tag.outputs.IMAGE_TAG}} && npm run build
# - name: Prepare Dashboard polaris UI
# working-directory: ./apps/dashboard/web/polaris_web
# run: npm install && export RELEASE_VERSION=${{steps.docker_tag.outputs.IMAGE_TAG}} && npm run build
# - name: Configure AWS Credentials
## if: ${{ github.event.inputs.Environment == 'prod' }}
# 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: ap-south-1
#
# - name: Deploy static site to S3 bucket
## if: ${{ github.event.inputs.Environment == 'prod' }}
# run: aws s3 sync ./apps/dashboard/web/dist s3://dashboard-on-cdn/web/${{steps.docker_tag.outputs.IMAGE_TAG}}/dist --delete
# - name: Deploy polaris site to S3 bucket
## if: ${{ github.event.inputs.Environment == 'prod' }}
# run: aws s3 sync ./apps/dashboard/web/polaris_web/web/dist s3://dashboard-on-cdn/polaris_web/${{steps.docker_tag.outputs.IMAGE_TAG}}/dist --delete
#
# - run: mvn package -Dakto-image-tag=${{ github.event.inputs.Tag }} -Dakto-build-time=$(eval "date +%s") -Dakto-release-version=${{steps.docker_tag.outputs.IMAGE_TAG}}
# - name: DockerHub login
## if: ${{ github.event.inputs.Environment == 'prod' }}
# env:
# DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
# DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
# run: |
# docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
# - name: Build, tag, and push the image to DockerHub
## if: ${{ github.event.inputs.Environment == 'prod' }}
# id: build-image-dockerhub
# env:
# ECR_REGISTRY: aktosecurity
# ECR_REPOSITORY: akto-api-security
# IMAGE_TAG: ${{ steps.docker_tag.outputs.IMAGE_TAG }}
# IMAGE_TAG_DASHBOARD: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-security-dashboard:flash' || '' }}
# IMAGE_TAG_TESTING: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-testing:flash' || '' }}
# IMAGE_TAG_TESTING_CLI: ${{ github.event.inputs.Deploy == 'true' && '-t aktosecurity/akto-api-testing-cli:flash' || '' }}
# run: |
# docker buildx create --use
# # Build a docker container and push it to DockerHub
# cd apps/dashboard
# docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY-dashboard:$IMAGE_TAG $IMAGE_TAG_DASHBOARD . --push
# echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY-dashboard:$IMAGE_TAG"
# cd ../testing
# docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing:$IMAGE_TAG $IMAGE_TAG_TESTING . --push
# echo "::set-output name=image::$ECR_REGISTRY/akto-api-testing:$IMAGE_TAG"
# cd ../testing-cli
# docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing-cli:$IMAGE_TAG $IMAGE_TAG_TESTING_CLI . --push
# echo "::set-output name=image::$ECR_REGISTRY/akto-api-testing-cli:$IMAGE_TAG"
#
# - name: Set up JDK 11
# uses: actions/setup-java@v1
# with:
# java-version: 11
# - name: Cache SonarCloud packages
# uses: actions/cache@v1
# with:
# path: ~/.sonar/cache
# key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar
# - name: Cache Maven packages
# uses: actions/cache@v1
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
#
deploy:
# if: ${{ github.event.inputs.Environment == 'prod' && github.event.inputs.Deploy == 'true' }}
needs: build
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
# run: bash ./.github/scripts/akto-testsigma.sh
#
- name: Run Akto CI/CD tests
uses: shivam-rawat-akto/run-scan@v1.0.8
uses: shivam-rawat-akto/run-scan@v1.0.9
with:
AKTO_DASHBOARD_URL: https://flash.staging.akto.io
AKTO_API_KEY: ${{secrets.AKTO_API_KEY}}
Expand Down

0 comments on commit 7fb4d6a

Please sign in to comment.