Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Build: Artefact creation fails if no components have been affected #420

Closed
tomheller opened this issue Jan 13, 2020 · 0 comments · Fixed by #443
Closed

Build: Artefact creation fails if no components have been affected #420

tomheller opened this issue Jan 13, 2020 · 0 comments · Fixed by #443
Assignees
Labels
bug A broken behaviour that was working previously has-pr P2 Issue that is important to resolve as soon as possible

Comments

@tomheller
Copy link
Collaborator

Bug Report

Expected Behavior

When running builds on release branches, the build artefact creation should not fail when no components are affected.

Current Behavior

When changes are merged to the release branches master/4.x/4.x.x and there were no components affected with the merged changes, the components build skips because there were no components affected. c531c88
For releases, this is currently not blocking as with a version bump in the package.json, all builds are affected and it works.

Possible Solution

On release branches, always run a complete build to have a release ready artefact at all times.

Steps to Reproduce

# Check out a commit that has no component changes
git checkout c531c88f9c089802e8346afc60327d325d205454

# Run an affected build which the ci also does agains the previous commit
npx nx affected:build --base=fcdb8ce4047907f971801c9b10e7eff0d1c6277b --configuration=production --exclude=examples-tools

# No component folder is created in dist, and no components are built

Used Versions:

  • node: 12.13.1
  • npm: 6.12.1
  • typescript: 3.4.5
  • angular: 8.2.14
  • @angular/cdk: 8.2.3
  • @dynatrace/barista-components: 4.15.0
@tomheller tomheller added P2 Issue that is important to resolve as soon as possible bug A broken behaviour that was working previously labels Jan 13, 2020
@tomheller tomheller changed the title Build: Artifact creation fails if no components have been affected Build: Artefact creation fails if no components have been affected Jan 13, 2020
@lukasholzer lukasholzer pinned this issue Jan 16, 2020
lukasholzer pushed a commit that referenced this issue Jan 16, 2020
Currently, the build fails when the build stage doesn't build the components library.
In case there is no dist folder with components that can be packed.
So we have to pack it only when the folder exists.

Fixes #420
@tomheller tomheller unpinned this issue Jan 17, 2020
lukasholzer pushed a commit that referenced this issue Jan 17, 2020
Currently, the build fails when the build stage doesn't build the components library.
In case there is no dist folder with components that can be packed.
So we have to pack it only when the folder exists.

Fixes #420
lukasholzer pushed a commit that referenced this issue Jan 17, 2020
Currently, the build fails when the build stage doesn't build the components library.
In case there is no dist folder with components that can be packed.
So we have to pack it only when the folder exists.

Fixes #420
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A broken behaviour that was working previously has-pr P2 Issue that is important to resolve as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants