Skip to content

Commit

Permalink
Merge branch 'epinio-standalone-actions' into epinio-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Feb 21, 2022
2 parents fe8963d + fac6c01 commit a50fc4b
Show file tree
Hide file tree
Showing 39 changed files with 1,067 additions and 123 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/release-rancher-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ jobs:
node-version: '12.x'

- name: Install & Build
run: |
mkdir ${{ env.RELEASE_DIR }}
yarn install --frozen-lockfile
NUXT_ENV_commit=${GITHUB_SHA} NUXT_ENV_version=${GITHUB_REF_NAME} OUTPUT_DIR=${{ env.OUTPUT_DIR }}/${{ env.ARTIFACT_NAME }} ROUTER_BASE='/dashboard' RANCHER_ENV=desktop yarn run build --spa
tar -czf ${{ env.RELEASE_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz -C ${{ env.OUTPUT_DIR }}/${{ env.ARTIFACT_NAME }} .
sha512sum ${{ env.RELEASE_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz > ${{ env.RELEASE_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz.sha512sum
run:
ROUTER_BASE="/dashboard" RANCHER_ENV=desktop ./.github/workflows/scripts/build-dashboard.sh

- name: Upload Build
uses: actions/upload-artifact@v2
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/release-rancher-epinio-standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Release Rancher Dashboard - Rancher Epinio Standalone

on:
push:
tags:
- 'epinio-standalone-v*'

env:
OUTPUT_DIR: dist
RELEASE_DIR: release
ARTIFACT_NAME: rancher-dashboard-epinio-standalone-embed

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@v2
with:
node-version: '12.x'

- name: Install & Build
run:
RANCHER_ENV=epinio ./.github/workflows/scripts/build-dashboard.sh

- name: Upload Build
uses: actions/upload-artifact@v2
with:
path: ${{ env.RELEASE_DIR}}/${{ env.ARTIFACT_NAME }}*
name: ${{ env.ARTIFACT_NAME }}
if-no-files-found: error

release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
persist-credentials: false
- name: Download build
uses: actions/download-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
path: build
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --prerelease
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ env.RELEASE_VERSION }} build/${{ env.ARTIFACT_NAME }}.tar.gz build/${{ env.ARTIFACT_NAME }}.tar.gz.sha512sum
32 changes: 32 additions & 0 deletions .github/workflows/scripts/build-dashboard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

echo "GITHUB_SHA: $GITHUB_SHA"
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "ROUTER_BASE: $ROUTER_BASE"
echo "RANCHER_ENV: $RANCHER_ENV"
echo
echo "RELEASE_DIR: $RELEASE_DIR"
RELEASE_LOCATION="$RELEASE_DIR/$ARTIFACT_NAME"
echo "RELEASE_LOCATION: $RELEASE_LOCATION"
echo
echo "ARTIFACT_NAME: $ARTIFACT_NAME"
ARTIFACT_LOCATION="$OUTPUT_DIR/$ARTIFACT_NAME"
echo "ARTIFACT_LOCATION: $ARTIFACT_LOCATION"
echo
echo "OUTPUT_DIR: $OUTPUT_DIR"

echo Creating release directory
mkdir $RELEASE_DIR

echo Installing dependencies
yarn install --frozen-lockfile

echo Building
NUXT_ENV_commit=$GITHUB_SHA NUXT_ENV_version=$GITHUB_REF_NAME OUTPUT_DIR="$ARTIFACT_LOCATION" ROUTER_BASE="$ROUTER_BASE" RANCHER_ENV=$RANCHER_ENV yarn run build --spa

echo Creating tar
tar -czf $RELEASE_LOCATION.tar.gz -C $ARTIFACT_LOCATION .

echo Creating sha
sha512sum $RELEASE_LOCATION.tar.gz > $RELEASE_LOCATION.tar.gz.sha512sum
10 changes: 7 additions & 3 deletions .github/workflows/scripts/pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const request = require('./request');

const TRIAGE_LABEL = '[zube]: To Triage';
const IN_REVIEW_LABEL = '[zube]: Review';
const IN_TEST_LABEL = '[zube]: To Test';
const DONE_LABEL = '[zube]: Done';
Expand Down Expand Up @@ -132,24 +133,27 @@ async function processClosedAction() {
// The Zube Integration will label the issue with the Done label
// Since it runs via a webhook, it should have done that well before our GitHub action
// is scheduled and has run, but we will check it has the label and wait if not

await waitForLabel(iss, DONE_LABEL);

// Wait
await new Promise(r => setTimeout(r, 5000));

await resetZubeLabels(iss, IN_TEST_LABEL);

// Wait
await new Promise(r => setTimeout(r, 5000));

// Re-open the issue if it is closed
if (iss.state === 'closed') {
console.log(' Re-opening issue');
await request.patch(detail, { state: 'open' });
} else {
console.log(' Expecting issue to be closed, but it is not');
}

// The Zube Integration will label the issue as To Triage now that is has been re-opened
// Wait for that and then we can move it to test
await waitForLabel(iss, TRIAGE_LABEL);
await resetZubeLabels(iss, IN_TEST_LABEL);

console.log('');
});
}
Expand Down
16 changes: 8 additions & 8 deletions assets/styles/themes/_light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ BODY, .theme-light {
--primary-hover-text : #{saturate($lightest, 20%)};
--primary-active-bg : #{darken($primary, 25%)};
--primary-active-text : #{contrast-color(darken($primary, 25%))};
--primary-border : #($primary);
--primary-border : #{$primary};
--primary-banner-bg : #{rgba($primary, 0.15)};
--primary-light-bg : #{rgba($primary, 0.05)};

Expand Down Expand Up @@ -79,7 +79,7 @@ BODY, .theme-light {
--link-hover-text : #{saturate($lightest, 20%)};
--link-active-bg : #{darken($link, 25%)};
--link-active-text : #{contrast-color(darken($link, 25%))};
--link-border : #($link);
--link-border : #{$link};
--link-banner-bg : #{rgba($link, 0.15)};
--link-light-bg : #{rgba($link, 0.05)};

Expand Down Expand Up @@ -110,7 +110,7 @@ BODY, .theme-light {
--default-hover-text : #{saturate($lightest, 20%)};
--default-active-bg : #{darken($light, 25%)};
--default-active-text : #{contrast-color(darken($light, 25%))};
--default-border : #($light);
--default-border : #{$light};
--default-banner-bg : #{rgba($light, 0.15)};
--default-light-bg : #{rgba($light, 0.05)};

Expand Down Expand Up @@ -147,7 +147,7 @@ BODY, .theme-light {
--darker-hover-text : #{saturate($lightest, 20%)};
--darker-active-bg : #{darken($darker, 25%)};
--darker-active-text : #{contrast-color(darken($darker, 25%))};
--darker-border : #($darker);
--darker-border : #{$darker};
--darker-banner-bg : #{rgba($darker, 0.15)};
--darker-light-bg : #{rgba($darker, 0.05)};

Expand Down Expand Up @@ -179,7 +179,7 @@ BODY, .theme-light {
--success-hover-text : #{saturate($lightest, 20%)};
--success-active-bg : #{darken($success, 25%)};
--success-active-text : #{contrast-color(darken($success, 25%))};
--success-border : #($success);
--success-border : #{$success};
--success-banner-bg : #{rgba($success, 0.15)};
--success-light-bg : #{rgba($success, 0.05)};

Expand Down Expand Up @@ -210,7 +210,7 @@ BODY, .theme-light {
--info-hover-text : #{saturate($lightest, 20%)};
--info-active-bg : #{darken($info, 25%)};
--info-active-text : #{contrast-color(darken($info, 25%))};
--info-border : #($info);
--info-border : #{$info};
--info-banner-bg : #{rgba($info, 0.15)};
--info-light-bg : #{rgba($info, 0.05)};

Expand Down Expand Up @@ -241,7 +241,7 @@ BODY, .theme-light {
--warning-hover-text : #{saturate($lightest, 20%)};
--warning-active-bg : #{darken($warning, 25%)};
--warning-active-text : #{contrast-color(darken($warning, 25%))};
--warning-border : #($warning);
--warning-border : #{$warning};
--warning-banner-bg : #{rgba($warning, 0.15)};
--warning-light-bg : #{rgba($warning, 0.05)};

Expand Down Expand Up @@ -272,7 +272,7 @@ BODY, .theme-light {
--error-hover-text : #{saturate($lightest, 20%)};
--error-active-bg : #{darken($error, 25%)};
--error-active-text : #{contrast-color(darken($error, 25%))};
--error-border : #($error);
--error-border : #{$error};
--error-banner-bg : #{rgba($error, 0.15)};
--error-light-bg : #{rgba($error, 0.05)};

Expand Down
30 changes: 28 additions & 2 deletions assets/translations/en-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ generic:
enable: Enable
disable: Disable
experimental: Experimental

deprecated: Deprecated
placeholder: "e.g. {text}"
moreInfo: More Info
Expand Down Expand Up @@ -711,6 +712,7 @@ catalog:
other: Other
partner: Partner
rancher: '{vendor}'
deploysOn: Deploys on {os}
header: Charts
noCharts: 'There are no charts available, have you added any repos?'
noWindows: Your catalogs do not contain any charts capable of being deployed on a Windows cluster.
Expand Down Expand Up @@ -1324,6 +1326,7 @@ cluster:
placeholder: e.g. http://my_host/cloud-config.yml
note: Cloud-init file or url to set in the guestinfo
cloudConfigYaml: Cloud Config YAML
os: Operating System
tags:
label: Tags
description: Tags allow you to attach metadata to objects in the vSphere inventory to make it easier to sort and search for these objects.
Expand Down Expand Up @@ -1677,6 +1680,10 @@ clusterIndexPage:
nodes:
label: Unhealthy Nodes
noRows: There are no unhealthy nodes to show.
componentStatus:
etcd: Etcd
scheduler: Scheduler
controller-manager: Controller Manager

configmap:
tabs:
Expand Down Expand Up @@ -1746,6 +1753,22 @@ etcdInfoBanner:
failedProposals: "Number of failed proposals:"

fleet:
dashboard:
pageTitle: Continuous Delivery Dashboard
menuLabel: Dashboard
welcome: Welcome to Fleet Continuous Delivery
gitOpsScale: GitOps at scale.
learnMore: Learn More.
learnMoreLink: https://fleet.rancher.io
noRepo: "You don't have any Git Repositories in your Workspaces"
getStarted: Get started
thereIsMore: |-
{count, plural,
=1 { There is one other workspace with no repositories}
other { There are { count } other workspaces with no repositories}
}
expandAll: Expand All
collapseAll: Collapse All
cluster:
summary: Resource Summary
nonReady: Non-Ready Bundles
Expand Down Expand Up @@ -4258,7 +4281,7 @@ tableHeaders:
projectDefault: Project Creator Default
branch: Branch
builtIn: Built In
bundlesReady: Bundles
bundlesReady: Bundles Ready
bundleDeploymentsReady: Deployments
builtin: Built-In
chart: Chart
Expand Down Expand Up @@ -4340,11 +4363,14 @@ tableHeaders:
reason: Reason
reclaimPolicy: Reclaim Policy
repo: Repo
repositories: Repositories
repoName: Repository Name
reposReady: Repos Ready
replicas: Replicas
reqRate: Req Rate
resource: Resource
resources: Resources
resourcesReady: Resources Ready
restarts: Restarts
role: Role
roles: Roles
Expand Down Expand Up @@ -5851,7 +5877,6 @@ typeLabel:
one { Cluster Group }
other {Cluster Groups }
}
fleet.cattle.io.gitrepo: |-
{count, plural,
one { Git Repo }
Expand Down Expand Up @@ -6429,6 +6454,7 @@ vncConsole:
### Products
##############################
epinio:
label: Epinio
tableHeaders:
namespace: Namespace
instances:
Expand Down
1 change: 0 additions & 1 deletion assets/translations/zh-hans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5855,7 +5855,6 @@ typeLabel:
one { 集群组 }
other { 集群组 }
}
fleet.cattle.io.gitrepo: |-
{count, plural,
one { Git 仓库 }
Expand Down
Loading

0 comments on commit a50fc4b

Please sign in to comment.