Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
Merged

8.2.3 #266

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f197e6
configured testing yml
trulyronak Jul 13, 2020
0d88e29
adjusted to make sure there are no dependencies
trulyronak Jul 13, 2020
f65bad2
added configuration for debian testing
trulyronak Jul 13, 2020
b69124b
added checkout
trulyronak Jul 13, 2020
4122d7f
debugging
trulyronak Jul 13, 2020
3eada20
stuck
trulyronak Jul 13, 2020
eefcc6f
Merge remote-tracking branch 'origin/develop' into feature/debian-rel…
trulyronak Jul 14, 2020
4c5e206
finalized local testing
trulyronak Jul 14, 2020
06d6722
added checkout
trulyronak Jul 14, 2020
c232967
upload all types
trulyronak Jul 14, 2020
cdcdd56
test org secret configuration
trulyronak Jul 14, 2020
ac4d1ca
fixed secret accesssing issue
trulyronak Jul 14, 2020
7479e56
just in case
trulyronak Jul 14, 2020
e53feb1
utility
trulyronak Jul 14, 2020
8cb5e47
ready for release flow
trulyronak Jul 14, 2020
2aff291
Merge remote-tracking branch 'origin/develop' into feature/brew-relea…
trulyronak Jul 14, 2020
13c9658
testing with org credentials
trulyronak Jul 14, 2020
e44a906
ready for release flow
trulyronak Jul 14, 2020
138e595
Merge pull request #258 from trulyronak/feature/brew-release-flow
acunniffe Jul 15, 2020
c79371e
Merge branch 'develop' into feature/debian-release-flow
acunniffe Jul 15, 2020
afca552
Merge pull request #259 from trulyronak/feature/debian-release-flow
acunniffe Jul 15, 2020
082de14
removed core from optic repo. made it linkable
Jul 15, 2020
ccbbb8d
cleanup workflows
Jul 15, 2020
06798eb
check out the code before building it
Jul 15, 2020
85bde38
Merge pull request #261 from opticdev/remove-and-reference-core
acunniffe Jul 15, 2020
29e2818
mockttp should be a runtime dependency for cli-shared
devdoshi Jul 16, 2020
e290ddb
hotfix for mockttp issue and version bump
Jul 16, 2020
e68cea2
Merge pull request #265 from opticdev/hotfix-for-dep
acunniffe Jul 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/deployDebian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Container image that runs your code
FROM node:latest

# install basics

# RUN apt update
# RUN apt-get install -y git default-jre sudo apt-utils apt-transport-https
# RUN npm install -g @oclif/dev-cli
# RUN "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
# RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
# RUN apt update
# RUN apt-get install -y sbt
# RUN apt-get install ruby-full -y
# RUN gem install deb-s3

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh

# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions .github/deployDebian/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Build Optic'
description: 'Builds Optic'
inputs:
AWS_ACCESS_KEY_ID:
description: "AWS_ACCESS_KEY_ID"
required: true
AWS_SECRET_ACCESS_KEY:
description: "AWS_SECRET_ACCESS_KEY"
required: true
BUCKET_NAME:
description: "BUCKET_NAME"
required: true
PACKAGE_NAME:
description: "PACKAGE_NAME"
required: true
PREFIX_NAME:
description: "The prefix for the package"
required: true
runs:
using: 'docker'
image: 'Dockerfile'
31 changes: 31 additions & 0 deletions .github/deployDebian/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
echo "Installing Essentials"
apt update
apt install -y git default-jre sudo apt-utils apt-transport-https
npm install -g @oclif/dev-cli
echo "Installing SBT for Scala"
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
apt update
apt install -y sbt

echo "Cloning Optic"
cd /tmp
git clone https://github.com/trulyronak/optic
cd optic
echo "Checking out specific branch (eventually this will just be release)"
git checkout feature/debian-release-flow
echo "Building Optic"
source sourceme.sh
optic_build
echo "Packing Debian Release"
cd ./workspaces/local-cli
npm install
oclif-dev pack:deb
echo "Installing Ruby"
apt install ruby-full -y
gem install deb-s3
export PATH_TO_DEB_AMD="/tmp/optic/workspaces/local-cli/dist/deb/api_$(npm view $INPUT_NPM_PACKAGE_NAME version)-1_amd64.deb"
export PATH_TO_DEB_ARM="/tmp/optic/workspaces/local-cli/dist/deb/api_$(npm view $INPUT_NPM_PACKAGE_NAME version)-1_armel.deb"
deb-s3 upload -e --access-key-id=$INPUT_AWS_ACCESS_KEY_ID --secret-access-key=$INPUT_AWS_SECRET_ACCESS_KEY --bucket $INPUT_BUCKET_NAME --prefix $INPUT_PREFIX_NAME --codename $INPUT_PACKAGE_NAME --preserve-versions $PATH_TO_DEB_AMD
deb-s3 upload -e --access-key-id=$INPUT_AWS_ACCESS_KEY_ID --secret-access-key=$INPUT_AWS_SECRET_ACCESS_KEY --bucket $INPUT_BUCKET_NAME --prefix $INPUT_PREFIX_NAME --codename $INPUT_PACKAGE_NAME --preserve-versions $PATH_TO_DEB_ARM
26 changes: 0 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,6 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: "checkout source"
uses: actions/checkout@v2
- name: "Set up JDK 1.8"
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: pwd
run: pwd
- name: "where is the code"
run: echo $GITHUB_WORKSPACE
- name: ls
run: ls -la $GITHUB_WORKSPACE
- name: "list sbt projects"
run: cd "$GITHUB_WORKSPACE/core" && sbt projects
- name: "build domain.js artifact"
run: cd "$GITHUB_WORKSPACE/core" && sbt fullOptJS
env:
SBT_OPTS: "-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2G -Xss2M -Duser.timezone=GMT"
- name: "check artifact"
run: ls -la "$GITHUB_WORKSPACE/core/optic/js/target/scala-2.12/optic-core-opt.js"
- name: "copy artifact"
run: cp "$GITHUB_WORKSPACE/core/optic/js/target/scala-2.12/optic-core-opt.js" "$GITHUB_WORKSPACE/workspaces/domain/src/domain.js"

- name: "set up node.js"
uses: actions/setup-node@v1
with:
Expand All @@ -52,7 +30,3 @@ jobs:
run: yarn install
- name: "build workspaces"
run: yarn wsrun --stages --report --fast-exit ws:build
- name: "check domain src directory"
run: ls -laR "$GITHUB_WORKSPACE/workspaces/domain/src"
- name: "check domain build directory"
run: ls -laR "$GITHUB_WORKSPACE/workspaces/domain/build"
2 changes: 0 additions & 2 deletions .github/workflows/featurepeek.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:
run: yarn run bump "0.1.0-pr.$GITHUB_RUN_ID"
- name: "yarn install, post version changes"
run: yarn install
- name: "build domain"
run: yarn run build-domain
- name: "build workspaces"
run: yarn wsrun --stages --report --fast-exit ws:build
- name: Install dependencies
Expand Down
48 changes: 18 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
name: Release

env:
HOMEBREW_REPO: opticdev/homebrew-optic
BUCKET_NAME: optic-packages
PACKAGE_NAME: api
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} # requires repo:write scope (https://github.com/peter-evans/repository-dispatch#token)

on:
push:
Expand Down Expand Up @@ -46,37 +42,29 @@ jobs:

# Creates debian package for users to install, hosted on s3
release-deb:
needs: release-npm
runs-on: ubuntu-latest
steps:
- run: echo "Debian Release has not been configured yet"
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# - run: npm ci
# - name: Install APT Utils
# run: sudo apt-get install apt-utils
# - run: sudo npm i -g @oclif/dev-cli
# - run: sudo oclif-dev pack:deb
# - uses: actions/setup-ruby@v1
# with:
# ruby-version: '2.6'
# - run: sudo gem install deb-s3
# - name: Upload to s3
# run: sudo deb-s3 upload -e --access-key-id=${{ env.AWS_ACCESS_KEY_ID }} --secret-access-key=${{ env.AWS_SECRET_ACCESS_KEY }} --bucket $BUCKET_NAME --codename ${{ env.PACKAGE_NAME }} --preserve-versions dist/deb/legume_$(npm view ${{ env.PACKAGE_NAME }} version)-1_amd64.deb
- uses: actions/checkout@v2 # this part is required for github actions on the site
with:
ref: feature/debian-release-flow
- uses: ./.github/deployDebian/
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUCKET_NAME: optic-packages
PACKAGE_NAME: api
NPM_PACKAGE_NAME: "@useoptic/cli"
PREFIX_NAME: deb

# Triggers Homebrew Release - Configure homebrew/core fork repository in the env settings above
# Requires Repository Access Token (https://github.com/peter-evans/repository-dispatch#token) with repo:write scope
trigger-brew-release:
needs: release-npm
runs-on: ubuntu-latest
steps:
- run: echo "Brew Release has not been configured yet"
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v1.1.0
# with:
# token: ${{ env.REPO_ACCESS_TOKEN }}
# repository: ${{ env.HOMEBREW_REPO }}
# event-type: version-update
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1.1.0
with:
token: ${{ secrets.HOMEBREW_UTILITY_ACCOUNT }}
repository: opticdev/homebrew-optic
event-type: version-update
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
25 changes: 25 additions & 0 deletions .github/workflows/testDebian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test debian
on:
push:
branches:
- feature/debian-release-flow

env:
HOMEBREW_REPO: opticdev/homebrew-optic
PACKAGE_NAME: api

jobs:
test-deploy-debian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # this part is required for github actions on the site
with:
ref: feature/debian-release-flow
- uses: ./.github/deployDebian/
with:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUCKET_NAME: optic-packages
PACKAGE_NAME: api
NPM_PACKAGE_NAME: "@useoptic/cli"
PREFIX_NAME: deb
2 changes: 1 addition & 1 deletion Developer-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ This error may be seen when running `npm start` to build and run a UI workspace.
- If you run into further problems, please let us know the tools you are using, and the errors you are seeing, for reference. While we can't support every environment, it can be helpful to know where problems exist. In the mean time...
- If you still see workspace-specific module resolution issues, run `yarn install` in the target workspace. Include this output in your issue report for reference.
- Running `yarn run ws:build` in all workspaces should resolve the issue for the entire project:
- `domain-types`, `domain`, `domain-utilities`, `cli-config`, `cli-shared`, `client-utilities`, `proxy`, `cli-client`, `ui`, `cli-scripts`, `cli-server`, `test-data`, `local-cli`, `agent-cli`, `ci-cli`
- `cli-config`, `cli-shared`, `client-utilities`, `proxy`, `cli-client`, `ui`, `cli-scripts`, `cli-server`, `test-data`, `local-cli`, `agent-cli`, `ci-cli`
- If `yarn run ws:build` throws errors about dependencies for one of the workspaces, it's possible Yarn didn't install the dependencies as expected. Try `yarn install` followed by another `yarn run ws:build` and let us know which workspace threw this error.

### Additional Notes
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
"publish-local": "OPTIC_PUBLISH_SCOPE=private node ./workspaces/scripts/publish.js",
"publish-github": "OPTIC_PUBLISH_SCOPE=github node ./workspaces/scripts/publish.js",
"publish": "OPTIC_PUBLISH_SCOPE=public node ./workspaces/scripts/publish.js",
"bump": "node ./workspaces/scripts/bump.js"
"bump": "node ./workspaces/scripts/bump.js",
"bump-core": "node ./workspaces/scripts/bump-core.js"
},
"workspaces": [
"workspaces/domain-types",
"workspaces/domain",
"workspaces/domain-utilities",
"workspaces/saas-types",
"workspaces/cli-config",
"workspaces/cli-shared",
Expand Down
19 changes: 17 additions & 2 deletions sourceme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,34 @@ optic_build() {
cd "$OPTIC_SRC_DIR"

yarn install
yarn run build-domain
optic_workspace_clean
optic_workspace_build
)
}
optic_build_with_linked_core() {
(
set -o errexit
cd "$OPTIC_SRC_DIR"

yarn link @useoptic/domain
yarn link @useoptic/domain-types
yarn link @useoptic/domain-utilities

yarn install

optic_workspace_clean
optic_workspace_build

)
}

optic_build_for_release() {
(
set -o errexit
cd "$OPTIC_SRC_DIR"

yarn install
yarn run build-domain-optimized

optic_workspace_clean
optic_workspace_build
)
Expand Down
4 changes: 2 additions & 2 deletions workspaces/agent-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/agent-cli",
"version": "8.2.2",
"version": "8.2.3",
"author": "@useoptic",
"bin": {
"optic-agent": "./bin/run"
Expand All @@ -15,7 +15,7 @@
"@oclif/command": "^1",
"@oclif/config": "^1",
"@oclif/plugin-help": "^3",
"@useoptic/cli-shared": "8.2.2",
"@useoptic/cli-shared": "8.2.3",
"dotenv": "^8.2.0",
"jwt-decode": "^2.2.0",
"tslib": "^1",
Expand Down
6 changes: 3 additions & 3 deletions workspaces/ci-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/ci-cli",
"version": "8.2.2",
"version": "8.2.3",
"author": "@useoptic",
"bin": {
"optic-ci": "./bin/run"
Expand All @@ -15,8 +15,8 @@
"@oclif/command": "^1",
"@oclif/config": "^1",
"@oclif/plugin-help": "^3",
"@useoptic/cli-config": "8.2.2",
"@useoptic/cli-shared": "8.2.2",
"@useoptic/cli-config": "8.2.3",
"@useoptic/cli-shared": "8.2.3",
"dotenv": "^8.2.0",
"jwt-decode": "^2.2.0",
"tslib": "^1",
Expand Down
6 changes: 3 additions & 3 deletions workspaces/cli-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/cli-client",
"version": "8.2.2",
"version": "8.2.3",
"scripts": {
"ws:build": "yarn run tsc -b --verbose",
"ws:clean": "rm -rf build/*",
Expand All @@ -14,8 +14,8 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"dependencies": {
"@useoptic/cli-config": "8.2.2",
"@useoptic/client-utilities": "8.2.2",
"@useoptic/cli-config": "8.2.3",
"@useoptic/client-utilities": "8.2.3",
"bottleneck": "^2.19.5",
"cross-fetch": "^3.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion workspaces/cli-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/cli-config",
"version": "8.2.2",
"version": "8.2.3",
"scripts": {
"ws:test": "echo config",
"ws:build": "yarn run tsc -b --verbose",
Expand Down
4 changes: 2 additions & 2 deletions workspaces/cli-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/cli-scripts",
"version": "8.2.2",
"version": "8.2.3",
"scripts": {
"ws:test": "echo scripts",
"ws:build": "yarn run tsc -b --verbose",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"node-notifier": "^7.0.0",
"analytics-node": "^3.4.0-beta.1",
"@useoptic/cli-shared": "8.2.2"
"@useoptic/cli-shared": "8.2.3"
},
"devDependencies": {
"@types/node-notifier": "^6.0.1"
Expand Down
12 changes: 6 additions & 6 deletions workspaces/cli-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useoptic/cli-server",
"version": "8.2.2",
"version": "8.2.3",
"scripts": {
"ws:build": "yarn run tsc -b --verbose",
"ws:clean": "rm -rf build/*",
Expand All @@ -14,11 +14,11 @@
"main": "build/index.js",
"types": "build/index.d.ts",
"dependencies": {
"@useoptic/cli-client": "8.2.2",
"@useoptic/cli-config": "8.2.2",
"@useoptic/cli-scripts": "8.2.2",
"@useoptic/cli-shared": "8.2.2",
"@useoptic/ui": "8.2.2",
"@useoptic/cli-client": "8.2.3",
"@useoptic/cli-config": "8.2.3",
"@useoptic/cli-scripts": "8.2.3",
"@useoptic/cli-shared": "8.2.3",
"@useoptic/ui": "8.2.3",
"avsc": "^5.4.18",
"body-parser": "^1.19.0",
"cors": "^2.8.5",
Expand Down
Loading