Skip to content

Commit

Permalink
[DSD-5387] added .github
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshithb1 <[email protected]>
  • Loading branch information
Rakshithb1 committed May 31, 2024
1 parent 979559d commit 3da55df
Show file tree
Hide file tree
Showing 6 changed files with 231 additions and 0 deletions.
Binary file added .github/keys/mosipgpgkey_pub.gpg
Binary file not shown.
Binary file added .github/keys/mosipgpgkey_sec.gpg
Binary file not shown.
62 changes: 62 additions & 0 deletions .github/workflows/chart-lint-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Validate / Publish helm charts

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'charts/**'
workflow_dispatch:
inputs:
IGNORE_CHARTS:
description: 'Provide list of charts to be ignored separated by pipe(|)'
required: false
default: ''
type: string
CHART_PUBLISH:
description: 'Chart publishing to gh-pages branch'
required: false
default: 'NO'
type: string
options:
- YES
- NO
INCLUDE_ALL_CHARTS:
description: 'Include all charts for Linting/Publishing (YES/NO)'
required: false
default: 'NO'
type: string
options:
- YES
- NO
push:
branches:
- '!release-branch'
- master
- 1.*
- 0.*
- develop
- MOSIP*
- release*
paths:
- './helm/**'

jobs:
chart-lint-publish:
uses: mosip/kattu/.github/workflows/chart-lint-publish.yml@master
with:
CHARTS_DIR: ./helm
CHARTS_URL: https://mosip.github.io/mosip-helm
REPOSITORY: mosip-helm
BRANCH: gh-pages
INCLUDE_ALL_CHARTS: "${{ inputs.INCLUDE_ALL_CHARTS || 'NO' }}"
IGNORE_CHARTS: "${{ inputs.IGNORE_CHARTS ||'redis' }}"
CHART_PUBLISH: "${{ inputs.CHART_PUBLISH || 'YES' }}"
LINTING_CHART_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-schema.yaml"
LINTING_LINTCONF_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/lintconf.yaml"
LINTING_CHART_TESTING_CONFIG_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-testing-config.yaml"
LINTING_HEALTH_CHECK_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/health-check-schema.yaml"
secrets:
TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
87 changes: 87 additions & 0 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Maven Package upon a push

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
message:
description: 'Message for manually triggering'
required: false
default: 'Triggered for Updates'
type: string
push:
branches:
- '!release-branch'
- master
- 1.*
- develop
- MOSIP*
- release*
- INJICERT-13

jobs:
build-maven-inji-certify:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
with:
SERVICE_LOCATION: ./
BUILD_ARTIFACT: inji-certify
secrets:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' }}"
needs: build-maven-inji-certify
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master
with:
SERVICE_LOCATION: ./
secrets:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_URL: ${{ secrets.OSSRH_SNAPSHOT_URL }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}


build-dockers:
needs: build-maven-inji-certify
strategy:
matrix:
include:
- SERVICE_LOCATION: 'certify-service'
SERVICE_NAME: 'inji-certify'
BUILD_ARTIFACT: 'inji-certify'
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
secrets:
DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

sonar_analysis:
needs: build-maven-inji-certify
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
with:
SERVICE_LOCATION: ./
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_KEY: ${{ secrets.ORG_KEY }}
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
29 changes: 29 additions & 0 deletions .github/workflows/release-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release/pre-release Preparation.

on:
workflow_dispatch:
inputs:
MESSAGE:
description: 'Triggered for release or pe-release'
required: false
default: 'Release Preparation'
RELEASE_TAG:
description: 'tag to update'
required: true
SNAPSHOT_TAG:
description: 'tag to be replaced'
required: true
BASE:
description: 'base branch for PR'
required: true
jobs:
maven-release-preparation:
uses: mosip/kattu/.github/workflows/release-changes.yml@master
with:
MESSAGE: ${{ inputs.MESSAGE }}
RELEASE_TAG: ${{ inputs.RELEASE_TAG }}
SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }}
BASE: ${{ inputs.BASE }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
ACTION_PAT: ${{ secrets.ACTION_PAT }}
53 changes: 53 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tagging of repos

on:
workflow_dispatch:
inputs:
TAG:
description: 'Tag to be published'
required: true
type: string
BODY:
description: 'Release body message'
required: true
default: 'Changes in this Release'
type: string
PRE_RELEASE:
description: 'Pre-release? True/False'
required: false
default: 'false'
type: string
DRAFT:
description: 'Draft? True/False'
required: false
default: 'false'
type: string
ONLY_TAG:
description: "Only Tag"
required: false
type: string
default: 'false'
BRANCH:
description: 'Branch name'
required: true
type: string
LATEST:
description: 'Latest release'
required: false
type: string
default: 'true'

jobs:
tag-branch:
uses: mosip/kattu/.github/workflows/tag.yml@master
with:
TAG: ${{ inputs.TAG }}
BODY: ${{ inputs.BODY }}
PRE_RELEASE: ${{ inputs.PRE_RELEASE }}
DRAFT: ${{ inputs.DRAFT }}
ONLY_TAG: ${{ inputs.ONLY_TAG }}
BRANCH: ${{ inputs.BRANCH }}
LATEST: ${{ inputs.LATEST }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
TOKEN: ${{ secrets.ACTION_PAT }}

0 comments on commit 3da55df

Please sign in to comment.