|
40 | 40 | - run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest |
41 | 41 | - run: make -C snmp-mixin lint build |
42 | 42 |
|
43 | | - generator: |
44 | | - name: Build generator |
45 | | - runs-on: ubuntu-latest |
46 | | - container: |
47 | | - # Whenever the Go version is updated here, .promu.yml |
48 | | - # should also be updated. |
49 | | - image: quay.io/prometheus/golang-builder:1.26-base |
50 | | - defaults: |
51 | | - run: |
52 | | - working-directory: ./generator |
53 | | - steps: |
54 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
55 | | - with: |
56 | | - persist-credentials: false |
57 | | - - uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0 |
58 | | - - run: apt-get update |
59 | | - - run: apt-get -y install build-essential diffutils libsnmp-dev p7zip-full |
60 | | - - run: make mibs |
61 | | - - run: make generator |
62 | | - - run: make parse_errors |
63 | | - - run: make generate |
64 | | - - run: git diff --exit-code |
65 | | - |
66 | | - publish_generator_main: |
67 | | - name: Publish generator main branch artifacts |
68 | | - runs-on: ubuntu-latest |
69 | | - needs: [test_go, generator] |
70 | | - defaults: |
71 | | - run: |
72 | | - working-directory: ./generator |
73 | | - if: | |
74 | | - (github.event_name == 'push' && github.event.ref == 'refs/heads/main') |
75 | | - steps: |
76 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
77 | | - with: |
78 | | - persist-credentials: false |
79 | | - - uses: prometheus/promci/publish_main@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0 |
80 | | - with: |
81 | | - docker_hub_login: ${{ secrets.docker_hub_login }} |
82 | | - docker_hub_password: ${{ secrets.docker_hub_password }} |
83 | | - quay_io_login: ${{ secrets.quay_io_login }} |
84 | | - quay_io_password: ${{ secrets.quay_io_password }} |
85 | | - |
86 | | - publish_generator_release: |
87 | | - name: Publish generator release artefacts |
88 | | - runs-on: ubuntu-latest |
89 | | - needs: [test_go, generator] |
90 | | - defaults: |
91 | | - run: |
92 | | - working-directory: ./generator |
93 | | - if: | |
94 | | - (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) |
95 | | - steps: |
96 | | - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
97 | | - with: |
98 | | - persist-credentials: false |
99 | | - - uses: prometheus/promci/publish_release@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0 |
100 | | - with: |
101 | | - docker_hub_login: ${{ secrets.docker_hub_login }} |
102 | | - docker_hub_password: ${{ secrets.docker_hub_password }} |
103 | | - quay_io_login: ${{ secrets.quay_io_login }} |
104 | | - quay_io_password: ${{ secrets.quay_io_password }} |
105 | | - github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }} |
106 | | - |
107 | 43 | build: |
108 | 44 | name: Build snmp_exporter |
109 | 45 | runs-on: ubuntu-latest |
|
0 commit comments