title: Add tag in Pub/Sub message triggered by Cloud Build?
body: <p>I have a DevOps pipeline as such:</p>
  <ol>
  <li>Push to a Source Code branch -&gt;</li>
  <li>Cloud Build trigger builds Docker image -&gt;</li>
  <li>Upon finish of build, a Cloud Pub/Sub message is pushed to Cloud Functions to deploy the VM.</li>
  </ol>
  <p>My question is with the Pub/Sub message sent to Cloud Functions.<br />
  I have the Cloud Build with a tag <code>log-test</code> but I can't seem to pass it to Cloud Functions.</p>
  <p><a href="https://i.stack.imgur.com/ncyrE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ncyrE.png" alt="chicks" /></a></p>
  <p>Here is the JSON data from Pub/Sub print out in Functions:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;id&quot;: &quot;XXX&quot;,
      &quot;status&quot;: &quot;SUCCESS&quot;,
      &quot;source&quot;: {
          &quot;repoSource&quot;: {
              &quot;projectId&quot;: &quot;XXX&quot;,
              &quot;repoName&quot;: &quot;XXX&quot;,
              &quot;commitSha&quot;: &quot;XXX&quot;
          }
      },
      &quot;createTime&quot;: &quot;2022-06XXXXX&quot;,
      &quot;startTime&quot;: &quot;2022-XXX:41:11XXX&quot;,
      &quot;finishTime&quot;: &quot;2022-06-08T07XXX&quot;,
      &quot;results&quot;: {
          &quot;images&quot;: [
              {
                  &quot;name&quot;: &quot;XXX&quot;,
                  &quot;digest&quot;: &quot;XXX&quot;,
                  &quot;pushTiming&quot;: {
                      &quot;startTime&quot;: &quot;2022-06-XXX3733Z&quot;,
                      &quot;endTime&quot;: &quot;2022-0XXX26.388064947Z&quot;
                  }
              }
          ],
          &quot;buildStepImages&quot;: [
              &quot;XXX&quot;
          ],
          &quot;buildStepOutputs&quot;: [
              &quot;&quot;
          ]
      },
      &quot;steps&quot;: [
          {
              &quot;name&quot;: &quot;gcr.io/cloud-builders/docker&quot;,
              &quot;args&quot;: [
                  &quot;build&quot;,
                  &quot;-t&quot;,
                  &quot;XXX&quot;,
                  &quot;.&quot;
              ],
              &quot;timing&quot;: {
                  &quot;startTime&quot;: &quot;2022-06XXX169Z&quot;,
                  &quot;endTime&quot;: &quot;2022-06XXX16549Z&quot;
          ...
          &quot;logging&quot;: &quot;XXX&quot;,
          &quot;dynamicSubstitutions&quot;: XXX,
          &quot;pool&quot;: {}
      },
      &quot;logUrl&quot;: &quot;https://console.cloud.google.cXXX&quot;,
      &quot;substitutions&quot;: {
          &quot;TRIGGER_BUILD_CONFIG_PATH&quot;: &quot;&quot;,
          &quot;REPO_NAME&quot;: &quot;XXX&quot;,
          &quot;REVISION_ID&quot;: &quot;XXX&quot;,
          &quot;COMMIT_SHA&quot;: &quot;XXX&quot;,
          &quot;SHORT_SHA&quot;: &quot;XXX&quot;,
          &quot;BRANCH_NAME&quot;: &quot;master&quot;,
          &quot;REF_NAME&quot;: &quot;master&quot;,
          &quot;TRIGGER_NAME&quot;: &quot;logtest&quot;
      },
      &quot;tags&quot;: [
          &quot;trigger-XXX&quot;
      ],
      &quot;timing&quot;: {
          &quot;FETCHSOURCE&quot;: {
              &quot;startTime&quot;: &quot;2022-XXX109Z&quot;,
              &quot;endTime&quot;: &quot;2022-0XXX9740Z&quot;
          },
          &quot;BUILD&quot;: {
              &quot;startTime&quot;: &quot;2022-0XXXXX042Z&quot;,
              &quot;endTime&quot;: &quot;2022-06-0XXXXX9576Z&quot;
          },
          &quot;PUSH&quot;: {
              &quot;startTime&quot;: &quot;202XXXXXX218Z&quot;,
              &quot;endTime&quot;: &quot;20XXXXX654Z&quot;
          }
      },
      &quot;artifacts&quot;: {
          &quot;images&quot;: [
              &quot;gcr.io/XXX&quot;
          ]
      },
      &quot;queueTtl&quot;: &quot;XXX&quot;,
      &quot;name&quot;: &quot;projects/XXX/locations/global/builds/XXXX&quot;
  }
  </code></pre>
  <p>The field of interest to me is the <code>tag</code> field found in the JSON:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;tags&quot;: [
          &quot;trigger-XXX&quot;
      ],
  </code></pre>
  <p>But given the value in the field, this is an auto-generated value which does not contain the expected tag <code>log-test</code>.</p>
  <p>Is there another field I can pass my tag into?</p>