Skip to content

Commit 5ad2955

Browse files
committed
Add Support for CI/CD Workflows
1 parent b03ab51 commit 5ad2955

File tree

20 files changed

+818
-242
lines changed

20 files changed

+818
-242
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ about: Create a report to help us improve
1818
<!-- If applicable, add screenshots to help explain your problem. -->
1919

2020
**System information**
21-
Operating system:
21+
Operating system:
22+
Browser:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
I want to merge this change because...
2-
1+
### Summary
32
<!-- Please mention all relevant issue numbers. -->
3+
Main Code:
4+
```
5+
6+
```
47

5-
# Impact
8+
### Pull Request Checklist
69

7-
* [ ] New migrations
8-
* [ ] New/Updated API fields or mutations
9-
* [ ] Deprecated API fields or mutations
10-
* [ ] Removed API types, fields, or mutations
11-
* [ ] Documentation needs to be updated
10+
<!-- Please keep this section. It will make maintainer's life easier. -->
1211

13-
# Pull Request Checklist
12+
1. [ ] Privileged views and APIs are guarded by proper permission checks.
13+
1. [ ] All visible strings are translated with proper context.
14+
1. [ ] All data-formatting is locale-aware (dates, numbers, and so on).
15+
1. [ ] Database queries are optimized and the number of queries is constant.
16+
1. [ ] Database migration files are up to date.
17+
1. [ ] The changes are tested.
18+
1. [ ] The code is documented (docstrings, project documentation).
19+
1. [ ] GraphQL schema and type definitions are up to date.
20+
1. [ ] Changes are mentioned in the changelog.
1421

15-
<!-- Please keep this section. It will make the maintainer's life easier. -->
22+
### Screenshots
1623

17-
* [ ] Privileged queries and mutations are guarded by proper permission checks
18-
* [ ] Database queries are optimized and the number of queries is constant
19-
* [ ] Database migration files are up to date
20-
* [ ] The changes are tested
21-
* [ ] GraphQL schema and type definitions are up to date
22-
* [ ] Changes are mentioned in the changelog
24+
<!-- If your changes affect the UI, providing "before" and "after" screenshots will
25+
greatly reduce the amount of work needed to review your work. -->

.github/stale.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/__init__

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../.google/cloud/__init__
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.google/cloud/builders/__init__
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
echo -e "WHOAMI\n$hr"
4+
whoami
5+
echo $HOME
6+
id
7+
8+
if [[ -x "$(command -v gcloud)" ]]
9+
then
10+
echo -e "$hr\nPROJECT CONFIG\n$hr"
11+
gcloud config list --all
12+
13+
echo -e "\n$hr\nSYSTEM INFO\n$hr"
14+
gcloud info
15+
python --version
16+
fi
17+
18+
echo -e "\n$hr\nHOME PROFILES\n$hr"
19+
ls -al $HOME
20+
21+
echo -e "$hr\nROOT PROFILES\n$hr"
22+
[[ "$(whoami)" == "root" ]] && ls -alL /root || sudo bash -c 'ls -alL /root'
23+
24+
echo -e "$hr\nSSH FILES\n$hr"
25+
echo $(whoami) /root/.ssh
26+
[[ "$(whoami)" == "root" ]] && ls -alL /root/.ssh || sudo bash -c 'ls -alL /root/.ssh'
27+
28+
echo -e "$hr\nBIN FILES\n$hr"
29+
echo $HOME/.local/bin
30+
ls -al $HOME/.local/bin
31+
32+
echo -e "\n$hr\nFILE SYSTEM\n$hr"
33+
df -h
34+
35+
echo -e "\n$hr\nALL REPOSITORY\n$hr"
36+
pwd
37+
ls -al /
38+
39+
echo -e "\n$hr\nCURRENT REPOSITORY\n$hr"
40+
pwd
41+
ls -al .
42+
43+
if [[ ! -x "$(command -v docker)" ]]
44+
then
45+
echo -e "\n$hr\nDOCKER VERSION\n$hr"
46+
docker version
47+
48+
echo -e "\n$hr\nDOCKER INFO\n$hr"
49+
docker info
50+
51+
echo -e "$hr\nIMAGE BUILDERS\n$hr"
52+
docker images --all | sort
53+
54+
echo -e "\n$hr\nCURRENTLY RUNNING\n$hr"
55+
docker ps
56+
fi

.github/workflows/init.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Init CI
2+
on:
3+
push:
4+
branches:
5+
- '*'
6+
- '!master'
7+
- '!deploy'
8+
- '!compose'
9+
- '!production'
10+
- '!development'
11+
- '!Chetabahana'
12+
jobs:
13+
job1:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Initializing Repositories
18+
run: |
19+
bash .github/workflows/builders/__init__
20+
env:
21+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
22+
GCP_ACCOUNT: ${{ secrets.GCP_ACCOUNT }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
!.flowconfig
1010
!.github
1111
!.gitignore
12+
!.google
1213
!.gqlconfig
1314
!.npmrc
1415
!.nvmrc

.google/cloud/__init__

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# Unmark the 2 line below to see all commands available
4+
#echo -e "\n$hr\nPATH COMMANDS\n$hr"
5+
#compgen -c | xargs which -a | sort && dpkg -l
6+
7+
# Collumn numbers
8+
COL=130
9+
case $HOME in
10+
/root) COL=140;;
11+
/builder/home) COL=180;;
12+
esac
13+
14+
printf -v res %${COL}s
15+
export hr=`printf '%s\n' "${res// /-}"`
16+
export hrd=`printf '%s\n' "${res// /=}"`
17+
18+
# Set Environtment
19+
export WORKSPACE=$(realpath .)
20+
export PATH=$HOME/.local/bin:$PATH
21+
22+
if [[ -n "${GITHUB_REPOSITORY+set}" ]]
23+
then
24+
[[ -z $TAG_NAME ]] && export TAG_NAME=ubuntu
25+
[[ -z $REPO_NAME ]] && export REPO_NAME=${GITHUB_REPOSITORY##*/}
26+
[[ -z $REPO_OWNER ]] && export REPO_OWNER=${GITHUB_REPOSITORY%/*}
27+
[[ -z $BRANCH_REF_HEADS ]] && export BRANCH_REF_HEADS=${GITHUB_REF##*/}
28+
[[ -z $BRANCH_NAME ]] && export BRANCH_NAME=$(basename $(git name-rev --name-only HEAD))
29+
[[ -z $PROJECT_ID ]] && export PROJECT_ID=$(echo "$REPO_OWNER" | tr '[:upper:]' '[:lower:]')
30+
fi
31+
32+
# Set the path to output volume
33+
( [[ -n "${TAG_REPO+set}" ]] && [[ "$REPO_NAME" == "github_"* ]] ) && export REPO_NAME=$TAG_REPO
34+
[[ -n "${RUNNER_WORKSPACE+set}" ]] && export OUTPUTS_VOLUME=$RUNNER_WORKSPACE/outputs/volume
35+
[[ -n "${BUILDER_OUTPUT+set}" ]] && export OUTPUTS_VOLUME=/builder/outputs/volume
36+
[[ -z "${OUTPUTS_VOLUME}" ]] && export OUTPUTS_VOLUME=$RWORKSPACE/outputs
37+
[[ -z "${DEBIAN_FRONTEND}" ]] && export DEBIAN_FRONTEND=noninteractive
38+
[[ -n "${INVOCATION_ID+set}" ]] && export BUILD_ID=${INVOCATION_ID}
39+
[[ ! -d $OUTPUTS_VOLUME ]] && mkdir -p $OUTPUTS_VOLUME

0 commit comments

Comments
 (0)