Skip to content

Commit

Permalink
Minor improvements (#2210)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov authored Oct 30, 2024
1 parent 92c14bd commit f87c04e
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 10 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function nixify() {
exec nix develop \
--ignore-environment \
--keep HOME \
--keep DOCKER_HOST \
--keep CI_BRANCH \
--keep CI_COMMIT \
--keep CI_BRANCH_TAG \
Expand Down
17 changes: 16 additions & 1 deletion devops/.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
set -e
set -x

export _JAVA_OPTIONS="-Xmx4000M -XX:ReservedCodeCacheSize=384M -XX:NonProfiledCodeHeapSize=256M -XX:MaxMetaspaceSize=1024M"

export SCALA212=$(cat project/Deps.sc | grep 'val scala212 ' | sed -r 's/.*\"(.*)\".**/\1/')
export SCALA213=$(cat project/Deps.sc | grep 'val scala213 ' | sed -r 's/.*\"(.*)\".**/\1/')
Expand All @@ -25,3 +24,19 @@ export VERSION_COMMAND="++ $SCALA_VERSION"
JDK_VERSION_VAR="JDK${JAVA_VERSION}"
export JAVA_HOME="${!JDK_VERSION_VAR}"
export PATH=$JAVA_HOME/bin:$PATH


export _JAVA_OPTIONS="
# JVM ignores HOME and relies on getpwuid to determine home directory
# That fails when we run self-hosted github agent under non-dynamic user
# We need that for rootless docker to work
-Duser.home=${HOME}
-Xmx4000M
-XX:ReservedCodeCacheSize=384M
-XX:NonProfiledCodeHeapSize=256M
-XX:MaxMetaspaceSize=1024M
"

_JAVA_OPTIONS="$(echo ${_JAVA_OPTIONS} | grep -v '#' | tr '\n' ' ' | tr -s ' ')"

env
1 change: 0 additions & 1 deletion devops/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
set -x

source ./devops/.env.sh
printenv

sbt -batch -no-colors -v \
"$VERSION_COMMAND clean" \
Expand Down
2 changes: 2 additions & 0 deletions devops/gen-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
set -e
set -x

source ./devops/.env.sh

bash sbtgen.sc --js
2 changes: 2 additions & 0 deletions devops/gen-jsonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
set -e
set -x

source ./devops/.env.sh

bash sbtgen.sc --nojvm --js
2 changes: 2 additions & 0 deletions devops/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
set -e
set -x

source ./devops/.env.sh

bash sbtgen.sc
2 changes: 0 additions & 2 deletions devops/publish-scala.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -e
set -x

source ./devops/.env.sh
printenv

source ./devops/.validate-publishing.sh

[[ ! -f "$SONATYPE_SECRET" ]] && echo "SONATYPE_SECRET=$SONATYPE_SECRET is not a file" && exit 0
Expand Down
2 changes: 0 additions & 2 deletions devops/site-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -e
set -x

source ./devops/.env.sh
printenv

source ./devops/.validate-publishing.sh

sbt -batch -no-colors -v \
Expand Down
1 change: 0 additions & 1 deletion devops/site-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
set -x

source ./devops/.env.sh
printenv

sbt -batch -no-colors -v \
"project docs" \
Expand Down
1 change: 0 additions & 1 deletion devops/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
set -x

source ./devops/.env.sh
printenv

sbt -batch -no-colors -v \
"$VERSION_COMMAND clean" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ class DockerSupportModule[F[_]: TagK](configModule: ModuleBase) extends ModuleDe
make[DefaultDockerClientConfig].from {
(clientConfig: Docker.ClientConfig) =>
/** We do not need to use global registry here since it would be overridden in CMD requests. */
val remote = clientConfig.remote.filter(_ => clientConfig.useRemote)
val remote = clientConfig.remote
.filter(_ => clientConfig.useRemote)
Value(DefaultDockerClientConfig.createDefaultConfigBuilder())
.mut(remote)((b, c) => b.withDockerHost(c.host).withDockerTlsVerify(c.tlsVerify).withDockerCertPath(c.certPath).withDockerConfig(c.config))
.mut(remote)(
(builder, remoteConfig) =>
builder
.withDockerHost(remoteConfig.host)
.withDockerTlsVerify(remoteConfig.tlsVerify)
.withDockerCertPath(remoteConfig.certPath)
.withDockerConfig(remoteConfig.config)
)
.get.build()
}

Expand Down

0 comments on commit f87c04e

Please sign in to comment.