-
Notifications
You must be signed in to change notification settings - Fork 89
Run integration tests on microshift/minc #1059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
khrm
wants to merge
2
commits into
tektoncd:main
Choose a base branch
from
khrm:microshift
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| name: Integration Tests on microshift | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - release-* | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - release-* | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| tekton-results-integration-tests-microshift: | ||
| runs-on: ubuntu-24.04 | ||
| name: Integration Tests on microshift | ||
| strategy: | ||
| fail-fast: false | ||
|
|
||
| env: | ||
| SHELL: /bin/bash | ||
| GOPATH: ${{ github.workspace }} | ||
| GO111MODULE: on | ||
| KO_DOCKER_REPO: ko.local | ||
| CLUSTER_DOMAIN: ${{ github.run_id }}.local | ||
| ARTIFACTS: ${{ github.workspace }}/artifacts | ||
| SKIP_SETUP: true | ||
| DOCKER_HOST: tcp://localhost:24816 | ||
| SKIP_KIND: true | ||
| SKIP_PORT_FORWARD: false | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| path: ${{ github.workspace }}/src/github.com/tektoncd/results | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | ||
| with: | ||
| cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/results/go.sum" | ||
| go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/results/go.mod" | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ./ | ||
| run: | | ||
| echo '::group::install ko' | ||
| curl -L https://github.com/ko-build/ko/releases/download/v0.15.4/ko_0.15.4_Linux_x86_64.tar.gz | tar xzf - ko | ||
| echo '::group:: install go-junit-report' | ||
| go install github.com/jstemmer/go-junit-report@v0.9.1 | ||
| echo '::endgroup::' | ||
| chmod +x ./ko | ||
| sudo mv ko /usr/local/bin | ||
| echo '::endgroup::' | ||
|
|
||
| echo '::group::create required folders' | ||
| mkdir -p "${ARTIFACTS}" | ||
| echo '::endgroup::' | ||
|
|
||
| echo "${GOPATH}/bin" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Run tests | ||
| working-directory: ${{ github.workspace }}/src/github.com/tektoncd/results | ||
| run: | | ||
| echo -e "\n************************ Install openshift client ************************\n" | ||
| wget https://github.com/okd-project/okd/releases/download/4.19.0-okd-scos.6/openshift-client-linux-amd64-rhel9-4.19.0-okd-scos.6.tar.gz | ||
| tar -xzvf openshift-client-linux-amd64-rhel9-4.19.0-okd-scos.6.tar.gz | ||
| export PATH=${PATH}:${PWD} | ||
|
|
||
| echo -e "\n************************** Setup Podman **********************************\n" | ||
| sudo podman system service --time=0 tcp://localhost:24816 & | ||
| sleep 7 | ||
|
|
||
| echo -e "\ntest the podman tcp connection\n" | ||
| curl http://localhost:24816/_ping | ||
|
|
||
| echo -e "\n************************ Setup Microshift ************************\n" | ||
| curl -L -o minc https://github.com/minc-org/minc/releases/latest/download/minc_linux_amd64 | ||
| chmod +x minc | ||
| ./minc create --log-level debug | ||
| rm ./minc | ||
|
|
||
| export KUBECONFIG=$HOME/.kube/config | ||
|
|
||
| kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.31/deploy/local-path-storage.yaml | ||
| ./oc adm policy add-scc-to-user hostmount-anyuid -z local-path-provisioner-service-account -n local-path-storage | ||
| kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' | ||
| curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml | yq 'del(.spec.template.spec.containers[]?.securityContext.runAsUser, .spec.template.spec.containers[]?.securityContext.runAsGroup)' > release.yaml | ||
| export TEKTON_PIPELINE_CONFIG=$(realpath ./release.yaml) | ||
|
|
||
| ${{ github.workspace }}/src/github.com/tektoncd/results/test/e2e/e2e.sh | ||
|
|
||
| - name: Upload test results | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| if: ${{ failure() }} | ||
| with: | ||
| path: ${{ env.ARTIFACTS }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.