-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: correct .github workflows from new
command to work with docker case
#193
Conversation
cargo-near/src/commands/new/new-project-template/.github/workflows/undeploy-staging.yml
Outdated
Show resolved
Hide resolved
@race-of-sloths include |
@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 8! What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
aa09a9e
to
cf4a499
Compare
7f3ce85
to
b78857a
Compare
env: | ||
# WASM reproducibility check akin to SourceScan won't be available for staging contracts, deployed from PRs, | ||
# as pull request git refs `refs/pull/NUMBER/merge` are somewhat harder to access and live only as long as PRs do | ||
CARGO_NEAR_REPRODUCIBLE_DISABLE_PUSHED_TO_REMOTE_GIT_CHECK: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not remember why I did not review this PR, but then I remembered that I did and raised the concern offline, so here I am again.
This env variable looks like a hack to me. I'd rather consider having a flag --allow-dirty
that will use the local folder instead of cloning it from remote.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--skip-git-remote-check
then?, because the repo is clean at the moment of build and dirty isn't the problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, I would love to have a command that would build from my project folder (not cloning it, not checking remote), and I think with this command we can kill two birds with one stone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be longer to implement and more complex code overall, than just --skip-git-remote-check
.
primary case for docker build is when source code is available to link to it in metadata.
--skip-git-remote-check
(deploy-only flag) is specifically for this bump with temporary branches in prs for staging builds in workflows, which shouldn't be a frequent case. docker is used here to be the same environment as production builds.
to have a command that would build from my project folder (not cloning it, not checking remote)
that is --no-docker --no-locked
70b1f35
to
7926fd7
Compare
7926fd7
to
95713a6
Compare
95713a6
to
a869650
Compare
chore: skip git remote check on specific env set fmt: apply fmt to `./cargo-near/src/commands/new/new-project-template/tests/` chore: comment to highlight possible impl with `refs/pull/NUMBER/head` doc: example workflows configuration doc: add link to `cargo near new` workflows in src chore: skip pushed to remote git check on specific env feat: update flow gen with `env!("CARGO_PKG_VERSION")` and staging env chore: comment in src
f2f3969
to
b0d699b
Compare
output of diff --color -r old/.github/workflows/deploy-production.yml new/.github/workflows/deploy-production.yml
18c18
< run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.6.2/cargo-near-installer.sh | sh
---
> run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.8.2/cargo-near-installer.sh | sh
diff --color -r old/.github/workflows/deploy-staging.yml new/.github/workflows/deploy-staging.yml
37c37
< run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.6.2/cargo-near-installer.sh | sh
---
> run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/download/cargo-near-v0.8.2/cargo-near-installer.sh | sh
38a39,42
> # `--skip-git-remote-check` was used
> # as pull request git refs `refs/pull/NUMBER/merge` are somewhat harder to access and live only as long as PRs do
> #
> # WASM reproducibility check akin to SourceScan won't be available for staging contracts, deployed from PRs
40c44
< cargo near deploy "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" \
---
> cargo near deploy --skip-git-remote-check "${{ env.NEAR_CONTRACT_PR_STAGING_ACCOUNT_ID }}" \
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@race-of-sloths score 8
## 🤖 New release * `cargo-near`: 0.8.2 -> 0.9.0 * `cargo-near-build`: 0.1.0 -> 0.1.1 <details><summary><i><b>Changelog</b></i></summary><p> ## `cargo-near` <blockquote> ## [0.9.0](cargo-near-v0.8.2...cargo-near-v0.9.0) - 2024-09-12 ### Added - Fixed GitHub CI staging workflow generated by `cargo near new` command to work correctly with docker case ([#193](#193)) - Extracted cargo-near-build into a standalone crate to be able to use it in near-workspaces and other places without the rest of the heavy dependencies of cargo-near ([#198](#198)) - Added tracking of `cargo near new` usage to collect statistics of the command usage ([#192](#192)) ### Fixed - Addressed warnings in `cargo build -p cargo-near-build` cmd in releaze-plz flow ([#212](#212)) ### Other - Updated near-* dependencies to 0.26 release ([#220](#220)) - Use "tracing" for logging and loading indicators ([#216](#216)) - update docker image and sdk version in `cargo near new` template ([#218](#218)) - [**breaking**] updates near-* packages to 0.25 version. Updates near-sdk to 5.4 ([#215](#215)) </blockquote> ## `cargo-near-build` <blockquote> ## [0.1.1](cargo-near-build-v0.1.0...cargo-near-build-v0.1.1) - 2024-09-12 ### Added - Fixed GitHub CI staging workflow generated by `cargo near new` command to work correctly with docker case ([#193](#193)) ### Other - Use "tracing" for logging and loading indicators ([#216](#216)) - fix clippy ([#219](#219)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/).
No description provided.