diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0bc31a0dc3..6c7e292caad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,9 @@ on: workflow_call: inputs: BRANCH: - description: "Git branch to fetch code from" + description: Git branch to fetch code from required: true - default: "master" + default: main type: string env: diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index d978288dd2f..5664f38d1c8 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,18 +1,18 @@ -name: "Build Docker image for Deck and push it to GitHub Container Registry" +name: Build Docker image for Deck and push it to GitHub Container Registry on: - workflow_call: - inputs: - IMAGE_VERSION: - description: "Version to use for image tag" - required: true - default: "0.0.0" - type: string - BRANCH: - description: "Git branch to fetch code from" - required: true - default: "master" - type: string + workflow_call: + inputs: + IMAGE_VERSION: + description: Version to use for image tag + required: true + default: "0.0.0" + type: string + BRANCH: + description: Git branch to fetch code from + required: true + default: main + type: string env: CONTAINER_REGISTRY: ghcr.io diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index b3723a4bfb9..1276031caf6 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -1,28 +1,28 @@ name: Release on: - workflow_dispatch: - inputs: - BRANCH: - description: 'Git branch to fetch code from' - required: true - default: 'master' - type: string - THD_DECK_VERSION: - description: 'Version of THD Deck' - required: true - default: "0.0.0" - type: string + workflow_dispatch: + inputs: + BRANCH: + description: Git branch to fetch code from + required: true + default: main + type: string + THD_DECK_VERSION: + description: Version of THD Deck + required: true + default: "0.0.0" + type: string jobs: build: uses: ./.github/workflows/build.yml with: - BRANCH: ${{ inputs.BRANCH }} + BRANCH: ${{ inputs.BRANCH }} docker: needs: build uses: ./.github/workflows/docker-build.yml with: - BRANCH: ${{ inputs.BRANCH }} - IMAGE_VERSION: ${{ inputs.THD_DECK_VERSION }} \ No newline at end of file + BRANCH: ${{ inputs.BRANCH }} + IMAGE_VERSION: ${{ inputs.THD_DECK_VERSION }} \ No newline at end of file diff --git a/README.md b/README.md index 56e29bce7ea..bba3107014a 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,10 @@ The following external resources can be specified with environment variables: For example, `API_HOST=http://spinnaker.prod.netflix.net yarn start` will run Deck with `http://spinnaker.prod.netflix.net` as the API host. +## Development + +Deck has a combination of Angular and React, but is moving to React only. New changes made to the Deck project should use React wherever possible. + ## Testing To run the tests within the application, run `yarn test`. @@ -77,3 +81,46 @@ those existing conventions if you need an integration point that doesn't already Interested in sharing feedback on Spinnaker's UI or contributing to Deck? Please join us at the [Spinnaker UI SIG](https://github.com/spinnaker/governance/tree/master/sig-ui-ux)! + +
+ +# THD-DECK Docs + +
+ +## THD-Deck Sandbox Installation Instructions + +### Build a local image +- `yarn` +- `yarn modules` +- `yarn build` + + +### Push the local image to Artifactory +Once you build a local image, run the following commands: + +```shell +THD_DECK_VERSION={new image number} +``` +```shell +docker build --platform linux/amd64 -f Dockerfile.ubuntu -t docker.artifactory.homedepot.com/cd/thd-deck:${THD_DECK_VERSION} . +``` +```shell +docker tag docker.artifactory.homedepot.com/cd/thd-deck:${THD_DECK_VERSION} us.gcr.io/np-te-cd-tools/cd/thd-deck:${THD_DECK_VERSION} +``` +```shell +docker push docker.artifactory.homedepot.com/cd/thd-deck:${THD_DECK_VERSION} +``` + +### Push the image from Artifactory to GCR +Once the image is pushed to docker.artifactory a Slingshot stage needs to be used +to move the image from Artifactory to GCR. + +Example [pipeline](https://sandbox.spinnaker.homedepot.com/#/applications/cd-thd-deck/executions?pipeline=Push%20Deck%20Image) + +### Update Deck image in spin-operator repository +In spin-operator-np-te-cd-tools repository: +1. Create branch named for new Deck version" +2. In deploy/spinnaker/np-te-cd-tools/overlays/us-dev1/service-settings.yml +3. Update artifactId with new `THD_DECK_VERSION` + 1. `artifactId: us.gcr.io/np-te-cd-tools/cd/thd-deck:${THD_DECK_VERSION}` diff --git a/halconfig/settings.js b/halconfig/settings.js index 039ea00f95c..3e3d6aaf303 100644 --- a/halconfig/settings.js +++ b/halconfig/settings.js @@ -63,6 +63,11 @@ var cloudfoundry = { account: '{%cloudfoundry.default.account%}', }, }; +var cloudrun = { + defaults: { + account: '{%cloudrun.default.account%}', + }, +}; var dcos = { defaults: { account: '{%dcos.default.account%}', @@ -145,6 +150,7 @@ window.spinnakerSettings = { aws: aws, azure: azure, cloudfoundry: cloudfoundry, + cloudrun: cloudrun, dcos: dcos, ecs: ecs, gce: gce, diff --git a/karma-shim.js b/karma-shim.js index 6aa2110839b..c0172403488 100644 --- a/karma-shim.js +++ b/karma-shim.js @@ -34,6 +34,9 @@ testContext.keys().forEach(testContext); testContext = require.context('./packages/cloudfoundry/src', true, /\.spec\.(js|ts|tsx)$/); testContext.keys().forEach(testContext); +testContext = require.context('./packages/cloudrun/src', true, /\.spec\.(js|ts|tsx)$/); +testContext.keys().forEach(testContext); + testContext = require.context('./packages/core/src', true, /\.spec\.(js|ts|tsx)$/); testContext.keys().forEach(testContext); diff --git a/karma.conf.js b/karma.conf.js index c5252fd14bd..1e00dae0485 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -32,6 +32,8 @@ const webpackConfig = { '@spinnaker/azure': path.resolve(`${MODULES_ROOT}/azure/src`), cloudfoundry: path.resolve(`${MODULES_ROOT}/cloudfoundry/src`), '@spinnaker/cloudfoundry': path.resolve(`${MODULES_ROOT}/cloudfoundry/src`), + cloudrun: path.resolve(`${MODULES_ROOT}/cloudrun/src`), + '@spinnaker/cloudrun': path.resolve(`${MODULES_ROOT}/cloudrun/src`), core: path.resolve(`${MODULES_ROOT}/core/src`), '@spinnaker/core': path.resolve(`${MODULES_ROOT}/core/src`), dcos: path.resolve(`${MODULES_ROOT}/dcos/src`), diff --git a/package.json b/package.json index 652749cef8b..189c3f8b7bf 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "packages/appengine", "packages/azure", "packages/cloudfoundry", + "packages/cloudrun", "packages/core", "packages/dcos", "packages/docker", diff --git a/packages/amazon/src/function/configure/FunctionBasicInformation.tsx b/packages/amazon/src/function/configure/FunctionBasicInformation.tsx index 545eee601e1..f94c106cd1b 100644 --- a/packages/amazon/src/function/configure/FunctionBasicInformation.tsx +++ b/packages/amazon/src/function/configure/FunctionBasicInformation.tsx @@ -20,20 +20,26 @@ import type { IAmazonFunction } from '../../domain'; import type { IAmazonFunctionUpsertCommand } from '../../index'; const availableRuntimes = [ - 'nodejs10.x', 'nodejs12.x', + 'nodejs14.x', + 'nodejs16.x', + 'nodejs18.x', 'java8', + 'java8.al2', 'java11', - 'python2.7', - 'python3.6', + 'java17', 'python3.7', 'python3.8', - 'dotnetcore2.1', + 'python3.9', + 'python3.10', 'dotnetcore3.1', + 'dotnet7', + 'dotnet6', + 'dotnet5.0', 'go1.x', - 'ruby2.5', 'ruby2.7', 'provided', + 'provided.al2', ]; export interface IFunctionProps { diff --git a/packages/amazon/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx b/packages/amazon/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx index 0be68fedeaf..3e260e73a12 100644 --- a/packages/amazon/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx +++ b/packages/amazon/src/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.tsx @@ -107,7 +107,7 @@ export const StepPolicyAction = ({ value={step.metricIntervalLowerBound} max={step.metricIntervalUpperBound} onChange={(e) => - updateStep({ ...step, metricIntervalLowerBound: Number.parseInt(e.target.value) }, index) + updateStep({ ...step, metricIntervalLowerBound: Number.parseFloat(e.target.value) }, index) } inputClassName="action-input" /> @@ -122,7 +122,7 @@ export const StepPolicyAction = ({ value={step.metricIntervalUpperBound} min={step.metricIntervalLowerBound} onChange={(e) => - updateStep({ ...step, metricIntervalUpperBound: Number.parseInt(e.target.value) }, index) + updateStep({ ...step, metricIntervalUpperBound: Number.parseFloat(e.target.value) }, index) } inputClassName="action-input" /> diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 78250b2e125..129a937a994 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.5.0](https://github.com/spinnaker/deck/compare/deck-app@2.4.3...deck-app@2.5.0) (2023-03-15) + + +### Features + +* **provider/cloudrun:** Added cloudrun functionality to deck ([#9931](https://github.com/spinnaker/deck/issues/9931)) ([3611e95](https://github.com/spinnaker/deck/commit/3611e9520b2294454a8b5dddc85cb3190722ffc7)) + + + + + +## [2.4.3](https://github.com/spinnaker/deck/compare/deck-app@2.4.2...deck-app@2.4.3) (2023-02-20) + +**Note:** Version bump only for package deck-app + + + + + ## [2.4.2](https://github.com/spinnaker/deck/compare/deck-app@2.4.1...deck-app@2.4.2) (2023-02-07) **Note:** Version bump only for package deck-app diff --git a/packages/app/package.json b/packages/app/package.json index 0dec11164e4..b82a5da517e 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,7 +1,7 @@ { "name": "deck-app", "private": true, - "version": "2.4.2", + "version": "2.5.0", "description": "", "main": "index.js", "scripts": { @@ -17,10 +17,11 @@ "@spinnaker/amazon": "^0.13.5", "@spinnaker/appengine": "^0.1.3", "@spinnaker/cloudfoundry": "^0.1.3", + "@spinnaker/cloudrun": "^0.0.1", "@spinnaker/core": "^0.23.0", "@spinnaker/docker": "^0.0.137", "@spinnaker/ecs": "^0.0.356", - "@spinnaker/google": "^0.2.3", + "@spinnaker/google": "^0.2.4", "@spinnaker/kayenta": "2.0.0", "@spinnaker/kubernetes": "^0.4.0", "@spinnaker/oracle": "^0.0.81", diff --git a/packages/app/src/app.ts b/packages/app/src/app.ts index 86c6d8fa28d..788fa85bb2e 100644 --- a/packages/app/src/app.ts +++ b/packages/app/src/app.ts @@ -15,6 +15,7 @@ import { ORACLE_MODULE } from '@spinnaker/oracle'; import { KAYENTA_MODULE } from '@spinnaker/kayenta'; import { TITUS_MODULE } from '@spinnaker/titus'; import { ECS_MODULE } from '@spinnaker/ecs'; +import { CLOUDRUN_MODULE } from '@spinnaker/cloudrun'; import '@spinnaker/cloudfoundry'; module('netflix.spinnaker', [ @@ -30,4 +31,5 @@ module('netflix.spinnaker', [ KUBERNETES_MODULE, KAYENTA_MODULE, TITUS_MODULE, + CLOUDRUN_MODULE, ]); diff --git a/packages/app/src/settings.js b/packages/app/src/settings.js index 6683223489c..3fdd57fbffe 100644 --- a/packages/app/src/settings.js +++ b/packages/app/src/settings.js @@ -50,13 +50,15 @@ const managedServiceAccountsEnabled = process.env.MANAGED_SERVICE_ACCOUNTS_ENABLED === 'true'; const managedResourcesEnabled = import.meta.env.VITE_MANAGED_RESOURCES_ENABLED === 'true' || process.env.MANAGED_RESOURCES_ENABLED === 'true'; -const manualJudgmentParentPipelineEnabled = import.meta.env.MJ_PARENTPIPELINE_ENABLED === 'true' || false; +const manualJudgmentParentPipelineEnabled = import.meta.env.MJ_PARENTPIPELINE_ENABLED !== 'false'; const onDemandClusterThreshold = import.meta.env.VITE_ON_DEMAND_CLUSTER_THRESHOLD || process.env.ON_DEMAND_CLUSTER_THRESHOLD || '350'; const reduxLoggerEnabled = import.meta.env.VITE_REDUX_LOGGER === 'true' || process.env.REDUX_LOGGER === 'true'; const templatesEnabled = import.meta.env.VITE_TEMPLATES_ENABLED === 'true' || process.env.TEMPLATES_ENABLED === 'true'; const useClassicFirewallLabels = import.meta.env.VITE_USE_CLASSIC_FIREWALL_LABELS === 'true' || process.env.USE_CLASSIC_FIREWALL_LABELS === 'true'; +const helmApiVersionsEnabled = + import.meta.env.VITE_API_VERSIONS_ENABLED === 'true' || process.env.API_VERSIONS_ENABLED === 'true' || false; const functionsEnabled = import.meta.env.VITE_FUNCTIONS_ENABLED === 'true' || process.env.FUNCTIONS_ENABLED === 'true' || false; const k8sRawResourcesEnabled = @@ -91,6 +93,7 @@ window.spinnakerSettings = { 'aws', 'azure', 'cloudfoundry', + 'cloudrun', 'dcos', 'ecs', 'gce', @@ -130,6 +133,7 @@ window.spinnakerSettings = { slack: false, snapshots: false, functions: functionsEnabled, + helmApiVersions: helmApiVersionsEnabled, kubernetesRawResources: k8sRawResourcesEnabled, }, gateUrl: apiHost, @@ -211,6 +215,11 @@ window.spinnakerSettings = { account: 'my-cloudfoundry-account', }, }, + cloudrun: { + defaults: { + account: 'my-cloudrun-account', + }, + }, dcos: { defaults: { account: 'my-dcos-account', diff --git a/packages/appengine/src/loadBalancer/details/details.html b/packages/appengine/src/loadBalancer/details/details.html index 607183038e7..7cec90d5bf0 100644 --- a/packages/appengine/src/loadBalancer/details/details.html +++ b/packages/appengine/src/loadBalancer/details/details.html @@ -27,7 +27,7 @@

{{ctrl.lo Load Balancer Actions diff --git a/packages/azure/src/loadBalancer/details/loadBalancerDetail.html b/packages/azure/src/loadBalancer/details/loadBalancerDetail.html index 98578d016cc..12992e8503f 100644 --- a/packages/azure/src/loadBalancer/details/loadBalancerDetail.html +++ b/packages/azure/src/loadBalancer/details/loadBalancerDetail.html @@ -27,7 +27,7 @@

{{loadBal Load Balancer Actions