Skip to content

Commit

Permalink
Only install coursier and sbt in docker container (#751)
Browse files Browse the repository at this point in the history
- Also remove unnecessary jar copying which caused CI flakiness
  • Loading branch information
antonsviridov-src authored Sep 12, 2024
1 parent ca095a4 commit e2d6e7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ jobs:
- name: Build Dockerised CLI
run: sbt cli/docker

- run: |
- name: Test repos
shell: bash
run: |
set -eu
check_repo() {
REPO=$1
mkdir -p .repos/$REPO
git clone https://github.com/$REPO.git .repos/$REPO
git clone https://github.com/$REPO.git .repos/$REPO && cd .repos/$REPO && git submodule update --init
docker run -v $PWD/.repos/$REPO:/sources -w /sources sourcegraph/scip-java:latest scip-java index
file .repos/$REPO/index.scip || (echo "$REPO SCIP index doesn't exist!"; exit 1)
Expand Down
2 changes: 1 addition & 1 deletion bin/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eux
curl -fLo /usr/local/bin/coursier https://github.com/coursier/coursier/releases/download/v2.1.5/coursier
chmod +x /usr/local/bin/coursier
coursier setup --yes
coursier setup --yes --apps coursier,sbt

curl -fLo maven.zip https://archive.apache.org/dist/maven/maven-3/3.9.1/binaries/apache-maven-3.9.1-bin.zip
unzip -d /opt/maven maven.zip
Expand Down
14 changes: 3 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -591,19 +591,11 @@ lazy val fatjarPackageSettings = List[Def.Setting[_]](
oldStrategy(x)
},
(Compile / Keys.`package`) := {
val slimJar = (Compile / Keys.`package`).value
val fatJar = crossTarget.value / (assembly / assemblyJarName).value
val _ = assembly.value
IO.copyFile(fatJar, slimJar, CopyOptions().withOverwrite(true))
slimJar
assembly.value
},
(Compile / packageBin / packagedArtifact) := {
val (art, slimJar) = (Compile / packageBin / packagedArtifact).value
val fatJar =
new File(crossTarget.value + "/" + (assembly / assemblyJarName).value)
val _ = assembly.value
IO.copy(List(fatJar -> slimJar), CopyOptions().withOverwrite(true))
(art, slimJar)
val (artifact, _) = (Compile / packageBin / packagedArtifact).value
(artifact, assembly.value)
},
pomPostProcess := { node =>
new RuleTransformer(
Expand Down

0 comments on commit e2d6e7e

Please sign in to comment.