Skip to content

Adding Jenkins resources #48

Adding Jenkins resources

Adding Jenkins resources #48

Workflow file for this run

name: ci
on: pull_request
jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v4
- name: Run linters
uses: golangci/golangci-lint-action@v5
with:
version: latest
args: --timeout=3m
go-test:
strategy:
matrix:
go-version: [1.22.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: go tests
run: go test -v -covermode=count -json ./... > test.json
- name: annotate go tests
if: always()
uses: guyarb/[email protected]
with:
test-results: test.json
test:
runs-on: ubuntu-latest
env:
BATON_JENKINS_USERNAME: ${{ secrets.BATON_JENKINS_USERNAME }}
BATON_JENKINS_PASSWORD: ${{ secrets.BATON_JENKINS_PASSWORD }}
BATON_JENKINS_TOKEN: ${{ secrets.BATON_JENKINS_TOKEN }}
BATON_JENKINS_BASEURL: ${{ secrets.BATON_JENKINS_BASEURL }}
BATON_LOG_LEVEL: debug
CONNECTOR_GRANT: 'grant:entitlement:group:1234:member:user:9876'
CONNECTOR_ENTITLEMENT: 'entitlement:group:1234:member'
CONNECTOR_PRINCIPAL: 'user:9876'
CONNECTOR_PRINCIPAL_TYPE: 'user'
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v4
- name: Build baton-jenkins
run: go build ./cmd/baton-jenkins
# - name: Run baton-jenkins
# run: ./baton-jenkins
- name: Install baton
run: ./scripts/get-baton.sh && mv baton /usr/local/bin