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

Provide some basic template variable expansion? #53

Closed
EugenMayer opened this issue Jul 28, 2019 · 7 comments
Closed

Provide some basic template variable expansion? #53

EugenMayer opened this issue Jul 28, 2019 · 7 comments

Comments

@EugenMayer
Copy link

Like in the hipchat or other slack resources ( cloudfoundry ) there are usually some interesting variables you would like to see expaneded in the message.

  • BUILD_TEAM_NAME
  • BUILD_PIPELINE_NAME
  • BUILD_JOB_NAME
  • BUILD_NAME

One could construct custom links like

/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME

What do you think? Thanks

@EugenMayer
Copy link
Author

Considering that you have all the meta-data already in https://github.com/arbourd/concourse-slack-alert-resource/blob/master/concourse/build.go#L42 this seems to be an easy job. sure we jsut should use gotemplate for the template langauge {{}} but other then that, that might be close to a one liner

@arbourd
Copy link
Owner

arbourd commented Jul 28, 2019

When I first conceived this resource, I never really wanted (or considered) templating. It's a possibility but it's a large overhaul at the moment. I think one way this can be solved in the future is with #36 to allow custom messages to be set.

@EugenMayer
Copy link
Author

Well setting the message by file and using template placeholders are not the same thing, but for sure expanding templates which are from files the same way would make sense.

So i would say that those are 2 entirely different features which may though be enriched by this, being it a normal string message or a file based one

@arbourd
Copy link
Owner

arbourd commented Jul 29, 2019

Maybe if we only exposed the BUILD variables that would be okay because they aren't available in tasks.

@arbourd
Copy link
Owner

arbourd commented Sep 18, 2019

@EugenMayer Where would you want these custom links anyways? They already exist in the footer.

@arbourd
Copy link
Owner

arbourd commented Sep 23, 2019

I'm assuming for the time being that you wanted this because of Mattermost, but the link does exist for Slack at the current time. I'm going to close this for now unless there is another reason why we might want those variables.

@arbourd arbourd closed this as completed Sep 23, 2019
@EugenMayer
Copy link
Author

Thanks for coming back to this, but since i forked of, i did not want to invest here, someone lese should so it makes sense for you to put work into that.

I assume that it is the right call to let it where it is until someone else need it, which i entirely cannot understand i this should not be the case ( IMHO ). Thanks

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

No branches or pull requests

2 participants