<commit_before>#!/bin/bash
set -euo pipefail

stack_name="buildkite-elastic-ci-stack-service-role-${BUILDKITE_BUILD_NUMBER}"
buildkite-agent meta-data set service-role-stack-name "${stack_name}"

aws cloudformation deploy --template-file templates/service-role.yml --stack-name "${stack_name}" --region us-east-1 --capabilities CAPABILITY_IAM

role_arn="$(aws cloudformation describe-stacks --stack-name buildkite-elastic-ci-stack-service-role --region us-east-1 --query "Stacks[0].Outputs[?OutputKey=='RoleArn'].OutputValue" --output text)"
buildkite-agent meta-data set service-role-arn "${role_arn}"<commit_msg>Use the stack name variable<commit_after>#!/bin/bash
set -euo pipefail

stack_name="buildkite-elastic-ci-stack-service-role-${BUILDKITE_BUILD_NUMBER}"
buildkite-agent meta-data set service-role-stack-name "${stack_name}"

aws cloudformation deploy --template-file templates/service-role.yml --stack-name "${stack_name}" --region us-east-1 --capabilities CAPABILITY_IAM

role_arn="$(aws cloudformation describe-stacks --stack-name "${stack_name}" --region us-east-1 --query "Stacks[0].Outputs[?OutputKey=='RoleArn'].OutputValue" --output text)"
buildkite-agent meta-data set service-role-arn "${role_arn}"
{'fraction_non_alphanumeric': 0.15599343185550082, 'fraction_numerical': 0.0049261083743842365, 'mean_word_length': 5.697802197802198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4220083', 'n_tokens_mistral': 402, 'n_tokens_neox': 382, 'n_words': 77}