diff --git a/.buildkite/pipeline.graphql.yml b/.buildkite/pipeline.graphql.yml index 1d34fd45ae..d20355fff8 100644 --- a/.buildkite/pipeline.graphql.yml +++ b/.buildkite/pipeline.graphql.yml @@ -1,13 +1,3 @@ steps: - label: Update GraphQL docs command: .buildkite/update_graphql_docs - plugins: - - docker-compose#v4.9.0: - run: app - mount-ssh-agent: true - mount-buildkite-agent: true - env: - - API_ACCESS_TOKEN - - GIT_NAME - - GIT_EMAIL - - GH_TOKEN diff --git a/.buildkite/update_graphql_docs b/.buildkite/update_graphql_docs index d65c51d774..fdafc7881a 100755 --- a/.buildkite/update_graphql_docs +++ b/.buildkite/update_graphql_docs @@ -4,7 +4,11 @@ set -euo pipefail . bin/utils.sh echo "+++ Fetch latest schema (via GraphQL introspection)" -rake graphql:fetch_schema >| data/graphql/schema.graphql +docker compose run \ + --no-deps \ + -e API_ACCESS_TOKEN \ + app \ + rake graphql:fetch_schema >| data/graphql/schema.graphql echo "+++ Check for schema changes" if git diff --exit-code --quiet data/graphql/schema.graphql; then @@ -21,12 +25,12 @@ BRANCH=buildkite-docs-bot/graphql/$(git rev-parse --short :data/graphql/schema.g PULL_REQUEST_NUMBER=$(get_branch_pull_request_number $BRANCH) if [ -n "$PULL_REQUEST_NUMBER" ]; then - buildkite-agent annotate "Nothing to change, pull request [#$PULL_REQUEST_NUMBER](https://github.com/buildkite/docs/pull/$PULL_REQUEST_NUMBER) awaiting approval." --style "info" + buildkite-agent annotate "Nothing to change, pull request [#$PULL_REQUEST_NUMBER](https://github.com/buildkite/docs/pull/$PULL_REQUEST_NUMBER) awaiting approval." --style "info" exit 0 fi echo "+++ Generate GraphQL docs" -rake graphql:generate +docker compose run --no-deps app rake graphql:generate echo "--- Commit and push changes" git add .