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

Move git output to debug output #326

Merged
merged 2 commits into from
Oct 21, 2021
Merged

Move git output to debug output #326

merged 2 commits into from
Oct 21, 2021

Conversation

olblak
Copy link
Member

@olblak olblak commented Oct 21, 2021

Move git output to debug output

Fix #287

This pull request move git command output to the debug mode.
It changes the second title "RUN" to "Pipelines" to better represent following steps.
It stop showing updatecli sub command used like ["apply","diff","prepare"]

Test

To test this pull request, you can run the following commands:

  go build -o bin/updatecli
  # Run your favorite pipeline

Additionnal Information

Pipeline Run

Now

./bin/updatecli apply --config updatecli/updatecli.d --values updatecli/values.yaml                                                                                                                                                       

+++++++++++
+ PREPARE +
+++++++++++

Repository retrieved: 1


++++++++++++
+ PIPELINE +
++++++++++++



#####################
# BUMP HUGO VERSION #
#####################


SOURCES
=======

hugoVersionFromNetlifyConfig
----------------------------
✔ Content:
[build]
    command = "hugo --gc --minify"
    publish = "public"
    functions = "functions"

[build.environment]
    HUGO_VERSION = "0.87.0"

[[headers]]
    for = "/*.json"
    [headers.values]
      Access-Control-Allow-Origin = "*"

[context.production.environment]
    HUGO_ENV = "production"
    NODE_ENV = "production"
    HUGO_VERSION = "0.87.0"

[context.deploy-preview]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"


 found from file netlify.toml

hugoVersion
-----------
Searching for version matching pattern "latest"
✔ Github Release version "v0.88.1" found matching pattern "latest"


CHANGELOG:
----------

Release published on the 2021-09-04 10:44:16 +0000 UTC at the url https://github.com/gohugoio/hugo/releases/tag/v0.88.1



This is a bug-fix release with one important fix.

* Bump down again to Go 1.16.7 for the release builds [e1ead4db](https://github.com/gohugoio/hugo/commit/e1ead4dbca4cfb00ec0893c8c8563c91624ecca7) [@bep](https://github.com/bep) [#8952](https://github.com/gohugoio/hugo/issues/8952)[#8955](https://github.com/gohugoio/hugo/issues/8955)






netlifyConfig
-------------
✔ Content:
[build]
    command = "hugo --gc --minify"
    publish = "public"
    functions = "functions"

[build.environment]
    HUGO_VERSION = "0.87.0"

[[headers]]
    for = "/*.json"
    [headers.values]
      Access-Control-Allow-Origin = "*"

[context.production.environment]
    HUGO_ENV = "production"
    NODE_ENV = "production"
    HUGO_VERSION = "0.87.0"

[context.deploy-preview]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"


 found from file netlify.toml


TARGETS
========

netlifyConfig
-------------
✔ File content for 'netlify.toml', updated. 
< [build]
<     command = "hugo --gc --minify"
<     publish = "public"
<     functions = "functions"
< 
< [build.environment]
<     HUGO_VERSION = "0.87.0"
< 
< [[headers]]
<     for = "/*.json"
<     [headers.values]
<       Access-Control-Allow-Origin = "*"
< 
< [context.production.environment]
<     HUGO_ENV = "production"
<     NODE_ENV = "production"
<     HUGO_VERSION = "0.87.0"
< 
< [context.deploy-preview]
<     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
< 
< [context.branch-deploy]
<     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
< 
---
> [build]
>     command = "hugo --gc --minify"
>     publish = "public"
>     functions = "functions"
> 
> [build.environment]
>     HUGO_VERSION = "0.88.1"
> 
> [[headers]]
>     for = "/*.json"
>     [headers.values]
>       Access-Control-Allow-Origin = "*"
> 
> [context.production.environment]
>     HUGO_ENV = "production"
>     NODE_ENV = "production"
>     HUGO_VERSION = "0.88.1"
> 
> [context.deploy-preview]
>     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
> 
> [context.branch-deploy]
>     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
> 
Creating Pull Request
Opening Pull Request

Pull Request available on =>

	https://github.com/olblak/status/pull/12


updateDockerfileArgHelmfileVersion
----------------------------------

🐋 On (Docker)file "/tmp/updatecli/olblak/status/Dockerfile":

✔ The line #1, matched by the keyword "ARG" and the matcher "HUGO_VERSION", is changed from "ARG HUGO_VERSION=0.87.0" to "ARG HUGO_VERSION=0.88.1".
Pull Request already exist, updating it

Pull Request available on:

	https://github.com/olblak/status/pull/12


=============================

REPORTS:


⚠ HUGO.YAML:
	Sources:
		✔ [hugoVersion] Get the latest hugo version(githubRelease)
		✔ [hugoVersionFromNetlifyConfig] Get netlify configuration(file)
		✔ [netlifyConfig] Get netlify configuration(file)
	Target:
		⚠ [netlifyConfig]  Get netlify configuration(file)
		⚠ [updateDockerfileArgHelmfileVersion]  Update default HUGO_VERSION value in the Dockerfile(dockerfile)



Run Summary
===========
1 job run
0 job succeed
0 job failed
1 job applied changes

Before

./bin/updatecli apply --config updatecli/updatecli.d --values updatecli/values.yaml                 

APPLY


+++++++++++
+ PREPARE +
+++++++++++

Cloning git repository: https://github.com/olblak/status.git in /tmp/updatecli/olblak/status
Enumerating objects: 671, done.
Counting objects: 100%!((MISSING)160/160), done.
Compressing objects: 100%!((MISSING)122/122), done.
Total 671 (delta 74), reused 75 (delta 36), pack-reused 511
Fetching remote branchesEnumerating objects: 38, done.
Counting objects: 100%!((MISSING)38/38), done.
Compressing objects: 100%!((MISSING)38/38), done.
Total 38 (delta 27), reused 10 (delta 0), pack-reused 0


+++++++
+ RUN +
+++++++



#####################
# BUMP HUGO VERSION #
#####################



SOURCE:
=======

✔ Content:
[build]
    command = "hugo --gc --minify"
    publish = "public"
    functions = "functions"

[build.environment]
    HUGO_VERSION = "0.87.0"

[[headers]]
    for = "/*.json"
    [headers.values]
      Access-Control-Allow-Origin = "*"

[context.production.environment]
    HUGO_ENV = "production"
    NODE_ENV = "production"
    HUGO_VERSION = "0.87.0"

[context.deploy-preview]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"


 found from file netlify.toml


CHANGELOG:
==========
We couldn't identify a way to automatically retrieve changelog information


SOURCE:
=======

Searching for version matching pattern "latest"
✔ Github Release version "v0.88.1" found matching pattern "latest"


CHANGELOG:
==========

Release published on the 2021-09-04 10:44:16 +0000 UTC at the url https://github.com/gohugoio/hugo/releases/tag/v0.88.1



This is a bug-fix release with one important fix.

* Bump down again to Go 1.16.7 for the release builds [e1ead4db](https://github.com/gohugoio/hugo/commit/e1ead4dbca4cfb00ec0893c8c8563c91624ecca7) [@bep](https://github.com/bep) [#8952](https://github.com/gohugoio/hugo/issues/8952)[#8955](https://github.com/gohugoio/hugo/issues/8955)







SOURCE:
=======

✔ Content:
[build]
    command = "hugo --gc --minify"
    publish = "public"
    functions = "functions"

[build.environment]
    HUGO_VERSION = "0.87.0"

[[headers]]
    for = "/*.json"
    [headers.values]
      Access-Control-Allow-Origin = "*"

[context.production.environment]
    HUGO_ENV = "production"
    NODE_ENV = "production"
    HUGO_VERSION = "0.87.0"

[context.deploy-preview]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"


 found from file netlify.toml


CHANGELOG:
==========
We couldn't identify a way to automatically retrieve changelog information


TARGETS:
========


🐋 On (Docker)file "/tmp/updatecli/olblak/status/Dockerfile":

✔ The line #1, matched by the keyword "ARG" and the matcher "HUGO_VERSION", is changed from "ARG HUGO_VERSION=0.87.0" to "ARG HUGO_VERSION=0.88.1".
Adding file: Dockerfile
Commit changes
M  Dockerfile
commit 7a1adf1bbe060222b672945fa6029a1ba39b98d2
Author: updatebot <updatebot@olblak.com>
Date:   Thu Oct 21 09:50:14 2021 +0200

    chore: Update Dockerfile instruction for "/tmp/updatecli/olblak/status/...

    ... Dockerfile"

    Made with ❤️️  by updatecli
Push changes

Create a pull request for 'updatecli_cc399275dc12920308d5a1107d174de86f43f5d3863e37282afe04dd61926cbb' on GitHub by visiting:
     https://github.com/olblak/status/pull/new/updatecli_cc399275dc12920308d5a1107d174de86f43f5d3863e37282afe04dd61926cbb



Creating Pull Request
Opening Pull Request

Pull Request available on =>

	https://github.com/olblak/status/pull/13

✔ File content for 'netlify.toml', updated. 
< [build]
<     command = "hugo --gc --minify"
<     publish = "public"
<     functions = "functions"
< 
< [build.environment]
<     HUGO_VERSION = "0.87.0"
< 
< [[headers]]
<     for = "/*.json"
<     [headers.values]
<       Access-Control-Allow-Origin = "*"
< 
< [context.production.environment]
<     HUGO_ENV = "production"
<     NODE_ENV = "production"
<     HUGO_VERSION = "0.87.0"
< 
< [context.deploy-preview]
<     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
< 
< [context.branch-deploy]
<     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
< 
---
> [build]
>     command = "hugo --gc --minify"
>     publish = "public"
>     functions = "functions"
> 
> [build.environment]
>     HUGO_VERSION = "0.88.1"
> 
> [[headers]]
>     for = "/*.json"
>     [headers.values]
>       Access-Control-Allow-Origin = "*"
> 
> [context.production.environment]
>     HUGO_ENV = "production"
>     NODE_ENV = "production"
>     HUGO_VERSION = "0.88.1"
> 
> [context.deploy-preview]
>     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
> 
> [context.branch-deploy]
>     command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
> 
Adding file: netlify.toml
Commit changes
M  netlify.toml
commit 1b6a2f8379baec49bb983651ca584cfe08ac86a3
Author: updatebot <updatebot@olblak.com>
Date:   Thu Oct 21 09:50:16 2021 +0200

    chore: Update "netlify.toml" content

    Made with ❤️️  by updatecli
Push changes


Pull Request already exist, updating it

Pull Request available on:

	https://github.com/olblak/status/pull/13


=============================

REPORTS:


⚠ HUGO.YAML
	Sources:
		✔  Get netlify configuration(file)
		✔  Get the latest hugo version(githubRelease)
		✔  Get netlify configuration(file)
	Target:
		⚠  Update default HUGO_VERSION value in the Dockerfile(dockerfile)
		⚠  Get netlify configuration(file)



Run Summary
===========
1 job run
0 job succeed
0 job failed
1 job applied changes

Minor message modification

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak requested a review from dduportal October 21, 2021 08:14
@dduportal dduportal added enhancement New feature or request scm-git SCM of kind "Git" scm-github SCM of type GiHhub labels Oct 21, 2021
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

Looks good to me! Good job.

Don't forget to update the doc too ;)

@dduportal dduportal merged commit baf4b20 into updatecli:main Oct 21, 2021
@olblak
Copy link
Member Author

olblak commented Oct 21, 2021

Looks good to me! Good job.

Don't forget to update the doc too ;)

Maybe I missing something but this PR doesn't imply documentation change
The --debug command is already mentioned https://www.updatecli.io/docs/commands/updatecli_apply/#options-inherited-from-parent-commands

@dduportal
Copy link
Contributor

Correct, I missed it, thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scm-git SCM of kind "Git" scm-github SCM of type GiHhub
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Allow hiding the output of the "Prepare" step
2 participants