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

Generate connection profiles #248

Merged
merged 2 commits into from
Dec 13, 2021
Merged

Generate connection profiles #248

merged 2 commits into from
Dec 13, 2021

Conversation

gzhk
Copy link
Contributor

@gzhk gzhk commented Dec 1, 2021

closes: #179

@gzhk gzhk self-assigned this Dec 1, 2021
@gzhk gzhk changed the title Generate connection profiles Draft: Generate connection profiles Dec 1, 2021
@gzhk gzhk marked this pull request as draft December 1, 2021 14:44
@gzhk gzhk force-pushed the issue-179/connection-profiles branch from 6e4a466 to 80e99fc Compare December 7, 2021 09:14
@gzhk gzhk marked this pull request as ready for review December 7, 2021 09:18
@gzhk gzhk force-pushed the issue-179/connection-profiles branch from 80e99fc to 2ddb6f2 Compare December 7, 2021 10:08
@gzhk gzhk changed the title Draft: Generate connection profiles Generate connection profiles Dec 7, 2021
@gzhk gzhk force-pushed the issue-179/connection-profiles branch 2 times, most recently from eff7dc6 to 5b1aec6 Compare December 7, 2021 16:18
Signed-off-by: Grzegorz Hejduk <grzegorz.hejduk@softwaremill.com>
@gzhk gzhk force-pushed the issue-179/connection-profiles branch from 5b1aec6 to 72b3588 Compare December 7, 2021 16:40
Comment on lines 10 to 19
const testFilesContent = (commands: TestCommands, config: string, files: string[], rootPath: string) =>
files.forEach((f) => {
it(`should create proper ${f} from ${config}`, () => {
const content = commands.getFileContent(`${commands.relativeRoot}/${f}`);
const cleaned = content
.replace(/FABLO_BUILD=(.*?)(\n|$)/g, "FABLO_BUILD=<date with git hash>\n")
.replace(/FABLO_CONFIG=(.*?)(\n|$)/g, "FABLO_CONFIG=<absolute path>\n")
.replace(/CHAINCODES_BASE_DIR=(.*?)(\n|$)/g, "CHAINCODES_BASE_DIR=<absolute path>\n")
.replace(/COMPOSE_PROJECT_NAME=(.*?)(\n|$)/g, "COMPOSE_PROJECT_NAME=<name with timestamp>\n");
.replace(/COMPOSE_PROJECT_NAME=(.*?)(\n|$)/g, "COMPOSE_PROJECT_NAME=<name with timestamp>\n")
.replace(new RegExp(rootPath, "g"), "<absolute path>");
Copy link
Contributor

Choose a reason for hiding this comment

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

sprytnie z tym rootPath. Zadziała to może też na FABLO_CONFIG i CHAINCODES_BASE_DIR? bo jeśli tak, to bym tamte replacy proponował wywalić

druga rzecz - schowałbym ten rootPath tutaj, tzn nie jako parameter, tylko tutaj resolvował const rootPath = resolve(__dirname + "/../");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To nie zadziałało, tam były jakieś inne wartości.

@@ -0,0 +1,122 @@
import { NetworkSettings, OrgConfig, PeerConfig } from "./FabloConfigExtended";
Copy link
Contributor

Choose a reason for hiding this comment

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

fajnie, że w TS 👏

Signed-off-by: Grzegorz Hejduk <grzegorz.hejduk@softwaremill.com>
@gzhk gzhk merged commit ed2edf0 into main Dec 13, 2021
@manjinder98
Copy link

Hi guys!
I noticed you implemented this feature for generating connection profiles but I am not able to find them in fabric-config as specified in the README file.
Screenshot 2021-12-27 at 12 16 01

@dzikowski
Copy link
Contributor

Hi, it is just not released yet. We plan to make a new release in the next few days, so you can just wait, or you can build Fablo from the source code.

If you want to use Fablo from the source code:

  1. Download the source code (main branch)
  2. Execute fablo-build.sh
  3. Use version 0.4.0 in your Fablo config in $schema attribubute
  4. Use fablo.sh script from source code instead of ./fablo

@manjinder98
Copy link

Hi, it is just not released yet. We plan to make a new release in the next few days, so you can just wait, or you can build Fablo from the source code.

If you want to use Fablo from the source code:

  1. Download the source code (main branch)
  2. Execute fablo-build.sh
  3. Use version 0.4.0 in your Fablo config in $schema attribubute
  4. Use fablo.sh script from source code instead of ./fablo

That's perfect! Thanks very much!

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.

Generate connection_profile.yaml
4 participants