Commit Graph

56 Commits

Author SHA1 Message Date
Armel Soro
14b15f281c ci: Run CI Workflow on push to main and allow to trigger it manually 2024-07-18 00:17:27 +02:00
Armel Soro
fc2ffce43a Stop testing binding-related code since the Service Binding Operator has been deprecated [1]
Also add warning notes to the corresponding command reference pages.

This section used to cause a bunch of flaky tests,
even if it hasn't seen any changes over the past months/years.

[1] https://redhat-developer.github.io/service-binding-operator/userguide/intro.html
2024-07-18 00:08:12 +02:00
Armel Soro
230d437720 Do not override binary for commit ID if there is already one uploaded
Otherwise, this will regenerate a different checksum

Fixes #7256
2024-07-03 15:43:47 +02:00
Armel Soro
3d77fe9d2b Also publish nightly binaries with Git commit ID
This makes it possible for users to pin to specific commits for their nightly builds
2024-06-14 12:56:23 +02:00
dependabot[bot]
03e16645e4 GitHub Actions: Bump tj-actions/verify-changed-files (#7198)
Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 17.1.0 to 18.0.0.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](2acec78834...eb6d385c0e)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 08:43:52 +00:00
dependabot[bot]
69f039255b GitHub Actions: Bump tj-actions/verify-changed-files (#7179)
Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 17.0.2 to 17.1.0.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](b742fc9c8c...2acec78834)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 08:08:02 +00:00
dependabot[bot]
6dec6c2dcb GitHub Actions: Bump tj-actions/verify-changed-files (#7174)
Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 17.0.0 to 17.0.2.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](bc950d8b56...b742fc9c8c)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 16:21:32 +00:00
dependabot[bot]
8742072bc4 GitHub Actions: Bump tj-actions/verify-changed-files (#7171)
Bumps [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files) from 16.1.1 to 17.0.0.
- [Release notes](https://github.com/tj-actions/verify-changed-files/releases)
- [Changelog](https://github.com/tj-actions/verify-changed-files/blob/main/HISTORY.md)
- [Commits](54e20d3c52...bc950d8b56)

---
updated-dependencies:
- dependency-name: tj-actions/verify-changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 08:46:43 +00:00
Armel Soro
ce3f4d4280 Speed-up nightly builds workflow by running independent jobs for each platform target 2023-12-20 23:35:22 +01:00
Armel Soro
934572a6c8 Speed-up nightly builds workflow by running independent jobs for each platform target 2023-12-20 23:22:30 +01:00
Armel Soro
f77efb8ca2 Speed-up nightly builds workflow by running independent jobs for each platform target 2023-12-20 23:19:56 +01:00
dependabot[bot]
7c006dd7b5 GitHub Actions: Bump actions/setup-go from 4 to 5 (#7168)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 21:38:15 +00:00
dependabot[bot]
0df17bd1a6 GitHub Actions: Bump actions/{up,down}load-artifact from 3 to 4 (#7166)
* GitHub Actions: Bump actions/download-artifact from 3 to 4

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump `actions/upload-artifact` from v3 to v4

* Group dependency updates to both `actions/{up,down}load-artifact` in a single Dependabot PR

This should allow updating them in tandem, and prevent
similar issues from occurring again.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-12-18 14:20:04 +00:00
dependabot[bot]
9348956ccf GitHub Actions: Bump actions/stale from 8 to 9 (#7163)
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 17:26:03 +00:00
Armel Soro
b5ea6f144b Revisit CI to spin up clusters on-demand (#7159)
* Label ServiceBinding tests, so we can run them separately

They require installing additional components in the cluster (OLM, SBO, ...).

* Add GH Workflow for most of our tests (including cluster-related tests)

This allows to easily test even multiple versions of Kubernetes if needed.

For easier reporting and visualisation (and also avoid rebuilding odo many times),
Podman tests have also been relocated in this same Workflow.

Notes:
I tried to spin up lightweight OpenShift clusters but gave up because of several issues:
- MicroShift: I tried to use the aio container image, but this one is no longer maintained and is pretty old version of OCP.
Trying to follow the official guidelines did not work either because a base RHEL OS is mandatory
- CRC/OpenShiftLocal with Microshift preset: didnt pass the pre-checks because it detected an issue with nested virtualization on the GH Runner.

* Drop unused code in helper_oc and use namespace instead of project

When testing on Microshift, it seems that the Project API is purposely not implemented on MicroShift
2023-12-08 23:28:10 +00:00
Armel Soro
86a9a2ff20 Add GH Workflow that spins up/tears down OCP clusters on IBM Cloud
This is work-in-progress and committed to test the pull-request_target
workflow on approved (manually or automatically) PRs.
2023-12-06 12:17:42 +01:00
Armel Soro
13f1517ba8 Add GH Workflow that spins up/tears down OCP clusters on IBM Cloud
This is work-in-progress and committed to test the pull-request_target
workflow on approved (manually or automatically) PRs.
2023-12-06 12:15:01 +01:00
Armel Soro
2ce739de21 Add GH Workflow that spins up/tears down OCP clusters on IBM Cloud
This is work-in-progress and committed to test the pull-request_target
workflow on approved (manually or automatically) PRs.
2023-12-06 10:05:51 +01:00
Armel Soro
172c57d0eb Fix unexpected input when using thollander/actions-comment-pull-request
See [1] for an example.

`comment_includes` has been replaced by `comment_tag` [2].

[1] https://github.com/redhat-developer/odo/actions/runs/6927256942/job/18840839862?pr=7149#step:15:1
[2] https://github.com/thollander/actions-comment-pull-request?tab=readme-ov-file#update-a-comment
2023-11-20 09:42:29 +01:00
Armel Soro
ba0c9575f7 Generate checksums for nightly binaries (#7149) 2023-11-20 09:23:57 +01:00
dependabot[bot]
6234a1722a GitHub Actions: Bump tj-actions/verify-changed-files from 16.0.0 to 16.1.1 (#7151)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 09:23:18 +01:00
dependabot[bot]
6e7bc8a795 GitHub Actions: Bump actions/checkout from 3 to 4 (#7146)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 11:50:05 +01:00
dependabot[bot]
59f98778b9 GitHub Actions: Bump cypress-io/github-action from 5 to 6 (#7143)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 12:06:54 +01:00
Armel Soro
04f0709218 Increase number of operations for the GitHub Stale Action 2023-10-30 10:39:58 +01:00
dependabot[bot]
869982dc99 GitHub Actions: Bump actions/stale from 4 to 8 and allow to trigger it manually (#7133)
* GitHub Actions: Bump actions/stale from 4 to 8

Bumps [actions/stale](https://github.com/actions/stale) from 4 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Allow to trigger the stale workflow manually

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-10-30 09:04:12 +00:00
dependabot[bot]
7cd2633efe GitHub Actions: Bump thollander/actions-comment-pull-request from 1 to 2 (#7127)
* GitHub Actions: Bump thollander/actions-comment-pull-request from 1 to 2

Bumps [thollander/actions-comment-pull-request](https://github.com/thollander/actions-comment-pull-request) from 1 to 2.
- [Release notes](https://github.com/thollander/actions-comment-pull-request/releases)
- [Commits](https://github.com/thollander/actions-comment-pull-request/compare/v1...v2)

---
updated-dependencies:
- dependency-name: thollander/actions-comment-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use commit hash instead of tag, for security reasons

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-10-23 11:29:34 +00:00
dependabot[bot]
180da5b4fb GitHub Actions: Bump actions/setup-go from 3 to 4 (#7124)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 14:37:02 +00:00
Philippe Martin
251648998c Serve SwaggerUI (#6989)
* Serve SwaggerUI

* Add api server doc

* Copy swagger.yaml when running `make install`

* Check swagger.yaml if up-to-date

* Script to copy swagger-ui files
2023-07-21 10:39:31 +02:00
Armel Soro
8c9bcdeb1f Propagate local Devfile changes to the UI (#6970)
* Add '/notifications' endpoint for subscribing to server-sent events

* Generate server and client

* Try implementing the notification service endpoint

* Revert "Try implementing the notification service endpoint"

This does not seem to work because the generated server always responds
with application/json, and it is not possible to respond with a
different content-type.

This reverts commit cf3ce83677649763b8166c4847501c37246dd757.

* Revert "Generate server and client"

This reverts commit b985c007a0561edbe185adc3b9582e12aa3f072b.

* Revert "Add '/notifications' endpoint for subscribing to server-sent events"

This reverts commit c5c903329f13dbe4ec096d83b1c8624fd622bef3.

* Implement 'GET /notifications' SSE endpoint and logic to detect and notify Devfile changes

* Leverage EventSource to subscribe to Server Sent Events

Here, this is being used to automatically reload the Devfile in the YAML view
whenever the API server notifies of filesystem changes in the Devfile
(and related resources).

* Add Preference Client to apiserver CLI

This is needed to be able to persist Devfiles from the UI to the filesystem

* Add E2E test case

* fixup! Leverage EventSource to subscribe to Server Sent Events

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Limit the round-trips by sending the whole Devfile content in the DevfileUpdated event data

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* [Cypress] Make sure to wait for APi responses after visiting the home page

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Generate static UI

* fixup! [Cypress] Make sure to wait for APi responses after visiting the home page

---------

Co-authored-by: Philippe Martin <phmartin@redhat.com>
2023-07-18 17:02:12 +02:00
Armel Soro
c0af267fd5 Fix Dev UI Cypress E2E tests (#6967)
* Start the API Server from the UI component itself

* Store Cypress screenshots and videos as test artifacts upon test failures

This should make it easier to understand and investigate.

* Increase timeout to find element via getByDataCy

The default timeout used to cause certain flakiness at times.

* Install Terminal Report Plugin [1] to log useful information about Cypress runs

It outputs actions, intercepted requests, console messages and errors directly to stdout in a convenient format.

[1] https://github.com/archfz/cypress-terminal-report

* Revert "Increase timeout to find element via getByDataCy"

This reverts commit 410b5c6c3f.

* Intercept network calls when clearing or saving DevState and wait until we get successful responses

In some cases, clicking too quickly led to inconsistent behavior, where for example the Containers tab would not be up-to-date yet

* Disable Angular telemetry when running 'ng serve'
2023-07-15 11:56:29 +02:00
Philippe Martin
ebe003ede0 Serve UI from api server (#6954)
* Serve UI from api server

* Build UI static files + check generation with GHAction

* Update UI static files

* Use specific commit for verify-changed-files action

* Add pkg/apiserver-impl/ui to .gitattributes

* Ignore pkg/apiserver-impl/ui/** for sonar
2023-07-07 07:07:14 -04:00
Philippe Martin
649181c1dc Implement devfile state in odo api (#6941)
* POST /devstate/container

* Implement POST /devstate/container

* Generate DELETE /devstate/container/{containerName}

* Implement DELETE /devstate/container/{containerName}

* Serve /devstate/image

* Implement /devstate/image

* Serve /devstate/resource

* Implement /devstate/resource

* Move Components specific code to components.go

* Serve /devstate/*command

* Implement /devstate/*command

* Serve /devstate/metadata

* Implement /devstate/metadata

* Serve devstate/chart

* Implement /devstate/chart

* Create a DevfileContent schema reference

* Use `DELETE /command/{name}` instead of `DELETE /*Command/{name}`

* Serve /devstate/command/move

* Implement /devstate/command/move

* Serve /devstate/command/{name}/[un]setDefault

* Implement /devstate/command/{name}/[un]setDefault

* serve /devstate/events

* Implement /devstate/events

* Serve /devstate/quantityValid

* Implement /devstate/quantityValid

* Add json tag to API result value

* Sets a proxy for the API

* Move calls from wasm to api (first part)

* Implement PUT /devsatte/devfile

* Move calls from wasm to api (end)

* Implement GET /devstate/devfile

* Implement DELETE /devstate/devfile

* At startup, get devfile from api, not from localStorage

* Rename service wasmGo -> devstate

* Remove wasm module

* Update to latest devfile-lifecycle version, license compatible

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

* Remove wasm from ui/{Makefile/devfile.yaml}

* Define DevfileContent into apispec

* Define required fields

* Generate API models from front

* Regenerate API server after spec changes

* Fix examples case

* Fix github action e2e tests not running

* Make target for all generated api code

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
2023-07-05 05:19:29 -04:00
Philippe Martin
6a4e964d5e Move from github.com/feloy/devfile-builder (#6937)
* Move from github.com/feloy/devfile-builder

* Update .github/workflows/ui-e2e.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
2023-06-29 11:06:02 +02:00
Armel Soro
d9d868fd6b Temporarily downgrade Podman on GitHub to fix CI failures for Podman tests (#6928)
* WIP: check Podman version

* wip: try the workaround suggested in [1]

There seems to be an issue with Podman (libpod specifically) on Ubuntu 22.04,
which might affect networking.
See [1] and [2]

[1] https://github.com/actions/runner-images/issues/7753
[2] https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394
2023-06-23 15:37:11 +02:00
Armel Soro
ee18e35fee Improve website PR preview workflow (#6907)
* Trigger website PR preview workflow only for changes in the 'docs/website' folder or in the Workflow itself

While this allowed to test 'odo deploy', it
makes more sense to avoid deploying the website uselessly if there are no changes in the website itself.
There are already integration or E2E tests testing 'odo deploy' on different projects.

* Do not require manual deployment approval if the PR comes from members of the odo team or certain robot accounts we rely on
2023-06-16 09:50:44 -04:00
Armel Soro
803718a655 [Dogfooding] Create website deploy previews for PRs using odo deploy (#6871)
* Add 'deploy' command in Devfile to support outer-loop case for the website

The goal is to leverage this for creating PR deploy previews
in an automated way.

* Add GitHub Workflow to create Deploy previews for PRs using 'odo deploy'

* Leverage the image-names-as-selector feature

* Add odo binary location to system path to make it easier to use it

* Do not change the Devfile name dynamically

We are using a robot account on quay.io,
which requires specific permissions per repository name,
which cannot be dynamic in this case.

Since we are scoping everything per namespace, it should be fine.
2023-06-15 09:58:00 -04:00
Armel Soro
57da760b88 Build nightly binaries of odo and make them available (via IBM Cloud Object Storage) (#6875)
* Build nightly versions of odo and upload them to IBM Cloud Object Storage

* Document where the nightly builds can be downloaded and installed

* Allow to trigger the nightly build workflow manually if needed

* Add a '-nightly' suffix to the commit id included at build time

This will help users running 'odo' know
that they are running a nightly build, e.g.:

```
$ ./odo version
odo v3.11.0 (077397dbd-nightly)
```

* Use an arbitrary cron schedule in the night to avoid peak executions at midnight

Co-authored-by: Philippe Martin <contact@elol.fr>

---------

Co-authored-by: Philippe Martin <contact@elol.fr>
2023-06-13 10:04:49 -04:00
ritudes
d892e8e54f Mark issues and pull requests as stale (#6872)
* Mark issues and pull requests as stale

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

* Update .github/workflows/stale.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
2023-06-09 11:51:39 -04:00
Philippe Martin
029c5387d5 Skip tests if all changes in docs (#6870)
* Skip tests if all changes in website (and .ibm for testing this PR)

* Use Merge  base

* Add rule for podman-test on GH Actions
2023-06-06 07:32:52 -04:00
Armel Soro
d5587809a2 Do not run 'odo-infra-stage-test' GitHub Workflow on PRs that did not modify any files under 'scripts/ansible' (#6823) 2023-05-19 06:21:13 -04:00
Anand Kumar Singh
7ff460bc62 seperate ansible scripts (#6484)
* ansible scripts for infra automation, and workflow for applying and testing changes

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fix

Signed-off-by: anandrkskd <ansingh@redhat.com>

* fix

Signed-off-by: anandrkskd <ansingh@redhat.com>

* rename requirements.yaml

Signed-off-by: anandrkskd <ansingh@redhat.com>

* change permissions

Signed-off-by: anandrkskd <ansingh@redhat.com>

* update cluster version

Signed-off-by: anandrkskd <ansingh@redhat.com>

---------

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <ansingh@redhat.com>
2023-05-11 10:55:25 -04:00
Armel Soro
709cf80aa9 Rename the generated branch name for release PRs (#6609)
This contains more than just blog posts.
2023-02-21 16:55:52 +01:00
Armel Soro
7b9f214299 Bump Go to 1.19 (#6586)
* Set Go version in go.mod

go mod edit -go=1.19

* Fix formatting issues reported by gofmt

* Fix SA1019 check (usage of deprecated "io/ioutil"), reported by golangci-lint

SA1019: "io/ioutil" has been deprecated since Go 1.16:
As of Go 1.16, the same functionality is now provided by package io or package os,
and those implementations should be preferred in new code.
See the specific function documentation for details. (staticcheck)

* Use Go 1.19 in our Dockerfiles

* Use Go 1.19 in the rpm-prepare.sh script

* Update the tag for the IBM Cloud CI image
2023-02-16 09:03:48 -05:00
Armel Soro
99b0acd99d Trigger the IBM Cloud Image Workflow on PRs as well (#6587)
This allows to test that the image can be built successfully on PRs as well.
Pushing the image is run only upon a push on the 'main' branch.
2023-02-13 03:53:44 -05:00
Philippe Martin
db1dbd0412 Run podman tests on 10 nodes (#6553)
* Run podman tests on 10 nodes

* Update .github/workflows/podman-test.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
2023-01-31 08:04:26 -05:00
Armel Soro
87ef5645d4 Make sure to delete the component resources after each "delete component" test spec (#6541)
* Make sure to fully delete the component resources after each "delete component" test spec

Otherwise, "odo delete component --running-in $mode" might leave some resources running
(on Podman especially).
For example, the Podman test that runs "delete component --running-in deploy"
(after starting and killing a Dev Session abruptly) might leave those Dev resources running.
This has been alleviated in CI via 9ebf766 by ensuring Ginkgo does not hang indefinitely and
by deleting those leftover resources.
But the issue was still persisting locally.

* Do not error out if there is no pod to stop in the last Podman test job step
2023-01-26 04:33:06 -05:00
Philippe Martin
9ebf766c86 Stop containers after Podman tests (#6535)
* Stop containers after tests

* Use --output-interceptor-mode=none  flag to not wait containers stopped

* Run podman pod inspect after tests

* Dedicated step for listing/stopping containers
2023-01-25 09:19:04 -05:00
Armel Soro
511792a62c Isolate Podman tests in namespaces (#6499)
* Rename SetProjectName into GetProjectName

Co-authored-by: Anand Singh <ansingh@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Generate specific containers.conf file for each test spec using a dedicated engine namespace

Co-authored-by: Anand Singh <ansingh@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Listen on random ports on Podman when '--random-ports' is used

This reduces the risks of port conflicts when running test specs in parallel.

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Exclude Gosec G404 (use of math/rand) rule

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Run Podman specs in parallel

* Output the Pod spec to be played by Podman depending on verbosity level

This will help debug potential issues.

* Use random name in 'using devfile that contains K8s resource to run it on podman' test

* Use random component name in sample java-quarkus project used in 'a hotReload capable project is used with odo dev' test

* Revert "Run Podman specs in parallel"

Parallelization works great on GitHub Actions, but I experimented a lot
of issues when running locally with a lot (~11) of parallel test nodes.
Not sure why exactly, but some containers created by Podman had a lot of
networking issues.
We can look into parallelizing the runs later in a subsequent PR.

This reverts commit 64d5d31248a62f355a32ca245ba399a723fdb22f.

* Allow overridding the number of parallel nodes for Podman integration tests

This way, we could be able to run them in parallel on GitHub
but sequentially (default) locally.
This will still benefit us by reducing the time it takes to run such tests on GitHub.

Meanwhile, we can look into the issues we have locally with parallelization.

Note that it is still possible to run them locally in parallel via
the PODMAN_EXEC_NODE env var.

Co-authored-by: Anand Singh <ansingh@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
2023-01-23 09:25:57 -05:00
Philippe Martin
020009b33c Compatibility with podman v3 (#6474)
* Use podman generate kube instead podman kube generate

* get env from exec -it env (to be continued)

* Fix podman test

* Export function to make validate tests pass

* review

* Check podman tests result

Co-authored-by: Parthvi Vala <pvala@redhat.com>
2023-01-09 08:32:31 -05:00
Anand Kumar Singh
edcd2c7e3d Adding Github Actions for podman testing (#6385)
* add ansible,bash scripts and documentation for podman testing

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update documentation for automated podman testing

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fix: log fetching from vsi

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* add ssh fetch

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* test podman on Github Actions

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove podman on ibmcloud files

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove podman config check (to test edge case)

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove reporter, remove hardcoded component name

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Update .github/workflows/podman-test.yaml

Co-authored-by: Armel Soro <armel@rm3l.org>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
2023-01-05 17:34:29 -05:00