Skip to content

Commit

Permalink
Add CI/CD GH infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Nov 23, 2023
1 parent 19f904e commit e24552f
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'type: bug, status: waiting-for-triage'
assignees: ''

---

**In what version(s) of Spring Functions Catalog are you seeing this issue?**

For example:

5.0.0

Between 5.0.0 and 5.1.0

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior.

**Expected behavior**

A clear and concise description of what you expected to happen.

**Sample**

A link to a GitHub repository with a [minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example).

Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Support
url: https://stackoverflow.com/questions/tagged/spring-functions-catalog
about: Please ask and answer questions on StackOverflow with the tag spring-functions-catalog
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'status: waiting-for-triage, type: enhancement'
assignees: ''

---

**Expected Behavior**

<!--- Tell us how it should work -->

**Current Behavior**

<!--- Explain the difference from current behavior -->

**Context**

<!---
How has this issue affected you?
What are you trying to accomplish?
What other alternatives have you considered?
Are you aware of any workarounds?
-->
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--
Thanks for contributing to Spring Functions Catalog.
Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #) or StackOverflow questions.
See the [Contributor Guidelines for more information](https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc).
-->
16 changes: 16 additions & 0 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI SNAPSHOT

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build-snapshot:
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@main
secrets:
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
10 changes: 10 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Pull Request Build

on:
pull_request:
branches:
- main

jobs:
build-pull-request:
uses: artembilan/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@main
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
workflow_dispatch:

run-name: Release current version for branch ${{ github.ref_name }}

jobs:
release:
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-release.yml@main
secrets:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
OSSRH_URL: ${{ secrets.OSSRH_URL }}
OSSRH_S01_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
OSSRH_S01_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
OSSRH_STAGING_PROFILE_NAME: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Verify Staged Artifacts

on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version like 5.0.0-M1, 5.1.0-RC1, 5.2.0 etc.'
required: true
type: string

jobs:
verify-staged-with-jfrog:
runs-on: ubuntu-latest
steps:

- uses: jfrog/setup-jfrog-cli@v3
env:
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

- name: Download Artifact from Staging Repo
run: |
fileToDownload=org/springframework/cloud/fn/mail-supplier/${{ inputs.releaseVersion }}/mail-supplier-${{ inputs.releaseVersion }}.jar
jfrog rt download libs-staging-local/$fileToDownload
if [ ! -f $fileToDownload ]
then
echo "::error title=No staged artifact::No mail-supplier-${{ inputs.releaseVersion }}.jar in staging repository"
exit 1
fi

0 comments on commit e24552f

Please sign in to comment.