Skip to content

Commit

Permalink
feat: polaris job id (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrwils authored Oct 25, 2024
1 parent 1217939 commit b45fc8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pipelines/shared/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ pipeline {
DOWNLOAD_TYPE =" ${params.downloadType}"
PODMAN_ARTIFACT_SHA256 = "${params.artifactSha256}"
PODMAN_PROJECT_VERSION = "${params.projectVersion}"
POLARIS_JOB_ID = "${params.polarisJobId != null && params.polarisJobId != "" ? params.polarisJobId : params.component}"
}
steps {
script {
Expand Down Expand Up @@ -177,7 +178,7 @@ pipeline {
-v \$(pwd)/infra/inventory:/ansible/inventory \
-v \$(pwd)/files/ansible/ansible.cfg:/etc/ansible/ansible.cfg \
-v \$(pwd)/downloads:/ansible/downloads \
-e PODMAN_* -e ACTION_TOKEN_*",
-e PODMAN_* -e ACTION_TOKEN_* -e POLARIS_*",
command: 'ansible-playbook -i inventory/${PODMAN_ANSIBLE_INVENTORY_PATH} \
app/playbooks/playbook.yaml --extra-vars "env_vars=dev"')
podman.logout(authfile: "${env.AUTHFILE}")
Expand Down Expand Up @@ -244,6 +245,7 @@ pipeline {
DOWNLOAD_TYPE =" ${params.downloadType}"
PODMAN_ARTIFACT_SHA256 = "${params.artifactSha256}"
PODMAN_PROJECT_VERSION = "${params.projectVersion}"
POLARIS_JOB_ID = "${params.polarisJobId != null && params.polarisJobId != "" ? params.polarisJobId : params.component}"
}
steps {
script {
Expand Down Expand Up @@ -317,7 +319,7 @@ pipeline {
-v \$(pwd)/infra/inventory:/ansible/inventory \
-v \$(pwd)/files/ansible/ansible.cfg:/etc/ansible/ansible.cfg \
-v \$(pwd)/downloads:/ansible/downloads \
-e PODMAN_* -e ACTION_TOKEN_*",
-e PODMAN_* -e ACTION_TOKEN_* -e POLARIS_*",
command: 'ansible-playbook -i inventory/${PODMAN_ANSIBLE_INVENTORY_PATH} \
app/playbooks/playbook.yaml --extra-vars "env_vars=test"')
podman.logout(authfile: "${env.AUTHFILE}")
Expand Down Expand Up @@ -395,6 +397,7 @@ pipeline {
DOWNLOAD_TYPE =" ${params.downloadType}"
PODMAN_ARTIFACT_SHA256 = "${params.artifactSha256}"
PODMAN_PROJECT_VERSION = "${params.projectVersion}"
POLARIS_JOB_ID = "${params.polarisJobId != null && params.polarisJobId != "" ? params.polarisJobId : params.component}"
}
steps {
script {
Expand Down Expand Up @@ -468,7 +471,7 @@ pipeline {
-v \$(pwd)/infra/inventory:/ansible/inventory \
-v \$(pwd)/files/ansible/ansible.cfg:/etc/ansible/ansible.cfg \
-v \$(pwd)/downloads:/ansible/downloads \
-e PODMAN_* -e ACTION_TOKEN_*",
-e PODMAN_* -e ACTION_TOKEN_* -e POLARIS_*",
command: 'ansible-playbook -i inventory/${PODMAN_ANSIBLE_INVENTORY_PATH} \
app/playbooks/playbook.yaml --extra-vars "env_vars=prod"')
podman.logout(authfile: "${env.AUTHFILE}")
Expand Down

0 comments on commit b45fc8e

Please sign in to comment.