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

Parameterize maven task image #435

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions task/maven/0.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/

## Parameters

- **MAVEN_IMAGE**: The base image for maven (_default_:`gcr.io/cloud-builders/mvn`)
- **GOALS**: Maven `goals` to be executed
- **MAVEN_MIRROR_URL**: Maven mirror url (to be inserted into ~/.m2/settings.xml)
- **PROXY_USER**: Username to login to the proxy server (to be inserted into ~/.m2/settings.xml)
Expand Down
6 changes: 5 additions & 1 deletion task/maven/0.1/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
- name: source
- name: maven-settings
params:
- name: MAVEN_IMAGE
type: string
description: Maven base image
default: gcr.io/cloud-builders/mvn
- name: GOALS
description: maven goals to run
type: array
Expand Down Expand Up @@ -106,7 +110,7 @@ spec:
[[ -f $(workspaces.maven-settings.path)/settings.xml ]] || echo skipping settings

- name: mvn-goals
image: gcr.io/cloud-builders/mvn
image: $(params.MAVEN_IMAGE)
workingDir: $(workspaces.source.path)
command: ["/usr/bin/mvn"]
args:
Expand Down