-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (72 loc) · 2.33 KB
/
keyfactor-bootstrap-workflow.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Keyfactor Bootstrap Workflow
on:
workflow_dispatch:
pull_request:
types: [opened, closed, synchronize, edited, reopened]
push:
create:
branches:
- 'release-*.*'
jobs:
build:
name: Build, Lint, and Test
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# Checkout code
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
# Setup GoLang build environment
# https://github.com/actions/setup-go
- name: Set up Go 1.x
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
cache: true
# Download dependencies
- run: go mod download
# Build Go binary
- run: go build -v .
# Run Go linters
# https://github.com/golangci/golangci-lint-action
- name: Run linters
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: latest
# Run Go tests
- name: Run go test
run: go test -v ./...
integrationtest:
name: Integration Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# Checkout code
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
# Create a single-node K8s cluster with Kind
# Then, deploy an ephemeral EJBCA and SignServer
- uses: m8rmclaren/ejbca-signserver-k8s@main
with:
deploy-k8s: 'true'
deploy-nginx-ingress: 'true'
deploy-signserver: 'false'
# Run integration test
- name: Run integration test
run: |
chmod +x test/integrationtest.sh
./test/integrationtest.sh
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@container-patch-62529
needs: integrationtest
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
scan_token: ${{ secrets.SAST_TOKEN }}
docker-user: ${{ secrets.DOCKER_USER }}
docker-token: ${{ secrets.DOCKER_PWD }}