Skip to content

Commit

Permalink
unskip pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Nov 28, 2024
1 parent d4b7b4d commit 3bb587f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
45 changes: 24 additions & 21 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ config = {
"e2e": {
"1": {
"earlyFail": True,
"skip": True,
"skip": False,
"suites": [
"journeys",
"smoke",
Expand All @@ -71,7 +71,7 @@ config = {
},
"3": {
"earlyFail": True,
"skip": True,
"skip": False,
"tikaNeeded": True,
"suites": [
"search",
Expand All @@ -86,7 +86,7 @@ config = {
},
"4": {
"earlyFail": True,
"skip": True,
"skip": False,
"suites": [
"navigation",
"user-settings",
Expand All @@ -95,7 +95,7 @@ config = {
],
},
"app-provider": {
"skip": True,
"skip": False,
"suites": [
"app-provider",
],
Expand All @@ -112,7 +112,7 @@ config = {
},
},
"oidc-refresh-token": {
"skip": True,
"skip": False,
"features": [
"cucumber/features/oidc/refreshToken.feature",
],
Expand All @@ -122,7 +122,7 @@ config = {
},
},
"oidc-iframe": {
"skip": True,
"skip": False,
"features": [
"cucumber/features/oidc/iframeTokenRenewal.feature",
],
Expand All @@ -132,7 +132,7 @@ config = {
},
"ocm": {
"earlyFail": True,
"skip": True,
"skip": False,
"federationServer": True,
"suites": [
"ocm",
Expand Down Expand Up @@ -210,6 +210,9 @@ def main(ctx):

def beforePipelines(ctx):
return checkStarlark() + \
licenseCheck(ctx) + \
documentation(ctx) + \
changelog(ctx) + \
pnpmCache(ctx) + \
cacheOcisPipeline(ctx) + \
pipelinesDependsOn(buildCacheWeb(ctx), pnpmCache(ctx)) + \
Expand All @@ -224,7 +227,7 @@ def stagePipelines(ctx):

e2e_pipelines = e2eTests(ctx)
keycloak_pipelines = e2eTestsOnKeycloak(ctx)
return buildAndTestDesignSystem(ctx) + e2e_pipelines + keycloak_pipelines
return unit_test_pipelines + buildAndTestDesignSystem(ctx) + pipelinesDependsOn(e2e_pipelines + keycloak_pipelines, unit_test_pipelines)

def afterPipelines(ctx):
return build(ctx) + pipelinesDependsOn(notify(), build(ctx))
Expand All @@ -241,9 +244,9 @@ def pnpmCache(ctx):
"steps": skipIfUnchanged(ctx, "cache") +
installPnpm() +
rebuildBuildArtifactCache(ctx, "pnpm", ".pnpm-store") +
checkPlaywrightChromiumCache() +
installPlaywright() +
cachePlaywright(),
checkChromiumCache() +
installChromium() +
cacheChromium(),
"trigger": {
"ref": [
"refs/heads/master",
Expand Down Expand Up @@ -608,7 +611,7 @@ def e2eTests(ctx):
steps = skipIfUnchanged(ctx, "e2e-tests") + \
restoreBuildArtifactCache(ctx, "pnpm", ".pnpm-store") + \
installPnpm() + \
restorePlaywrightChromiumCache() + \
restoreChromiumCache() + \
restoreBuildArtifactCache(ctx, "web-dist", "dist")

if ctx.build.event == "cron":
Expand Down Expand Up @@ -719,7 +722,7 @@ def installPnpm():
],
}]

def installPlaywright():
def installChromium():
return [{
"name": "playwright-install",
"image": OC_CI_NODEJS,
Expand Down Expand Up @@ -1825,7 +1828,7 @@ def e2eTestsOnKeycloak(ctx):

steps = restoreBuildArtifactCache(ctx, "pnpm", ".pnpm-store") + \
installPnpm() + \
restorePlaywrightChromiumCache() + \
restoreChromiumCache() + \
keycloakService() + \
restoreBuildArtifactCache(ctx, "web-dist", "dist")
if ctx.build.event == "cron":
Expand Down Expand Up @@ -1906,9 +1909,9 @@ def getOcislatestCommitId(ctx):
},
]

def cachePlaywright():
def cacheChromium():
return [{
"name": "upload-playwright-cache",
"name": "upload-chromium-cache",
"image": MINIO_MC,
"environment": minio_mc_environment,
"commands": [
Expand All @@ -1919,21 +1922,21 @@ def cachePlaywright():
],
}]

def checkPlaywrightChromiumCache():
def checkChromiumCache():
return [{
"name": "check-playwright-cache",
"name": "check-chromium-cache",
"image": MINIO_MC,
"environment": minio_mc_environment,
"commands": [
"mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
"mc ls --recursive s3/$CACHE_BUCKET/web",
"bash tests/drone/script.sh check_playwright_cache",
"bash tests/drone/script.sh check_chromium_cache",
],
}]

def restorePlaywrightChromiumCache():
def restoreChromiumCache():
return [{
"name": "restore-playwright-chromium-cache",
"name": "restore-chromium-cache",
"image": MINIO_MC,
"environment": minio_mc_environment,
"commands": [
Expand Down
7 changes: 4 additions & 3 deletions tests/drone/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ get_playwright_version() {
}

# Function to check if the cache exists for the given commit ID
check_playwright_cache() {
check_chromium_cache() {
get_playwright_version

playwright_cache=$(mc find s3/$CACHE_BUCKET/web/$playwright_version/.playwright 2>&1 | grep 'Object does not exist')

if [[ "$playwright_cache" != "" ]]
then
echo "Playwright $playwright_version Chromium exists in cache."
echo "Playwright v$playwright_version supported chromium doesn't exist in cache."
exit 0
fi
exit 78
Expand All @@ -64,7 +64,8 @@ if [[ "$1" == "" ]]; then
echo "Commands:"
echo -e " get_latest_ocis_commit_id \t get the latest oCIS commit ID"
echo -e " check_ocis_cache \t\t check if the cache exists for the given commit ID"
echo -e " check_playwright_cache \t check if the cache exists for the given commit ID"
echo -e " get_playwright_version \t get the playwright version from package.json"
echo -e " check_chromium_cache \t check if the chromium cache exists for the given playwright version"
exit 1
fi

Expand Down
1 change: 0 additions & 1 deletion tests/e2e/cucumber/environment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ BeforeAll(async (): Promise<void> => {

state.browser = await browsers[config.browser]()

console.log(state.browser.version())
// setup keycloak admin user
if (config.keycloak) {
const usersEnvironment = new environment.UsersEnvironment()
Expand Down

0 comments on commit 3bb587f

Please sign in to comment.