-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial work on ISO pipeline. * Fixing issue w/ fetch module. Fixing issues with isolinux.cfg. Removing verbosity flags from ansible-playbook. * Adding iso_storage_url as extra var.
- Loading branch information
Showing
5 changed files
with
130 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
openshift/gitops/manifests/rfe/pipelines/base/rfe-iso-pipeline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
argocd.argoproj.io/sync-wave: "5" | ||
name: rfe-iso-pipeline | ||
spec: | ||
params: | ||
- name: tooling-git-url | ||
description: Tooling Repository URL | ||
default: https://github.com/redhat-cop/rhel-edge-automation-arch.git | ||
type: string | ||
- name: tooling-git-revision | ||
description: Tooling Repository URL Reference | ||
default: main | ||
type: string | ||
- name: kickstart-url | ||
description: URL pointing to kickstart location | ||
type: string | ||
- name: rfe-iso-name | ||
description: Name of the RFE ISO | ||
type: string | ||
workspaces: | ||
- name: shared-workspace | ||
tasks: | ||
- name: git-clone-tooling | ||
taskRef: | ||
name: git-clone | ||
kind: ClusterTask | ||
params: | ||
- name: url | ||
value: $(params.tooling-git-url) | ||
- name: revision | ||
value: $(params.tooling-git-revision) | ||
- name: subdirectory | ||
value: "tooling" | ||
workspaces: | ||
- name: output | ||
workspace: shared-workspace | ||
- name: create-rfe-iso | ||
taskRef: | ||
name: generate-iso | ||
kind: Task | ||
params: | ||
- name: kickstart-url | ||
value: $(params.kickstart-url) | ||
- name: rfe-iso-name | ||
value: $(params.rfe-iso-name) | ||
runAfter: | ||
- "git-clone-tooling" | ||
workspaces: | ||
- name: workspace | ||
workspace: shared-workspace | ||
results: | ||
- name: iso-storage-url | ||
description: Location where the asset is served | ||
value: $(tasks.generate-iso.results.iso-storage-url) |
45 changes: 45 additions & 0 deletions
45
openshift/gitops/manifests/rfe/pipelines/base/rfe-iso-task.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
argocd.argoproj.io/sync-wave: "5" | ||
name: generate-iso | ||
spec: | ||
workspaces: | ||
- name: workspace | ||
params: | ||
- name: kickstart-url | ||
description: URL pointing to kickstart location | ||
type: string | ||
- name: rfe-iso-name | ||
description: Name of the RFE ISO | ||
type: string | ||
- name: extra-ansible-variables | ||
description: Extra Ansible variables | ||
default: "" | ||
type: string | ||
results: | ||
- name: iso-storage-url | ||
description: Location where the asset is served | ||
steps: | ||
- name: run-playbook | ||
image: image-registry.openshift-image-registry.svc:5000/rfe/ansible-rfe-runner:latest | ||
workingDir: /workspace/workspace | ||
args: | ||
- |- | ||
cd tooling/ansible | ||
ansible-galaxy collection install -r collections/requirements.yaml | ||
ansible-playbook -u cloud-user --private-key /var/secrets/image-builder-ssh-key/ssh-privatekey playbooks/iso-generator.yaml -e edge_iso_name=$(params.rfe-iso-name) -e kickstart_url=$(params.kickstart-url) -e iso_storage_url=$(results.iso-storage-url.path) $(params.extra-ansible-variables) | ||
command: | ||
- /bin/bash | ||
- -c | ||
volumeMounts: | ||
- name: image-builder-ssh-key | ||
mountPath: /var/secrets/image-builder-ssh-key | ||
readOnly: yes | ||
volumes: | ||
- name: image-builder-ssh-key | ||
secret: | ||
secretName: image-builder-ssh-key | ||
defaultMode: 0400 |