sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #05755
Re: [Merge] ~maas-committers/maas-ci/+git/maas-ci-config:fix-commit-sha-collection into ~maas-committers/maas-ci/+git/maas-ci-config:master
Diff comments:
> diff --git a/jenkins/jobs/ansible_playbook.groovy b/jenkins/jobs/ansible_playbook.groovy
> index 2c953c0..ce7d330 100644
> --- a/jenkins/jobs/ansible_playbook.groovy
> +++ b/jenkins/jobs/ansible_playbook.groovy
> @@ -38,6 +30,15 @@ pipeline {
> """
> }
> }
> + stage('Fetch commit sha') {
> + steps {
> + script {
> + env.COMMIT_SHA = sh(script: "git ls-remote ${params.ANSIBLE_REPO} ${params.ANSIBLE_BRANCH} | cut -c1-40", returnStdout: true).trim()
instead of cut with columns, just use `awk '{print $1}'` to get the first space-separated word and then we don't need to care if the sha1 changes length
> + println "commit: ${env.COMMIT_SHA}"
> + }
> + updateCommitStatus("${params.ANSIBLE_REPO}", "${env.COMMIT_SHA}", "${env.BUILD_URL}", "PENDING")
> + }
> + }
> stage('System Tests') {
> steps {
> writeFile file: 'system-tests/config.yaml', text: """
--
https://code.launchpad.net/~maas-committers/maas-ci/+git/maas-ci-config/+merge/438519
Your team MAAS Committers is requested to review the proposed merge of ~maas-committers/maas-ci/+git/maas-ci-config:fix-commit-sha-collection into ~maas-committers/maas-ci/+git/maas-ci-config:master.
References