Skip to content

Commit

Permalink
feat: Expose spinnaker/kayenta to plugin system
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiupopa07 committed Dec 5, 2023
1 parent 653eeda commit 34912f1
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/ci-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Feature Branch Build

on:
push:
branches:
- bump-version-plugin-system

env:
NODE_VERSION: 12.16.0

jobs:
ci:
# Meta-job that depends on the other job statuses. Branch protection then checks this job status.
name: Kayenta CI
if: startsWith(github.repository, 'spinnaker/')
needs: [test, build]
runs-on: ubuntu-latest
steps:
- run: echo test, build successful

test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile

- name: Unit Tests
run: yarn test

build:
name: Production Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile

- name: Yarn Build
run: yarn build
26 changes: 26 additions & 0 deletions .github/workflows/publish_lib_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to NPM

on:
push:
branches:
- 'bump-version-plugin-system'
paths:
- 'package.json'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.16.0
uses: actions/setup-node@v1
with:
node-version: 12.16.0
- name: publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
build_scripts/publish_github_actions.sh
env:
CI: true
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './stub';
export * from './kayenta';

0 comments on commit 34912f1

Please sign in to comment.