Skip to content

Commit

Permalink
Merge branch 'develop' into feat/pipeline-target-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
m8vago committed Jan 7, 2025
2 parents e0bba87 + b8e4652 commit b687a0b
Show file tree
Hide file tree
Showing 49 changed files with 420 additions and 388 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflows:
- 'product_builder'
branches:
- 'feat/release-candidate'
- 'develop'
types:
- completed
permissions:
Expand Down
36 changes: 20 additions & 16 deletions .github/workflows/product_builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
crux: ${{ steps.filter.outputs.crux }}
cruxui: ${{ steps.filter.outputs.cruxui }}
kratos: ${{ steps.filter.outputs.kratos }}
tag: "0.15.0-rc" # ${{ steps.settag.outputs.tag }}
tag: ${{ steps.settag.outputs.tag }}
extratag: ${{ steps.settag.outputs.extratag }}
version: "0.15.0-rc" # ${{ steps.settag.outputs.version }}
version: ${{ steps.settag.outputs.version }}
minorversion: ${{ steps.settag.outputs.minorversion }}
release: ${{ steps.release.outputs.release }}
steps:
Expand Down Expand Up @@ -669,10 +669,11 @@ jobs:
defaults:
run:
working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }}
needs: [gather_changes, go_build]
needs: [gather_changes, e2e]
if: |
always() &&
(github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
needs.e2e.result == 'success' &&
needs.go_build.result == 'success' &&
(needs.crux_build.result == 'success' || needs.crux_build.result == 'skipped') &&
(needs.crux-ui_build.result == 'success' || needs.crux-ui_build.result == 'skipped') &&
Expand Down Expand Up @@ -734,16 +735,16 @@ jobs:
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/signer:2
needs: [gather_changes, go_push]
# if: |
# always() &&
# (github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
# needs.e2e.result == 'success' &&
# needs.go_build.result == 'success' &&
# (needs.crux_build.result == 'success' || needs.crux_build.result == 'skipped') &&
# (needs.crux-ui_build.result == 'success' || needs.crux-ui_build.result == 'skipped') &&
# (needs.kratos_build.result == 'success' || needs.kratos_build.result == 'skipped') &&
# needs.conventional_commits.result == 'success' &&
# needs.gather_changes.result == 'success' && needs.go_push.result == 'success'
if: |
always() &&
(github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
needs.e2e.result == 'success' &&
needs.go_build.result == 'success' &&
(needs.crux_build.result == 'success' || needs.crux_build.result == 'skipped') &&
(needs.crux-ui_build.result == 'success' || needs.crux-ui_build.result == 'skipped') &&
(needs.kratos_build.result == 'success' || needs.kratos_build.result == 'skipped') &&
needs.conventional_commits.result == 'success' &&
needs.gather_changes.result == 'success' && needs.go_push.result == 'success'
environment: Workflow - Protected
steps:
- name: Login to GHCR
Expand Down Expand Up @@ -799,10 +800,11 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/signer:2
needs: [crux_build, gather_changes]
needs: [crux_build, e2e, gather_changes]
if: |
always() &&
(github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
needs.e2e.result == 'success' &&
(needs.go_build.result == 'success' || needs.go_build.result == 'skipped') &&
needs.crux_build.result == 'success' &&
(needs.crux-ui_build.result == 'success' || needs.crux-ui_build.result == 'skipped') &&
Expand Down Expand Up @@ -861,10 +863,11 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/signer:2
needs: [crux-ui_build, gather_changes]
needs: [crux-ui_build, e2e, gather_changes]
if: |
always() &&
(github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
needs.e2e.result == 'success' &&
(needs.go_build.result == 'success' || needs.go_build.result == 'skipped') &&
(needs.crux_build.result == 'success' || needs.crux_build.result == 'skipped') &&
needs.crux-ui_build.result == 'success' &&
Expand Down Expand Up @@ -923,10 +926,11 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ghcr.io/dyrector-io/dyrectorio/builder-images/signer:2
needs: [kratos_build, gather_changes]
needs: [kratos_build, e2e, gather_changes]
if: |
always() &&
(github.ref_name == 'develop' || github.ref_name == 'main' || github.ref_type == 'tag') &&
needs.e2e.result == 'success' &&
(needs.go_build.result == 'success' || needs.go_build.result == 'skipped') &&
(needs.crux_build.result == 'success' || needs.crux_build.result == 'skipped') &&
(needs.crux-ui_build.result == 'success' || needs.crux-ui_build.result == 'skipped') &&
Expand Down
2 changes: 1 addition & 1 deletion web/crux-ui/e2e/utils/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const createImage = async (page: Page, projectId: string, versionId: stri
const settingsButton = await page.waitForSelector(`[src="/container_config.svg"]:right-of(:text("${image}"))`)
await settingsButton.click()

await page.waitForSelector(`h2:has-text("Image")`)
await page.waitForSelector(`h2:has-text("Image config")`)

return page.url().split('/').pop()
}
Expand Down
33 changes: 18 additions & 15 deletions web/crux-ui/e2e/with-login/container-config/common-editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

const name = 'new-container-name'

const wsSent = wsPatchSent(ws, wsRoute, WS_TYPE_PATCH_CONFIG, wsPatchMatchContainerName(name))
await page.locator('button:has-text("Name")').click()
await page.locator('input[placeholder="Container name"]').fill(name)
await wsSent

Expand All @@ -64,11 +65,12 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

const wsSent = wsPatchSent(ws, wsRoute, WS_TYPE_PATCH_CONFIG, wsPatchMatchExpose('exposeWithTls'))
await page.locator('button:has-text("Expose")').click()
await page.getByRole('button', { name: 'HTTPS', exact: true }).click()
await wsSent

Expand All @@ -82,13 +84,14 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

const user = 23

const wsSent = wsPatchSent(ws, wsRoute, WS_TYPE_PATCH_CONFIG, wsPatchMatchUser(user))
await page.locator('button:has-text("User")').click()
await page.locator('input[placeholder="Container default"]').fill(user.toString())
await wsSent

Expand All @@ -102,7 +105,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -122,7 +125,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -152,7 +155,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -195,7 +198,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -221,7 +224,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -244,7 +247,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -266,7 +269,7 @@ test.describe('Image common config from editor', () => {
const { imageConfigId } = await setup(page, 'routing-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -317,7 +320,7 @@ test.describe('Image common config from editor', () => {
const { imageConfigId } = await setup(page, 'environment-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -341,7 +344,7 @@ test.describe('Image common config from editor', () => {
const { imageConfigId } = await setup(page, 'config-container-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -371,7 +374,7 @@ test.describe('Image common config from editor', () => {
const { imageConfigId } = await setup(page, 'init-container-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -424,7 +427,7 @@ test.describe('Image common config from editor', () => {
const { imageConfigId } = await setup(page, 'volume-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -462,7 +465,7 @@ test.describe('Image common config from editor', () => {

const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test.describe('Filters', () => {
const { imageConfigId } = await setup(page, 'filter-all', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)

await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')

const allButton = await page.locator('button:has-text("All")')

Expand All @@ -33,7 +33,7 @@ test.describe('Filters', () => {
const { imageConfigId } = await setup(page, 'filter-select', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)

await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')

await page.locator(`button:has-text("Common")`).first().click()

Expand All @@ -46,7 +46,7 @@ test.describe('Filters', () => {
const { imageConfigId } = await setup(page, 'sub-filter', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)

await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')

const subFilter = await page.locator(`button:has-text("Network mode")`)

Expand All @@ -61,7 +61,7 @@ test.describe('Filters', () => {
const { imageConfigId } = await setup(page, 'sub-deselect', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)

await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')

const subFilter = await page.locator(`button:has-text("Deployment strategy")`)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ test.describe('Image docker config from editor', () => {
const { imageConfigId } = await setup(page, 'networkmode-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

const mode = 'host'

const wsSent = wsPatchSent(ws, wsRoute, WS_TYPE_PATCH_CONFIG, wsPatchMatchNetworkMode(mode))
await page.locator('button:has-text("Network mode")').click()
await page.locator(`div.grid:has(label:has-text("NETWORK MODE")) button:has-text("${mode}")`).click()
await wsSent

Expand All @@ -51,7 +52,7 @@ test.describe('Image docker config from editor', () => {
const { imageConfigId } = await setup(page, 'dockerlabel-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand All @@ -77,11 +78,12 @@ test.describe('Image docker config from editor', () => {
const { imageConfigId } = await setup(page, 'restartpolicy-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

const wsSent = wsPatchSent(ws, wsRoute, WS_TYPE_PATCH_CONFIG, wsPatchMatchRestartPolicy('always'))
await page.locator('button:has-text("Restart policy")').click()
await page.locator('div.grid:has(label:has-text("RESTART POLICY")) button:has-text("Always")').click()
await wsSent

Expand All @@ -96,7 +98,7 @@ test.describe('Image docker config from editor', () => {
const { imageConfigId } = await setup(page, 'logconfig-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down Expand Up @@ -125,7 +127,7 @@ test.describe('Image docker config from editor', () => {
const { imageConfigId } = await setup(page, 'networks-editor', '1.0.0', NGINX_TEST_IMAGE_WITH_TAG)
const sock = waitSocketRef(page)
await page.goto(TEAM_ROUTES.containerConfig.details(imageConfigId))
await page.waitForSelector('h2:text-is("Image")')
await page.waitForSelector('h2:text-is("Image config")')
const ws = await sock
const wsRoute = TEAM_ROUTES.containerConfig.detailsSocket(imageConfigId)

Expand Down
Loading

0 comments on commit b687a0b

Please sign in to comment.