mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
ci: Fix Podman job
This commit is contained in:
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
@@ -106,12 +106,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- run: cat /etc/os-release || true
|
- run: cat /etc/os-release || true
|
||||||
- run: podman info
|
- run: podman info
|
||||||
# TODO(rm3l): workaround for https://github.com/actions/runner-images/issues/7753
|
|
||||||
# (caused by https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394).
|
|
||||||
# Remove this when this issue is fixed and available in the ubuntu runner image
|
|
||||||
- run: |
|
|
||||||
sudo apt install podman=3.4.4+ds1-1ubuntu1 --allow-downgrades
|
|
||||||
podman info
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
@@ -133,7 +127,10 @@ jobs:
|
|||||||
# This is currently hard-coded because GH won't expose secrets or variables to PRs created from forks.
|
# This is currently hard-coded because GH won't expose secrets or variables to PRs created from forks.
|
||||||
# Hopefully, variables (which are non-sensible by definition) will be passed to workflows triggered by PRs from forks.
|
# Hopefully, variables (which are non-sensible by definition) will be passed to workflows triggered by PRs from forks.
|
||||||
# See https://github.com/community/community/discussions/44322
|
# See https://github.com/community/community/discussions/44322
|
||||||
PODMAN_EXEC_NODES: 10
|
PODMAN_EXEC_NODES: 1
|
||||||
|
# Namespacing feature removed from Podman v4.5.0: https://github.com/containers/podman/pull/17586
|
||||||
|
# TODO(rm3l): ideally, we could separate Podman root to isolate tests and run them in parallel
|
||||||
|
PODMAN_USE_NAMESPACES: 'false'
|
||||||
run: make test-integration-podman
|
run: make test-integration-podman
|
||||||
- name: List and stop remaining containers
|
- name: List and stop remaining containers
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ func getBooleanValueFromEnvVar(envvar string, defaultValue bool) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GenerateAndSetContainersConf(dir string) {
|
func GenerateAndSetContainersConf(dir string) {
|
||||||
useNamespaces := getBooleanValueFromEnvVar("PODMAN_USE_NAMESPACES", true)
|
useNamespaces := getBooleanValueFromEnvVar("PODMAN_USE_NAMESPACES", false)
|
||||||
if !useNamespaces {
|
if !useNamespaces {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ var _ = Describe("odo list with devfile", Label(helper.LabelSkipOnOpenShift), fu
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
When("dev is running on podman", Label(helper.LabelPodman), func() {
|
When("dev is running on podman", Serial, Label(helper.LabelPodman), func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
var err error
|
var err error
|
||||||
devSession, err = helper.StartDevMode(helper.DevSessionOpts{
|
devSession, err = helper.StartDevMode(helper.DevSessionOpts{
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ var _ = Describe("odo generic", Label(helper.LabelSkipOnOpenShift), func() {
|
|||||||
Expect(odoVersion).To(ContainSubstring(helper.GetPodmanVersion()))
|
Expect(odoVersion).To(ContainSubstring(helper.GetPodmanVersion()))
|
||||||
} else {
|
} else {
|
||||||
Expect(odoVersion).Should(MatchRegexp(reKubernetesVersion))
|
Expect(odoVersion).Should(MatchRegexp(reKubernetesVersion))
|
||||||
serverURL := oc.GetCurrentServerURL()
|
|
||||||
Expect(odoVersion).Should(ContainSubstring("Server: " + serverURL))
|
|
||||||
if !helper.IsKubernetesCluster() {
|
if !helper.IsKubernetesCluster() {
|
||||||
|
serverURL := oc.GetCurrentServerURL()
|
||||||
|
Expect(odoVersion).Should(ContainSubstring("Server: " + serverURL))
|
||||||
ocpMatcher := ContainSubstring("OpenShift: ")
|
ocpMatcher := ContainSubstring("OpenShift: ")
|
||||||
if serverVersion := commonVar.CliRunner.GetVersion(); serverVersion == "" {
|
if serverVersion := commonVar.CliRunner.GetVersion(); serverVersion == "" {
|
||||||
// Might indicate a user permission error on certain clusters (observed with a developer account on Prow nightly jobs)
|
// Might indicate a user permission error on certain clusters (observed with a developer account on Prow nightly jobs)
|
||||||
@@ -164,9 +164,9 @@ var _ = Describe("odo generic", Label(helper.LabelSkipOnOpenShift), func() {
|
|||||||
helper.JsonPathSatisfiesAll(odoVersion, "podman.client.version", MatchRegexp(reJSONVersion), Equal(helper.GetPodmanVersion()))
|
helper.JsonPathSatisfiesAll(odoVersion, "podman.client.version", MatchRegexp(reJSONVersion), Equal(helper.GetPodmanVersion()))
|
||||||
} else {
|
} else {
|
||||||
helper.JsonPathSatisfiesAll(odoVersion, "cluster.kubernetes.version", MatchRegexp(reJSONVersion))
|
helper.JsonPathSatisfiesAll(odoVersion, "cluster.kubernetes.version", MatchRegexp(reJSONVersion))
|
||||||
serverURL := oc.GetCurrentServerURL()
|
|
||||||
helper.JsonPathContentIs(odoVersion, "cluster.serverURL", serverURL)
|
|
||||||
if !helper.IsKubernetesCluster() {
|
if !helper.IsKubernetesCluster() {
|
||||||
|
serverURL := oc.GetCurrentServerURL()
|
||||||
|
helper.JsonPathContentIs(odoVersion, "cluster.serverURL", serverURL)
|
||||||
m := BeEmpty()
|
m := BeEmpty()
|
||||||
if serverVersion := commonVar.CliRunner.GetVersion(); serverVersion != "" {
|
if serverVersion := commonVar.CliRunner.GetVersion(); serverVersion != "" {
|
||||||
// A blank serverVersion might indicate a user permission error on certain clusters (observed with a developer account on Prow nightly jobs)
|
// A blank serverVersion might indicate a user permission error on certain clusters (observed with a developer account on Prow nightly jobs)
|
||||||
|
|||||||
Reference in New Issue
Block a user