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

AppVeyor CI Integration 2 (monorepo update) #142

Closed
wants to merge 8 commits into from

Conversation

patkub
Copy link
Contributor

@patkub patkub commented Apr 13, 2018

Update to where I left off with #80. This now works and runs directly on AppVeyor (no need for bash). I added an option to ci-services to change the way command output is ignored to make it compatible.

Pull Request where greenkeeper updated the lockfile:
patkub/test-greenkeeper-lockfile-appveyor#22

Successful branch build where greenkeeper-lockfile updated, committed, and pushed the new lockfile:
https://ci.appveyor.com/project/patkub/test-greenkeeper-lockfile-appveyor/build/1.0.259

Successful build that ran on the PR:
https://ci.appveyor.com/project/patkub/test-greenkeeper-lockfile-appveyor/build/1.0.260

Successful branch build on "chore(package): update lockfile" commit:
https://ci.appveyor.com/project/patkub/test-greenkeeper-lockfile-appveyor/build/1.0.261

Successful build that ran on the PR:
https://ci.appveyor.com/project/patkub/test-greenkeeper-lockfile-appveyor/build/1.0.262

AppVeyor config: https://github.com/patkub/test-greenkeeper-lockfile-appveyor/blob/master/appveyor.yml

Travis jest tests are now passing with 100% coverage.

@patkub patkub force-pushed the appveyor-ci-service branch 8 times, most recently from 462fc31 to 6683044 Compare April 15, 2018 05:26
// The Windows equivalent of '2>/dev/null || true' is '2>NUL || (exit 0)'
ignoreOutput: '2>NUL || (exit 0)',
// Multi-line update message because committing with linebreaks does not work.
updateMessage: '-m "chore(package): update lockfile" -m "https://npm.im/greenkeeper-lockfile"'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing updateMessage is necessary. New line characters \n\n don't work in AppVeyor. Here is a failed build when this option is not set: https://ci.appveyor.com/project/patkub/test/build/1.0.5
https://github.com/patkub/greenkeeper-lockfile/tree/appveyor-ci-service-no-update-message

const updateMessage = 'chore(package): update lockfile\n\nhttps://npm.im/greenkeeper-lockfile'
exec(`git commit -m "${updateMessage}"`)
const updateMessage = options.updateMessage ? options.updateMessage : '-m "chore(package): update lockfile\n\nhttps://npm.im/greenkeeper-lockfile"'
exec(`git commit ${updateMessage}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I'm using the update message defined in the ci-service, if its available.

const ignoreOutput = options.ignoreOutput ? options.ignoreOutput : '2>/dev/null || true'
exec(`git add npm-shrinkwrap.json ${ignoreOutput}`)
exec(`git add package-lock.json ${ignoreOutput}`)
exec(`git add yarn.lock ${ignoreOutput}`)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I'm using the ignore output method defined in the ci-service, if its available.

@patkub patkub force-pushed the appveyor-ci-service branch 4 times, most recently from a8a6b92 to 999dc1e Compare April 17, 2018 22:15
Patrick Kubiak added 3 commits April 17, 2018 18:16
ignoreOutput option to set the method used to ignore command output when
staging the updated lockfile

tests for code coverage
@patkub patkub force-pushed the appveyor-ci-service branch from 999dc1e to 757144e Compare April 17, 2018 22:18
@patkub
Copy link
Contributor Author

patkub commented Apr 17, 2018

Updated, because it is only necessary to change the way the output is ignored, not the syntax of the commit message.

@patkub patkub force-pushed the appveyor-ci-service branch from e8280f0 to c644e84 Compare June 22, 2018 03:12
@patkub
Copy link
Contributor Author

patkub commented Jun 22, 2018

@patkub patkub changed the title AppVeyor CI Integration 2 AppVeyor CI Integration 2 (monorepo update) Jun 22, 2018
Copy link
Member

@Realtin Realtin left a comment

Choose a reason for hiding this comment

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

👏 💃 ✨

@Realtin
Copy link
Member

Realtin commented Jun 22, 2018

@patkub can you rebase this?

@Realtin Realtin mentioned this pull request Jun 22, 2018
@Realtin Realtin closed this in #172 Jun 22, 2018
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.

2 participants