Skip to content

Commit

Permalink
Migrate Jenkinsfile to GH Actions Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reakaleek committed Dec 21, 2022
1 parent 8624bb5 commit c30f8f0
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 133 deletions.
84 changes: 0 additions & 84 deletions .ci/Jenkinsfile

This file was deleted.

7 changes: 0 additions & 7 deletions .ci/install-rbenv.sh

This file was deleted.

42 changes: 0 additions & 42 deletions .ci/jobs/ecs-logging-ruby-mbp.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/test-reporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
## Workflow to process the JUnit test results and add a report to the checks.
name: Test Report
on:
workflow_run:
workflows:
- test
types:
- completed

jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
with:
artifact: test-results
name: Test Report
path: "spec/junit-reports/**/*-junit.xml"
reporter: java-junit
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
## Test with multiple ruby images and frameworks
name: test

on:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main

permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-image:
- 'ruby:2.7'
- 'ruby:2.6'
- 'ruby:2.5'
- 'ruby:2.4'
- 'ruby:2.3'
- 'jruby:9.2'
framework:
- 'rails-6.1'
- 'rails-6.0'
- 'rails-5.2'
- 'sinatra-2.0'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.2'
- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
if: github.event.pull_request.head.repo.full_name == github.repository # Only docker-login if the PR is not from a fork.
with:
registry: index.docker.io/v1/
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
- name: Test ${{ matrix.ruby-image }}, ${{ matrix.framework }}
env:
RUBY_VERSION: ${{ matrix.ruby-image }}
run: bin/dev --image=${{ matrix.ruby-image }} --frameworks=${{ matrix.framework }}
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: 'spec/junit-reports/**/*-junit.xml'

0 comments on commit c30f8f0

Please sign in to comment.