Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gcp-hackathon-2022
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Tehami
gcp-hackathon-2022
Commits
92bd63df
Commit
92bd63df
authored
Oct 18, 2022
by
Asad Ullah Khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added jenkinsfile
parent
44d5b176
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
Jenkinsfile
Jenkinsfile
+49
-0
No files found.
Jenkinsfile
0 → 100644
View file @
92bd63df
pipeline
{
agent
{
label
'master'
}
environment
{
GCLOUD_PATH
=
"/home/asad/google-cloud-sdk/bin"
}
stages
{
stage
(
'build'
)
{
steps
{
echo
"Hello World!"
sh
"""
echo "Atrifact version is "$artifactVersion
echo "Atrifact name is "$artifactName
echo "Atrifact Environment is "$environment
echo ${env.JOB_NAME}
echo ${BUILD_NUMBER}
"""
}
}
}
post
{
always
{
script
{
sh
"""
cat <<'EOF' > output.json
{
"artifactName": "$artifactName",
"artifactVersion": "$artifactVersion",
"environment": "$environment",
"requesterEmail": "$requesterEmail",
"approverEmail": "$approverEmail",
"projectName": "$projectName",
"intendID": "$intendID",
"jobId": "$BUILD_NUMBER"
}
"""
sh
'cat output.json'
sh
'cat output.json | jq "." '
sh
'$GCLOUD_PATH/gcloud pubsub topics publish trigger-func-db --message "$(cat output.json | jq ".")"'
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment