From 7afbdddd1084f553e1dd86e0182ff3f3591c7510 Mon Sep 17 00:00:00 2001 From: abilan Date: Thu, 25 May 2023 16:11:29 -0400 Subject: [PATCH] Migrate building PRs to GitHub Action See gh-345 --- .github/workflows/pr-build-workflow.yml | 23 +++++++++++++ ci/pipeline.yml | 44 ------------------------- 2 files changed, 23 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/pr-build-workflow.yml diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml new file mode 100644 index 0000000..80fd7ff --- /dev/null +++ b/.github/workflows/pr-build-workflow.yml @@ -0,0 +1,23 @@ +name: Pull Request build + +on: + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v3 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Build with Maven + run: mvnw --batch-mode --update-snapshots verify diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 633b94d..a9752f0 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -41,13 +41,6 @@ resource_types: tag: 0.0.18 username: ((docker-hub-username)) password: ((docker-hub-password)) -- name: pull-request - type: registry-image - source: - repository: teliaoss/github-pr-resource - tag: v0.23.0 - username: ((docker-hub-username)) - password: ((docker-hub-password)) - name: github-release type: registry-image source: @@ -68,14 +61,6 @@ resources: icon: github source: <<: *git-repo-resource-source -- name: git-pull-request - type: pull-request - icon: source-pull - source: - access_token: ((github-ci-pull-request-token)) - repository: ((github-repo-name)) - base_branch: ((branch)) - ignore_paths: ["ci/*"] - name: github-pre-release type: github-release icon: briefcase-download-outline @@ -163,33 +148,6 @@ jobs: - put: artifactory-repo params: <<: *artifactory-repo-put-params -- name: build-pull-requests - serial: true - public: true - plan: - - get: ci-image - - get: git-repo - resource: git-pull-request - trigger: true - version: every - - do: - - put: git-pull-request - params: - path: git-repo - status: pending - - task: build-project - image: ci-image - file: git-repo/ci/tasks/build-pr-project.yml - on_success: - put: git-pull-request - params: - path: git-repo - status: success - on_failure: - put: git-pull-request - params: - path: git-repo - status: failure - name: stage-milestone serial: true plan: @@ -353,5 +311,3 @@ groups: jobs: ["stage-milestone", "stage-rc", "stage-release", "promote-milestone", "promote-rc", "promote-release", "create-github-release"] - name: "ci-images" jobs: ["build-ci-image"] -- name: "pull-requests" - jobs: ["build-pull-requests"]