This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { IncomingWebhook } = require('@slack/webhook'); | |
const url = '[ENTER_YOUR_SLACK_TOKEN]'; | |
const webhook = new IncomingWebhook(url); | |
// subscribeSlack is the main function called by Cloud Functions. | |
module.exports.subscribeSlack = (pubSubEvent, context) => { | |
const build = eventToBuild(pubSubEvent.data); | |
const status = ['SUCCESS', 'FAILURE', 'INTERNAL_ERROR', 'TIMEOUT', 'CANCELLED']; | |
if (status.indexOf(build.status) === -1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is for dependent pipeline, due to names it would be appearing below plan file. | |
steps: | |
- id: 'Pre Trigger Status Message' | |
name: 'alpine/curl' | |
entrypoint: sh | |
args: | |
- -c | |
- | | |
curl -X POST -H 'Content-type: application/json' --data '{"channel":"${_CHANNEL_ID}","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Build Started for *$TRIGGER_NAME*"}}]}' "${_SLACK_WEBHOOK}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file only contains function logic of GCE Machine Image for Windows VM. | |
# for full code visit: https://github.com/r4rohan/cloud-scripts/blob/main/scripts/windows/windows-machine-image.ps1 | |
. | |
. | |
. | |
function Machine_Image | |
{ | |
param | |
( | |
[string] $vmName, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-StrictMode -Version Latest; | |
$ErrorActionPreference = "Stop"; | |
<# | |
.SYNOPSIS | |
This function calls the gcloud binary | |
.PARAMETER Arguments | |
Array of arguments to be passed to gcloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"account_file": "{{ env `GOOGLE_APPLICATION_CREDENTIALS` }}" | |
}, | |
"builders": [ | |
{ | |
"type": "googlecompute", | |
"project_id": "GCP_PROJECT_ID", | |
"source_image_family": "ubuntu-2004-lts", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Hello World Spring Boot Demo Service | |
[Service] | |
User=ubuntu | |
#change this to your workspace | |
WorkingDirectory=/home/ubuntu/exec-script | |
#path to executable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
- docker:18.09.9-dind | |
cache: | |
paths: | |
- .m2/repository | |
before_script: | |
- source ci/script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: terraform-automation | |
on: | |
push: | |
paths: | |
- 'examples/**' | |
concurrency: | |
group: ${{ github.action == 'terraform-automation' }} | |
cancel-in-progress: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# enter Google Cloud Platform Project ID in environment section and update GitHub URL in git clone stage | |
pipeline { | |
agent { | |
kubernetes { | |
defaultContainer 'jnlp' | |
yaml """ | |
apiVersion: v1 | |
kind: Pod | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backend DEV | |
# Replace {enter-your-GCP-Project-ID} with Google Cloud Platform Project ID | |
name: omegatrade-backend-dev | |
on: | |
push: | |
branches: [ main ] | |
defaults: |
NewerOlder