Skip to content

Commit

Permalink
Move typescript code to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Feb 24, 2022
1 parent 1a06de0 commit 604b546
Show file tree
Hide file tree
Showing 72 changed files with 33 additions and 344 deletions.
62 changes: 2 additions & 60 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
npm ci
npm test
- name: Check licenses
if: matrix.package == 'kpt-functions' ||
matrix.package == 'create-kpt-functions' ||
if: matrix.package == 'kpt-functions' ||
matrix.package == 'create-kpt-functions' ||
matrix.package == 'demo-functions'
run: |
cd ts/${{ matrix.package }}
Expand All @@ -55,61 +55,3 @@ jobs:
npm run gen-docs
DIFF=$(git status -s)
[[ -z $DIFF ]] || { echo "Need to update docs: $DIFF"; }
go-ci:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
env:
GOPATH: /home/runner/work/kpt-functions-sdk/go
GO111MODULE: on
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.17
id: go
- name: Check out code into GOPATH
uses: actions/checkout@v1
with:
path: go/src/github.com/GoogleContainerTools/kpt-functions-sdk
- name: Build, Test, Lint
run: |
cd go
make all
e2e-ci:
needs: [node-ci, go-ci]
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
node-version: [12.x, 14.x]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install NPM packages
run: |
cd ts/demo-functions
npm ci
- name: Build docker images
if: matrix.platform == 'ubuntu-latest'
run: |
cd ts/demo-functions
npm run kpt:docker-build
- name: Run all e2e tests
if: matrix.platform == 'ubuntu-latest'
run: |
sudo curl https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt -o /usr/local/bin/kpt
sudo chmod +x /usr/local/bin/kpt
tests/e2e.sh
- name: Run non-docker e2e tests
if: matrix.platform == 'macos-latest'
run: |
sudo curl https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt -o /usr/local/bin/kpt
sudo chmod +x /usr/local/bin/kpt
NODOCKER=true tests/e2e.sh
28 changes: 0 additions & 28 deletions .github/workflows/release-create-kpt-functions.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: release-kpt-functions
name: release-typescript-functions

on:
push:
tags:
- release-kpt-functions-*
- release-typescript-functions-*

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dist
node_modules
*.iml
.npmrc
go/.out
ts/go/.out
ts/create-kpt-functions/bin
.DS_Store
*.swo
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion go/pkg/api/util/kptfileutil.go → api/util/kptfileutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"strings"

kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/go/pkg/api/kptfile/v1"
kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/api/kptfile/v1"
"gopkg.in/yaml.v3"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"testing"

kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/go/pkg/api/kptfile/v1"
kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/api/kptfile/v1"
)

func TestReadKptfile(t *testing.T) {
Expand Down
228 changes: 0 additions & 228 deletions tests/e2e.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion go/build/func.Dockerfile → ts/go/build/func.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ FROM alpine:3.10

WORKDIR /app

COPY --from=builder /go/bin /app/
COPY --from=builder /ts/go/bin /app/

ENTRYPOINT ["/app/$FUNC"]
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package main

import (
"github.com/GoogleContainerTools/kpt-functions-sdk/go/pkg/framework/runners"
"github.com/GoogleContainerTools/kpt-functions-sdk/go/pkg/functions/gatekeeper"
"github.com/GoogleContainerTools/kpt-functions-sdk/ts/go/pkg/framework/runners"
"github.com/GoogleContainerTools/kpt-functions-sdk/ts/go/pkg/functions/gatekeeper"
)

const usage = `
Expand Down
Loading

0 comments on commit 604b546

Please sign in to comment.