Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse package.json and section.config.json for better output, and replace logging pipeline #120

Merged
merged 11 commits into from Jun 3, 2021

Conversation

AskAlice
Copy link
Contributor

@AskAlice AskAlice commented May 21, 2021

The package.json can look something like this:

{
  "name": "cra",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "serve": "^11.3.2"
  },
  "Section": {
    "accountId": "1887",
    "appId": "7749",
    "environment": "Production",
    "start-script": "start" // not presently supported, but may be in the future
  },
  "scripts": {
    "start": "serve -s build -l 4001 -l 8080",
    "deploy": "sectionctl deploy -a 1887 -i 7749"
  }
}

and running sectionctl deploy will work without specifying --accountid (-a), --appid (-i) or --environment (-e)

furthermore the deploy will output the git repo URL and the tarball hash, as well as your nodejs module name and module version, based on the section.config.json and the --AppPath parameter

This also fixes the spinner flashing on windows terminal as per briandowns/spinner#116

@AskAlice AskAlice marked this pull request as draft May 21, 2021 17:40
log levels and timestamps in stdout. Much prettier.
@AskAlice AskAlice changed the title parse package.json and section.config.json for better output redo logging, parse package.json and section.config.json for better output Jun 1, 2021
@AskAlice AskAlice changed the title redo logging, parse package.json and section.config.json for better output reevaluate logging, parse package.json and section.config.json for better output Jun 1, 2021
@AskAlice AskAlice changed the title reevaluate logging, parse package.json and section.config.json for better output parse package.json and section.config.json for better output; reevaluate logging Jun 1, 2021
@AskAlice AskAlice changed the title parse package.json and section.config.json for better output; reevaluate logging parse package.json and section.config.json for better output, and replace logging pipeline Jun 1, 2021
add error handling

fix

"clean up"

fix tests better

add clarification

caps

update parsing

lint

fix unused error while in the midst of erroring

revive the old
@AskAlice AskAlice marked this pull request as ready for review June 3, 2021 15:03
n, err := CIRead.Read(buf)
if err != nil{
return err
// if err := json.Unmarshal(sectionConfigContent.Bytes(), &sectionConfig); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of commented out code

if moduleVersion == "unknown"{
log.Debug().Msg("failed to pair app path (aka proxy name) with image (version)")
}
// for proxy, _ := range sectionConfig["proxychain"]{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here

Copy link
Collaborator

@mwickman mwickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on a call with Alice

@AskAlice AskAlice merged commit 9306edf into main Jun 3, 2021
@AskAlice AskAlice deleted the deploy-better-integration branch June 3, 2021 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants