Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: token-plugin-pr
on:
pull_request:
branches:
- master
- gha-ubuntu-20.04
- ubuntu-20.04
- ubuntu-20.04-upgrade
- Devcontainers
- GHARefactoring
paths:
- '**.py'
- '.github/**'
workflow_dispatch:

jobs:
workflow-setup:
name: Initialize Workflow
runs-on: ubuntu-latest
outputs:
CACHE_KEY_BUILD: ${{ steps.setup.outputs.CACHE_KEY_BUILD }}
UBUNTU_VERSION: ${{ steps.setup.outputs.UBUNTU_VERSION }}
# Expose the lowercase version of the GitHub repository name
# to all subsequent jobs that reference image repositories
# as the push and pull operations require the URL of the repository
# to be in lowercase.
GITHUB_REPOSITORY_NAME: ${{ steps.setup.outputs.GITHUB_REPOSITORY_NAME }}
distribution: ${{ steps.setup.outputs.distribution }}
publish: ${{ steps.setup.outputs.publish }}
testsNeeded: ${{ steps.testsNeeded.outputs.testsNeeded }}
steps:
- name: checkout source code
uses: actions/checkout@v2
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
- name: testsNeeded
id: testsNeeded
uses: dorny/paths-filter@v2
with:
filters: |
testsNeeded:
- '**.py'
- '.github/**'

lint:
name: Lint
needs: [workflow-setup]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1

build-image:
name: Create Builder Image
needs: [workflow-setup, lint]
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
with:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/token-plugin-build
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

token-plugin-tests:
name: Token Plugin Tests
needs: [workflow-setup, build-image]
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

build-packages:
name: Token Plugin Build package
needs: [workflow-setup, token-plugin-tests]
uses: ./.github/workflows/reuseable_build_package.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

statusCheck:
name: statusCheck
runs-on: ubuntu-latest
needs: [workflow-setup, build-packages]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'false' || success() }}
steps:
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
33 changes: 25 additions & 8 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ on:
- ubuntu-20.04-upgrade
- Devcontainers
- GHARefactoring
workflow_dispatch:

paths:
- '**.py'
- '.github/**'

jobs:
workflow-setup:
name: Initialize Workflow
Expand All @@ -32,11 +34,10 @@ jobs:
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1

# lint:
# name: Lint
# needs: [workflow-setup]
# # if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
# uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
lint:
name: Lint
needs: [workflow-setup]
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1

build-image:
name: Create Builder Image
Expand All @@ -54,4 +55,20 @@ jobs:
uses: ./.github/workflows/reuseable_test.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

build-package:
name: Token Plugin Build package
needs: [workflow-setup, token-plugin-tests]
uses: ./.github/workflows/reuseable_build_package.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}

publish-package:
name: Token Plugin Publish Packages
needs: [workflow-setup, build-package]
uses: ./.github/workflows/reuseable_publish.yaml
with:
GITHUB_REPOSITORY_NAME: ${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GitHub Actions Workflow

#should trigger
The workflow in the [build.yaml](build.yaml) file replaces the existing [Jenkins.ci](../../devops/aws-codebuilg/Jenkinsfile.ci) build process.

The `lint` job replaces the `Static code validation` stage of the Jenkins pipeline, while the remainder of the jobs replace the `Build / Test` stage.
Expand Down
215 changes: 0 additions & 215 deletions .github/workflows/build.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/lint/Dockerfile.ubuntu-16-04

This file was deleted.

Loading