Skip to content

Commit

Permalink
modified jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishsingh101 committed Apr 4, 2024
1 parent 9a25d46 commit 51eb8bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/trigger-jenkins.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
on: push
# on: push

jobs:
launch_jenkins_job:
name: trigger jenkins job
runs-on: ubuntu-latest
steps:
-
name: Trigger Jenkins Job
uses: sbitio/trigger-jenkins-job@master
# with:
# JENKINS_USER: ${{ secrets.JENKINS_USER }}
# JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
# JENKINS_HOST: ${{ secrets.JENKINS_HOST }}
# JENKINS_JOB: ${{ secrets.JENKINS_JOB }}
# jobs:
# launch_jenkins_job:
# name: trigger jenkins job
# runs-on: ubuntu-latest
# steps:
# -
# name: Trigger Jenkins Job
# uses: sbitio/trigger-jenkins-job@master
12 changes: 8 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ pipeline {
}
}
environment {
GIT_AUTHOR_NAME = "Ashish Singh"
GIT_COMMITTER_NAME = "Ashish Singh"
GIT_AUTHOR_NAME = "Jenkins"
GIT_COMMITTER_NAME = "Jenkins"
}

stages {

stage('Getting Commit Id of Last Push') {
steps {
script {
echo "bob started building"

env.LAST_PUSH = """${sh(
returnStdout: true,
script: '''
Expand Down Expand Up @@ -65,7 +67,7 @@ pipeline {
continue
}

echo "pushing file ${file} to s3 ........................"
echo "bob is pushing file ${file} to s3"

def s3Path = "s3://beckn-frontend-assets/${file}"

Expand Down Expand Up @@ -97,8 +99,10 @@ pipeline {

sh "git commit -m \"${commitMessage}\""
sh "git push"
// sh "git push origin ${branchName}"

echo "${SUMMARY}"

echo "bob builded successfully 😎"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ then

pathToPush="s3://$bucket/$asset"
push_asset $local_path $pathToPush
invalidate_asset $local_path
# invalidate_asset $local_path
fi

0 comments on commit 51eb8bc

Please sign in to comment.