-
Notifications
You must be signed in to change notification settings - Fork 26
70 lines (66 loc) · 2.42 KB
/
on_prerelease.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Prerelease pipeline
on:
release:
types:
- prereleased
tags:
- 'v*'
jobs:
consumer-producer-image:
env:
ORIGINAL_REPO_NAME: ${{ github.event.repository.full_name }}
CONSUMER_PRODUCER_DOCKER_IMAGE_NAME: ghcr.io/newrelic/kafka-consumer-producer
name: Build and push consumer-producer image to use in our canaries
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: src/github.com/${{ env.ORIGINAL_REPO_NAME }}
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
working-directory: src/github.com/${{ env.ORIGINAL_REPO_NAME }}/tests/integration/consumer-producer
run: |
docker buildx build --push --platform=linux/amd64 \
-t $CONSUMER_PRODUCER_DOCKER_IMAGE_NAME:latest \
.
# This is currently not covered by reusable workflow due to the retry mechanism
test-integration-nix:
name: Run integration tests on *Nix
runs-on: ubuntu-22.04
env:
ORIGINAL_REPO_NAME: ${{ github.event.repository.full_name }}
NRJMX_VERSION: '2.3.2' ## this is needed in the makefile
defaults:
run:
working-directory: src/github.com/${{env.ORIGINAL_REPO_NAME}}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: src/github.com/${{env.ORIGINAL_REPO_NAME}}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: 'src/github.com/${{env.ORIGINAL_REPO_NAME}}/go.mod'
- name: Integration test
# One of the integration consumer tests is not working as expected to the environment bootstrap, to keep it
run: for i in 1 2 3; do make integration-test && break; done
pre-release:
needs: [test-integration-nix]
uses: newrelic/coreint-automation/.github/workflows/reusable_pre_release.yaml@v3
with:
tag: ${{ github.event.release.tag_name }}
integration: kafka
publish_schema: "ohi-jmx"
run_integration_nix: false
windows_goarch_matrix: '["amd64"]' # 386 is not supported in jmx integrations
windows_download_nrjmx: true
win_package_type: exe
secrets: inherit