mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-05-15 04:50:33 +00:00
refactor makefile
This commit is contained in:
parent
a53996aeaf
commit
5305662f7f
3 changed files with 19 additions and 22 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -206,10 +206,9 @@ jobs:
|
|||
- name: Generate TLS Certificates
|
||||
if: ${{ !env.ACT }}
|
||||
run: |
|
||||
go install github.com/cloudflare/cfssl/cmd/cfssl@v1.6.5
|
||||
go install github.com/cloudflare/cfssl/cmd/cfssljson@v1.6.5
|
||||
GOPATH_BIN="$(go env GOPATH)/bin"
|
||||
export PATH="$GOPATH_BIN:$PATH"
|
||||
curl -sSfL https://github.com/cloudflare/cfssl/releases/download/v1.6.5/cfssl_1.6.5_linux_amd64 -o /usr/local/bin/cfssl
|
||||
curl -sSfL https://github.com/cloudflare/cfssl/releases/download/v1.6.5/cfssljson_1.6.5_linux_amd64 -o /usr/local/bin/cfssljson
|
||||
chmod +x /usr/local/bin/cfssl /usr/local/bin/cfssljson
|
||||
./scripts/gen-tls-certs.sh
|
||||
cat .build/e2e-tls.env >> "$GITHUB_ENV"
|
||||
|
||||
|
|
|
|||
32
Makefile
32
Makefile
|
|
@ -4,39 +4,37 @@ clean:
|
|||
|
||||
.PHONY: local-test
|
||||
local-test: clean
|
||||
docker compose down; docker compose up --detach vault && \
|
||||
docker compose down --volumes; docker compose up --wait vault && \
|
||||
act workflow_dispatch --job local-test --workflows .github/workflows/local-test.yaml
|
||||
|
||||
.PHONY: test-npm
|
||||
test-npm:
|
||||
npm ci && npm run build && npm run test
|
||||
|
||||
.PHONY: test-basic
|
||||
test-basic: clean
|
||||
docker compose down; docker compose up --detach vault && \
|
||||
docker compose down --volumes; docker compose up --wait vault && \
|
||||
npm run test:integration:basic
|
||||
|
||||
.PHONY: test-e2e
|
||||
test-e2e: clean
|
||||
docker compose down; docker compose up --detach vault && \
|
||||
docker compose down --volumes; docker compose up --wait vault && \
|
||||
act workflow_dispatch --job e2e --workflows .github/workflows/build.yml
|
||||
|
||||
.PHONY: test-e2e-tls
|
||||
test-e2e-tls: clean
|
||||
./scripts/gen-tls-certs.sh
|
||||
docker compose down; docker compose up --detach vault-tls && \
|
||||
docker compose down --volumes; docker compose up --wait vault-tls && \
|
||||
act workflow_dispatch --job e2e-tls --workflows .github/workflows/build.yml --env-file .build/e2e-tls.env
|
||||
|
||||
.PHONY: test-enterprise
|
||||
test-enterprise: clean
|
||||
docker compose down; docker compose up --detach vault-enterprise && \
|
||||
act workflow_dispatch --job integrationEnterprise --workflows .github/workflows/build.yml
|
||||
@if [ -z "$(VAULT_LICENSE_CI)" ]; then \
|
||||
echo "Skipping enterprise tests: VAULT_LICENSE_CI not set"; \
|
||||
else \
|
||||
docker compose down --volumes; docker compose up --wait vault-enterprise && \
|
||||
act workflow_dispatch --job integrationEnterprise --workflows .github/workflows/build.yml; \
|
||||
fi
|
||||
|
||||
.PHONY: test-all
|
||||
test-all: clean
|
||||
npm ci && npm run build && npm run test
|
||||
$(MAKE) test-basic
|
||||
$(MAKE) test-e2e
|
||||
$(MAKE) test-e2e-tls
|
||||
# VAULT_LICENSE_CI must be set to run enterprise tests
|
||||
@if [ -n "$(VAULT_LICENSE_CI)" ]; then \
|
||||
$(MAKE) test-enterprise; \
|
||||
else \
|
||||
echo "Skipping enterprise tests: VAULT_LICENSE_CI not set"; \
|
||||
fi
|
||||
test-all: clean test-npm test-basic test-e2e test-e2e-tls test-enterprise
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ cfssl gencert \
|
|||
EOF
|
||||
|
||||
# ── Rename to names expected by vault config ──────────────────────────────────
|
||||
mv ca.pem ca.crt
|
||||
mv ca.pem ca.crt
|
||||
mv server.pem server.crt
|
||||
mv server-key.pem server.key
|
||||
mv client.pem client.crt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue