From 63206ef0854dd424545597fd662dfc35735aa54e Mon Sep 17 00:00:00 2001 From: Agnes Garoux Date: Mon, 2 Sep 2024 14:04:54 +0100 Subject: [PATCH 1/3] set up new autoformat workflow --- .buildkite/pipeline.yml | 4 +--- .github/workflows/autoformat.yml | 13 +++++++++++++ builds/run_sbt_task_in_docker.sh | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/autoformat.yml diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 911d268b12..862546595b 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,9 +1,7 @@ steps: - command: | - ./builds/run_formatting.sh - .buildkite/scripts/push_autoformatting_changes.sh ./builds/run_linting.sh - label: "autoformat" + label: "linting" agents: queue: "scala" diff --git a/.github/workflows/autoformat.yml b/.github/workflows/autoformat.yml new file mode 100644 index 0000000000..8b7366d9e3 --- /dev/null +++ b/.github/workflows/autoformat.yml @@ -0,0 +1,13 @@ +# Runs auto-formatting script on push to any branch +name: "Scala auto-formatting" + +on: push + +permissions: + id-token: write + contents: write + +jobs: + autoformat: + uses: wellcomecollection/.github/.github/workflows/scala_formatting.yml@main + secrets: inherit diff --git a/builds/run_sbt_task_in_docker.sh b/builds/run_sbt_task_in_docker.sh index 5e4b173620..32bbc6475c 100755 --- a/builds/run_sbt_task_in_docker.sh +++ b/builds/run_sbt_task_in_docker.sh @@ -48,6 +48,9 @@ else fi docker run --tty --rm \ + -e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID:-}" \ + -e AWS_SECRET_KEY="${AWS_SECRET_KEY:-}" \ + -e AWS_SESSION_TOKEN="${AWS_SESSION_TOKEN:-}" \ --volume ~/.sbt:/root/.sbt \ --volume ~/.ivy2:/root/.ivy2 \ --volume "$HOST_COURSIER_CACHE:/root/$LINUX_COURSIER_CACHE" \ From e7b7caaa274532c96c14b9c124ef64ea145e3abb Mon Sep 17 00:00:00 2001 From: Agnes Garoux Date: Mon, 2 Sep 2024 14:12:38 +0100 Subject: [PATCH 2/3] induce formatting change --- .../src/main/scala/weco/storage_service/bag_unpacker/Main.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala index 1c36407d21..1d395d7f6b 100644 --- a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala +++ b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala @@ -53,7 +53,7 @@ object Main extends WellcomeTypesafeApp { new BagUnpackerWorker( config = PekkoSQSWorkerConfig, - bagUnpackerWorkerConfig = unpackerWorkerConfig, + bagUnpackerWorkerConfig = unpackerWorkerConfig, ingestUpdater = ingestUpdater, outgoingPublisher = outgoingPublisher, unpacker = new S3Unpacker() From 4f95a82c08e0d277256c6e347d54904a2f0905ea Mon Sep 17 00:00:00 2001 From: Github on behalf of Wellcome Collection Date: Mon, 2 Sep 2024 13:15:10 +0000 Subject: [PATCH 3/3] Apply auto-formatting rules --- .../src/main/scala/weco/storage_service/bag_unpacker/Main.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala index 1d395d7f6b..1c36407d21 100644 --- a/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala +++ b/bag_unpacker/src/main/scala/weco/storage_service/bag_unpacker/Main.scala @@ -53,7 +53,7 @@ object Main extends WellcomeTypesafeApp { new BagUnpackerWorker( config = PekkoSQSWorkerConfig, - bagUnpackerWorkerConfig = unpackerWorkerConfig, + bagUnpackerWorkerConfig = unpackerWorkerConfig, ingestUpdater = ingestUpdater, outgoingPublisher = outgoingPublisher, unpacker = new S3Unpacker()