Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zregvart committed Apr 9, 2024
1 parent ec6fc85 commit ea45f9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 121 deletions.
118 changes: 0 additions & 118 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,126 +36,8 @@ jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
disable-telemetry: true

- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Restore Cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: main
path: '**'

- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
cache: false

- name: Generate
run: make generate

- name: Check for uncommitted changes
run: |
git fetch origin "${GITHUB_BASE_REF:-$GITHUB_REF_NAME}"
git switch -c checks --track "origin/${GITHUB_BASE_REF:-$GITHUB_REF_NAME}"
trap "git switch - --detach" SIGINT
git rebase
if ! git diff --exit-code -s; then
for f in $(git diff --exit-code --name-only); do
echo "::error file=$f,line=1,col=1,endColumn=1::File was modified in build"
done
exit 1
fi
- name: Test
run: make test

- name: Upload unit test coverage report
uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage-unit.out
flags: unit

- name: Upload generative test coverage report
uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage-generative.out
flags: generative

- name: Upload integration test coverage report
uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage-integration.out
flags: integration

Acceptance:
runs-on: ubuntu-latest
steps:
# Disabled until we figure out the "Could not resolve host: github.com" in
# acceptance tests
# - name: Harden Runner
# uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
# with:
# egress-policy: audit
# disable-telemetry: true

- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Restore Cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: main
path: '**'

- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
cache: false

- name: Acceptance test
run: make acceptance

- name: Upload coverage report
uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.0
with:
files: ./coverage-acceptance.out
flags: acceptance

Tools:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Restore Cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: main
path: '**'

- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
cache: false

- name: Development tools can be run
run: |
go run -modfile tools/go.mod github.com/tektoncd/cli/cmd/tkn version
go run -modfile tools/go.mod sigs.k8s.io/kustomize/kustomize/v5 version
go run -modfile tools/go.mod helm.sh/helm/v3/cmd/helm version
go run -modfile tools/go.mod github.com/open-policy-agent/conftest --version
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_COBRA: 1
run: |
echo head_sha=$(gh api /repos/enterprise-contract/ec-cli/git/matching-refs/heads/main --jq '.[0].object.sha') >> "$GITHUB_OUTPUT"
echo head_sha=$(gh api /repos/zregvart/ec-cli/git/matching-refs/heads/main --jq '.[0].object.sha') >> "$GITHUB_OUTPUT"
- name: Timestamp
id: timestamp
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
if: ${{ (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_sha == needs.info.outputs.head_sha) || github.event.workflow_dispatch }}

env:
IMAGE_REPO: quay.io/enterprise-contract/ec-cli
IMAGE_REPO: quay.io/zregvart_redhat/ec-cli
TAG: ${{ github.sha }}
TAG_TIMESTAMP: ${{ github.sha }}-${{ needs.info.outputs.timestamp }}

Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

- name: Create and push the tekton bundle (quay.io/enterprise-contract/ec-task-bundle)
env:
TASK_REPO: quay.io/enterprise-contract/ec-task-bundle
TASK_REPO: quay.io/zregvart_redhat/ec-task-bundle
TASKS: "tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml tasks/verify-definition/0.1/verify-definition.yaml"
run: make task-bundle-snapshot TASK_REPO=$TASK_REPO TASK_TAG=$TAG ADD_TASK_TAG="$TAG_TIMESTAMP" TASKS=<( yq e ".spec.steps[].image? = \"$IMAGE_REPO:$TAG\"" $TASKS | yq 'select(. != null)')

Expand Down

0 comments on commit ea45f9e

Please sign in to comment.