Skip to content

Commit

Permalink
Merge branch 'main' into 435-truncated-table-cells
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyFigueroa committed Nov 6, 2024
2 parents 08db613 + 4403aa4 commit 9f21d6d
Show file tree
Hide file tree
Showing 46 changed files with 1,424 additions and 350 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@ jobs:
test:
uses: ./.github/workflows/pr-tests.yaml

smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup Environment (Go, Node, Homebrew, UDS CLI, k3d)
uses: ./.github/actions/setup

- name: smoke-test
run: |
uds run test:smoke
push:
runs-on: ubuntu-latest
needs: test
needs: [test, smoke-test]
permissions:
contents: write
packages: write
Expand All @@ -37,16 +50,17 @@ jobs:
- name: Setup Environment (Go, Node, Homebrew, UDS CLI, k3d)
uses: ./.github/actions/setup

- name: smoke-test
run: uds run test:smoke
- name: Iron Bank Login
env:
REGISTRY_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
run: echo "${{ env.REGISTRY_PASSWORD }}" | uds zarf tools registry login -u "${{ env.REGISTRY_USERNAME }}" --password-stdin registry1.dso.mil
shell: bash

- name: Publish
run: |
uds run build:publish-uds-runtime --set REF=nightly-unstable --set DIR=hack/nightly
- name: Build binary artifacts
run: |
uds run build:all
uds run build:publish-uds-runtime --set REF=nightly-unstable --set FLAVOR=unicorn --set DIR=hack/nightly
uds run build:publish-uds-runtime --set REF=nightly-unstable --set FLAVOR=registry1 --set DIR=hack/nightly
- name: Update nightly-unstable tag
env:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/post-release-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial

# This workflow runs smoke tests against the unicorn and registry1 flavors of the released UDS Runtime packages.
name: Post Release Tests
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * 1" # Runs Mondays at 9:00 AM UTC, which is 3:00 AM MT during Daylight Saving Time

permissions:
contents: read

jobs:
smoke-test-flavors:
runs-on: ubuntu-latest
strategy:
matrix:
flavor: [registry1, unicorn]
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup Environment (Go, Node, Homebrew, UDS CLI, k3d)
uses: ./.github/actions/setup

- name: Iron Bank Login
env:
REGISTRY_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
run: echo "${{ env.REGISTRY_PASSWORD }}" | uds zarf tools registry login -u "${{ env.REGISTRY_USERNAME }}" --password-stdin registry1.dso.mil
shell: bash

- name: smoke-test
run: |
uds run test:smoke-flavor --set FLAVOR=${{ matrix.flavor }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
type: [unit, e2e, e2e-in-cluster, api, local-auth, e2e-reconnect]
type: [unit, e2e, e2e-in-cluster, api, local-auth, e2e-connections]
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions:
contents: read

jobs:

tag-new-version:
permissions: write-all
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,14 +51,19 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: smoke-test
run: uds run test:smoke --set DIR=hack/test
run: uds run test:smoke

- name: Iron Bank Login
env:
REGISTRY1_USERNAME: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
REGISTRY1_PASSWORD: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
run: echo "${{ env.REGISTRY1_PASSWORD }}" | uds zarf tools registry login -u "${{ env.REGISTRY1_USERNAME }}" --password-stdin registry1.dso.mil
shell: bash

- name: Publish
run: |
uds run build:publish-uds-runtime
- name: Build binary artifacts
run: uds run build:all
uds run build:publish-uds-runtime --set FLAVOR=unicorn
uds run build:publish-uds-runtime --set FLAVOR=registry1
- name: Tar ui/build for release
run: tar -czf build/uds-runtime-ui.tar.gz ui/build
Expand Down
26 changes: 26 additions & 0 deletions hack/flavors/common/zarf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial

kind: ZarfPackageConfig
metadata:
name: uds-common-runtime
description: "UDS Common Runtime"
components:
- name: uds-runtime
required: true
charts:
- name: uds-runtime
localPath: ../../../chart
namespace: uds-runtime
version: 0.1.0
actions:
onDeploy:
after:
- description: Validate Runtime Package
maxTotalSeconds: 300
wait:
cluster:
kind: packages.uds.dev
name: uds-runtime
namespace: uds-runtime
condition: "'{.status.phase}'=Ready"
6 changes: 6 additions & 0 deletions hack/flavors/values/registry1-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2024 Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial

image:
repository: registry1.dso.mil/ironbank/opensource/defenseunicorns/uds/runtime
tag: v0.8.0
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"zarf.yaml",
"tasks.yaml",
"tasks/build.yaml",
"tasks/test.yaml",
"chart/values.yaml"
]
}
Expand Down
62 changes: 62 additions & 0 deletions src/pkg/api/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,52 @@ const docTemplate = `{
}
}
},
"/api/v1/cluster": {
"post": {
"description": "Switch the currently viewed cluster",
"consumes": [
"application/json"
],
"tags": [
"cluster"
],
"parameters": [
{
"description": "example body: {",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/client.ClusterInfo"
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/clusters": {
"get": {
"description": "get list of clusters with context names from local kubeconfig",
"produces": [
"application/json"
],
"tags": [
"clusters"
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/resources/cluster-ops/hpas": {
"get": {
"description": "Get HPAs",
Expand Down Expand Up @@ -3213,6 +3259,22 @@ const docTemplate = `{
}
}
}
},
"definitions": {
"client.ClusterInfo": {
"type": "object",
"properties": {
"context": {
"type": "string"
},
"name": {
"type": "string"
},
"selected": {
"type": "boolean"
}
}
}
}
}`

Expand Down
62 changes: 62 additions & 0 deletions src/pkg/api/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,52 @@
}
}
},
"/api/v1/cluster": {
"post": {
"description": "Switch the currently viewed cluster",
"consumes": [
"application/json"
],
"tags": [
"cluster"
],
"parameters": [
{
"description": "example body: {",
"name": "request",
"in": "body",
"required": true,
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/client.ClusterInfo"
}
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/clusters": {
"get": {
"description": "get list of clusters with context names from local kubeconfig",
"produces": [
"application/json"
],
"tags": [
"clusters"
],
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/api/v1/resources/cluster-ops/hpas": {
"get": {
"description": "Get HPAs",
Expand Down Expand Up @@ -3202,5 +3248,21 @@
}
}
}
},
"definitions": {
"client.ClusterInfo": {
"type": "object",
"properties": {
"context": {
"type": "string"
},
"name": {
"type": "string"
},
"selected": {
"type": "boolean"
}
}
}
}
}
39 changes: 39 additions & 0 deletions src/pkg/api/docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
definitions:
client.ClusterInfo:
properties:
context:
type: string
name:
type: string
selected:
type: boolean
type: object
info:
contact: {}
paths:
Expand All @@ -10,6 +20,35 @@ paths:
description: OK
tags:
- auth
/api/v1/cluster:
post:
consumes:
- application/json
description: Switch the currently viewed cluster
parameters:
- description: 'example body: {'
in: body
name: request
required: true
schema:
additionalProperties:
$ref: '#/definitions/client.ClusterInfo'
type: object
responses:
"200":
description: OK
tags:
- cluster
/api/v1/clusters:
get:
description: get list of clusters with context names from local kubeconfig
produces:
- application/json
responses:
"200":
description: OK
tags:
- clusters
/api/v1/resources/cluster-ops/hpas:
get:
consumes:
Expand Down
Loading

0 comments on commit 9f21d6d

Please sign in to comment.