Skip to content
This repository was archived by the owner on Mar 13, 2021. It is now read-only.

Commit 49db1d7

Browse files
scothisericbottard
authored andcommitted
Drop invoker build support
Function builds going forward will use buildpacks. We no longer need to build or publish docker images from this repo. Fixes #71
1 parent f9e1b9b commit 49db1d7

15 files changed

+37
-253
lines changed

.dockerignore

-5
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22

33
.idea
44
.DS_Store
5+
/*.tgz

.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.*
2+
/*.tgz
3+
/samples
4+
/spec

.travis.docker-push.sh

-13
This file was deleted.

.travis.yml

+13-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
language: node_js
22
node_js: 10
3-
matrix:
4-
include:
5-
- stage: test
6-
before_install:
7-
# - go get github.com/projectriff/riff
8-
- npm install -g greenkeeper-lockfile@1
9-
before_script: greenkeeper-lockfile-update
10-
after_script: greenkeeper-lockfile-upload
11-
- stage: publish
12-
sudo: required
13-
services:
14-
- docker
15-
install: true
16-
script: "./.travis.docker-push.sh"
17-
- stage: fats
18-
script: "curl -s -L https://github.com/projectriff/fats/raw/master/.travis.fats-trigger.sh | bash"
19-
stages:
20-
- test
21-
- name: publish
22-
if: branch = master AND type = push
23-
- name: fats
24-
if: branch = master AND type = push
3+
before_install: npm install -g greenkeeper-lockfile@1
4+
before_script: greenkeeper-lockfile-update
5+
after_script: greenkeeper-lockfile-upload
6+
deploy:
7+
- provider: npm
8+
9+
api_key: "$NPM_TOKEN"
10+
on:
11+
tags: true
12+
- provider: script
13+
script: .travis/publish-gcs.sh
14+
on:
15+
branch: master
2516
notifications:
2617
slack:
2718
secure: K5w3cEFE7TaXwNbJ0ne1RLFfRfa0r09m9obCzTm+1eGoxtTG4UPR7PTKs3USSbtWutFA3xlonehtF3Htux/M7qkMzTJlZlvPbLFQlegmjO2a6i8uT+aBblG+WhqGhg7XQPOCPIrOjRxg/9OD6Jbh3dQbh1p9EV18BNkskm9Rth72y+zo6E8NtIM4i/jqrk8/wnWm6TlTGAi3A/hqygDGM9z/96CMIUzWlniI2mWEl+aAuCA8/Qd+cfvxj5fH+/0Ewi+LesV4fOXUSW73gEbD0HXYhfj62fNRju+5Adq6Oh4NMKGBIJU9kPIQBSIDq9TExXM8X0MmQ0bfYzLnNGPv6j4pPBbCpMaaabIef+K7nJ7F9L8I4jPvfn/XZLDlFdTocEvDBVg51JA6BqXdRhkOQP32UIm3ZmCnus02vvApqXo7AAIvIFWiKZkS+qRo1ZdxP7/nNdfkgSowLYhfGqmIxDDwzrSWyCDZVROkORMt+PCkCzlL0jpp2WywlC20vvS7OILxn2YTA1JJuRbTAVE00qpFCczcGWWLx9t2jSMmbIRSXMOhkmD8heVOo2zc6/sB5zZYkFJiIeLKg9aFIqW875dFBYt1Z3FRnZRLVSaFVw486yLeztdAIl1WeBDIacx5FYKCvWhLSmDWG9rUPyZdqEEhPrE0MuUWpwG7pC/DhEE=

.travis/publish-gcs.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
version=${1:-`cat package.json | jq -r '.version'`}
4+
commit=$(git rev-parse HEAD)
5+
6+
gcloud auth activate-service-account --key-file <(echo $GCLOUD_CLIENT_SECRET | base64 --decode)
7+
8+
npm pack
9+
10+
package=projectriff-node-function-invoker-${version}.tgz
11+
bucket=gs://projectriff/node-function-invoker/releases
12+
13+
gsutil cp -a public-read ${package} ${bucket}/v${version}/node-function-invoker-${version}.tgz
14+
gsutil cp -a public-read ${package} ${bucket}/v${version}/snapshots/node-function-invoker-${version}-${commit}.tgz
15+
gsutil cp -a public-read ${package} ${bucket}/latest/node-function-invoker.tgz

Dockerfile

-8
This file was deleted.

build.sh

-6
This file was deleted.

docs/riff_create_node.md

-48
This file was deleted.

docs/riff_init_node.md

-46
This file was deleted.

node-invoker.yaml

-37
This file was deleted.

package-lock.json npm-shrinkwrap.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@projectriff/node-function-invoker",
3-
"version": "0.0.9-snapshot",
3+
"version": "0.1.0-snapshot",
44
"author": "Eric Bottard",
55
"license": "Apache-2.0",
66
"description": "node function invoker for riff",

spec/docs.spec.js

-54
This file was deleted.

spec/version.spec.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
const fs = require('fs');
18-
const path = require('path');
19-
const yaml = require('js-yaml');
20-
2117
describe('version', () => {
2218

2319
const { version } = require('../package.json');
2420

25-
it('matches the package lock version', async () => {
26-
const packageLock = require('../package-lock.json');
21+
it('matches the shrinkwrap version', async () => {
22+
const packageLock = require('../npm-shrinkwrap.json');
2723
expect(packageLock.version).toBe(version);
2824
});
2925

30-
it('matches the invoker.yaml version', async () => {
31-
const filepath = path.resolve(__dirname, '..', 'node-invoker.yaml');
32-
const invokerResource = yaml.safeLoad(fs.readFileSync(filepath, 'utf8'));
33-
expect(invokerResource.spec.version).toBe(version);
34-
});
35-
3626
if (process.env.TRAVIS_TAG) {
3727
it('matches the tag name', () => {
3828
expect(process.env.TRAVIS_TAG).toBe(`v${version}`);

0 commit comments

Comments
 (0)