Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed Jan 12, 2022
1 parent c17f329 commit fe4e08b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/verify-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
# thus allowing us to test without bypassing tag-to-digest resolution.
REGISTRY_NAME: registry.local
REGISTRY_PORT: 5000
KO_DOCKER_REPO: registry.local:5000/fulcio
KO_PREFIX: registry.local:5000/fulcio
GIT_HASH: ${{ github.sha }}
GIT_VERSION: test

steps:
- uses: actions/checkout@v2.4.0
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:
- name: Deploy fulcio-dev
run: |
# Reduce the resource requests of Fulcio
sed -i -e 's,memory: "1G",memory: "100m",g' ${{ github.workspace }}/config/deployment.yaml
sed -i -e 's,memory: "1G",memory: "100Mi",g' ${{ github.workspace }}/config/deployment.yaml
sed -i -e 's,cpu: ".5",cpu: "50m",g' ${{ github.workspace }}/config/deployment.yaml
# Switch to one replica to make it easier to test the scraping of
# metrics since we know all the requests then go to the same server.
Expand Down Expand Up @@ -181,15 +183,15 @@ jobs:
kubectl create ns fulcio-dev
ko apply -Bf config/
make ko-apply
kubectl wait --for=condition=Available --timeout=5m -n fulcio-dev deployment/fulcio-server
kubectl get po -n fulcio-dev
- name: Run signing job
run: |
DIGEST=$(ko publish .)
DIGEST=$(make ko-publish | sed '1d')
cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
Expand All @@ -203,7 +205,7 @@ jobs:
automountServiceAccountToken: false
containers:
- name: check-oidc
image: gcr.io/projectsigstore/cosign:v1.4.0
image: gcr.io/projectsigstore/cosign:v1.4.1
args: [
"sign",
"--fulcio-url=http://fulcio-server.fulcio-dev.svc",
Expand Down Expand Up @@ -248,6 +250,8 @@ jobs:
EOF
kubectl wait --for=condition=Complete --timeout=90s job/check-prometheus-metrics
env:
KO_DOCKER_REPO: registry.local:5000/fulcio

- name: Collect logs
if: ${{ always() }}
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ ko-local:
--platform=linux/amd64 --tags $(GIT_VERSION) --tags $(GIT_HASH) --local \
github.com/sigstore/fulcio

.PHONY: ko-apply
ko-apply:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) ko apply -Bf config/

.PHONY: ko-publish
ko-publish:
LDFLAGS="$(LDFLAGS)" GIT_HASH=$(GIT_HASH) GIT_VERSION=$(GIT_VERSION) ko publish .

## --------------------------------------
## Modules
## --------------------------------------
Expand Down

0 comments on commit fe4e08b

Please sign in to comment.