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

24001 Updated CI/CD scripts #698

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#24001

Description of changes:

  • updated branch in codecov.yaml
  • deleted obsolete Makefile
  • app version = 7.4.0
  • added scripts to package.json
  • updated CD script
  • updated CI script

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

- deleted obsolete Makefile
- app version = 7.4.0
- added scripts to package.json
- updated CD script
- updated CI script
@severinbeauvais severinbeauvais self-assigned this Oct 24, 2024
@@ -1,32 +1,29 @@
name: BUSINESS FILINGS UI CD
name: Business Filings UI CD
Copy link
Collaborator Author

Choose a reason for hiding this comment

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


on:
push:
branches:
- main
- feature*
- hotfix *
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think I need paths here since the UI code is not in a subfolder.

environment: ${{ inputs.environment }}
tagname: ${{ inputs.tagname }}
target: ${{ inputs.target }}
app_name: "business-filings-ui"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As above, I don't think I need working_directory here.

@@ -1,79 +1,19 @@
name: BUSINESS FILINGS UI CI
name: Business Filings UI CI
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

branches:
- main
- feature*
workflow_dispatch:

defaults:
run:
shell: bash
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Again, no working_directory here.

uses: bcgov/bcregistry-sre/.github/workflows/frontend-ci.yaml@main
with:
node_version: "20.5.1"
app_name: "business-filings-ui"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Again, no working_directory here.

uses: bcgov/bcregistry-sre/.github/workflows/frontend-ci.yaml@main
with:
node_version: "20.5.1"
app_name: "business-filings-ui"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, I didn't include codecov_flag since this is the only project in the codecov.yaml file.

codecov.yaml Outdated
@@ -1,6 +1,6 @@
codecov:
require_ci_to_pass: true
branch: master
branch: development
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know if this will work because this repo doesn't have a development branch. (sbc-auth doesn't either and I copied this from there.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

should be "main". The codecov is broken now. So doesn't matter for now.

Makefile Outdated
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Obsolete file.

"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"lint": "eslint . --ext .js,.ts,.vue",
"build-check": "vite build",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this, and perhaps some of the others, might be needed by scripts. Anyway, they don't hurt to have here.

"build-check": "vite build",
"preview": "vite preview --port 8080",
"lint": "eslint . --ext js,ts,vue --no-fix",
"lint:fix": "eslint . --ext js,ts,vue --fix src",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't want npm run lint to automatically fix issues, so I created "lint:fix" to do that.

This is different from auth-web where the default is to fix and there is "lint:nofix" instead.

codecov.yaml Outdated
@@ -1,6 +1,6 @@
codecov:
require_ci_to_pass: true
branch: master
branch: development
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be "main". The codecov is broken now. So doesn't matter for now.


on:
push:
branches:
- main
- feature*
- hotfix *
Copy link
Collaborator

Choose a reason for hiding this comment

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

extra space

- removed extra space
Copy link

@severinbeauvais severinbeauvais merged commit a0a37f8 into bcgov:main Oct 25, 2024
9 of 11 checks passed
environment: ${{ inputs.environment }}
tagname: ${{ inputs.tagname }}
target: ${{ inputs.target }}
app_name: "business-filings-ui"
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Oct 25, 2024

Choose a reason for hiding this comment

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

By the way, this app_name has to match a section name in 1Password (CD vault), ie:

image

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.

4 participants