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

How to set VCS build properties in Github Actions environment? #41

Open
sbuzas-kr opened this issue Oct 26, 2022 · 2 comments
Open

How to set VCS build properties in Github Actions environment? #41

sbuzas-kr opened this issue Oct 26, 2022 · 2 comments
Labels
question Further information is requested

Comments

@sbuzas-kr
Copy link

I'm running a build in a Github Actions workflow and I've noticed that the vcsRevision build property isn't set on the published artifacts. I saw in the build-info repo an issue about setting vcs properties and the release notes say VCS info is populated as of version 3.3.0.

Am I missing some configuration? Do I need to explicitly set it from an environment variable?

Config:

<plugin>
  <groupId>org.jfrog.buildinfo</groupId>
  <artifactId>artifactory-maven-plugin</artifactId>
  <version>3.4.0</version>
  <inherited>false</inherited>
  <executions>
	  <execution>
		  <id>build-info</id>
		  <goals>
			  <goal>publish</goal>
		  </goals>
		  <configuration>
			  <deployProperties>
				  <groupId>${project.groupId}</groupId>
				  <artifactId>${project.artifactId}</artifactId>
				  <version>${project.version}</version>
			  </deployProperties>
			  <publisher>
				  <publishArtifacts>true</publishArtifacts>
				  <publishBuildInfo>true</publishBuildInfo>
				  <contextUrl>https://internal.jfrog.io/artifactory</contextUrl>
				  <username>${artifactory.user}</username>
				  <password>${artifactory.password}</password>
				  <repoKey>lib-release</repoKey>
				  <snapshotRepoKey>lib-snapshot</snapshotRepoKey>
			  </publisher>
			  <buildInfo>
				  <buildNumber>${build.number}</buildNumber>
				  <buildUrl>${build.url}</buildUrl>
				  <agentName>${build.agent}</agentName>
			  </buildInfo>
		  </configuration>
	  </execution>
  </executions>
  </plugin>
@sbuzas-kr sbuzas-kr added the question Further information is requested label Oct 26, 2022
@sbuzas-kr
Copy link
Author

Also to clarify why I'm looking for this metadata. I'd like to be able to pull an artifact based on the vcsRevision property. That makes it easier to match a commit in VC to it's artifact.

@sbuzas-kr
Copy link
Author

Closing after further inspection, the vcs info is being set for the build-info. What i'm actually looking for is a custom deployProperty which I need to setup myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant