arun9theja / Tetris-V1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Tetris V1

Tetris game built with React

React tetris

Use Sonarqube block

environment {
        SCANNER_HOME=tool 'sonar-scanner'
      }

stage("Sonarqube Analysis "){
            steps{
                withSonarQubeEnv('sonar-server') {
                    sh ''' $SCANNER_HOME/bin/sonar-scanner -Dsonar.projectName=Amazon \
                    -Dsonar.projectKey=Amazon '''
                }
            }
        }

Owasp block

stage('OWASP FS SCAN') {
            steps {
                dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'DP-Check'
                dependencyCheckPublisher pattern: '**/dependency-check-report.xml'
            }
        }

ARGO CD SETUP

https://archive.eksworkshop.com/intermediate/290_argocd/install/

Image updater stage

 environment {
    GIT_REPO_NAME = "Tetris-manifest"
    GIT_USER_NAME = "Aj7Ay"
  }
    stage('Checkout Code') {
      steps {
        git branch: 'main', url: 'https://github.com/Aj7Ay/Tetris-manifest.git'
      }
    }

    stage('Update Deployment File') {
      steps {
        script {
          withCredentials([string(credentialsId: 'github', variable: 'GITHUB_TOKEN')]) {
            // Determine the image name dynamically based on your versioning strategy
            NEW_IMAGE_NAME = "sevenajay/tetris77:latest"

            // Replace the image name in the deployment.yaml file
            sh "sed -i 's|image: .*|image: $NEW_IMAGE_NAME|' deployment.yml"

            // Git commands to stage, commit, and push the changes
            sh 'git add deployment.yml'
            sh "git commit -m 'Update deployment image to $NEW_IMAGE_NAME'"
            sh "git push https://${GITHUB_TOKEN}@github.com/${GIT_USER_NAME}/${GIT_REPO_NAME} HEAD:main"
          }
        }
      }
    }

About


Languages

Language:JavaScript 48.4%Language:CSS 18.1%Language:HCL 16.9%Language:HTML 10.7%Language:Shell 4.9%Language:Dockerfile 1.0%