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
module.exports = async (robot) => { | |
robot.hear (`@deployer`,async (bot) => { | |
bot.send(`Roger that! Please wait.`); | |
bot.send(`Github Action has been triggered successfully`); | |
}); | |
} |
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
robot.hear (`@${process.env.BOT_ID}`,async (bot) => { | |
// @deploy api featurex to production | |
const payload = bot.message.text.split(" ") | |
const service = payload[2]; | |
const branch = payload[3]; | |
const environment = payload[5]; | |
const username = bot.message.user.name; | |
bot.send(`Roger that! Please wait.`); | |
if(!validateCommand(bot,username,service,branch,environment)) { | |
return; |
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: deploy | |
on: | |
repository_dispatch: | |
types: [deploy-service] | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest |
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
# Build Stage 1 | |
# This build created a staging docker image | |
# | |
FROM node:10.15.2-alpine AS appbuild | |
WORKDIR /usr/src/app | |
COPY package.json ./ | |
RUN npm install | |
COPY ./src ./src | |
# Build Stage 2 |
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 express = require('express') | |
const app = express() | |
const port = 8080 | |
app.get('/', (req, res) => { | |
res.send('hello world') | |
}) | |
app.get('/healthcheck', (req, res) => { |
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
provider "google-beta" { | |
credentials = "${file(var.credential_file_path)}" | |
project = var.project | |
region = var.region | |
version = "~> 3.43" | |
} | |
terraform { | |
backend "gcs" { | |
prefix = "api" |
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
package main | |
import ( | |
"os" | |
"os/exec" | |
"github.com/ujwaldhakal/go-gcp-docker-utils/docker" | |
"github.com/ujwaldhakal/go-gcp-docker-utils/git" | |
"github.com/ujwaldhakal/go-gcp-docker-utils/utils" | |
) |
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: Build and Push | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_publish_gcr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 |