Skip to content

Commit

Permalink
Merge pull request #34 from cdsap/bagan_0.1.4
Browse files Browse the repository at this point in the history
Update Bagan 0.1.4
  • Loading branch information
cdsap authored Jul 13, 2021
2 parents 56fe397 + 0308294 commit 56a2a03
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 51 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,19 @@ class TalaiotInjector(
val file = File("$path/talaiot.gradle.kts")
val content = """
buildscript {
repositories {
mavenCentral()
google()
mavenLocal()
jcenter()
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.cdsap:talaiot:1.0.10")
classpath("com.cdsap:talaiot:1.4.0")
}
}
apply<com.cdsap.talaiot.TalaiotPlugin>()
apply<com.cdsap.talaiot.plugin.TalaiotPlugin>()
configure<com.cdsap.talaiot.TalaiotExtension>() {
configure<com.cdsap.talaiot.plugin.TalaiotPluginExtension>() {
logger = com.cdsap.talaiot.logger.LogTracker.Mode.INFO
metrics {
customBuildMetrics("experiment" to "$id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.cdsap.bagan.generator


object Versions {
const val CHART_EXPERIMENT = "0.1.21"
const val POD_INJECTOR_VERSION = "0.1.21"
const val CHART_EXPERIMENT = "0.1.4"
const val POD_INJECTOR_VERSION = "0.1.4"
const val POD_INJECTOR = "cdsap/bagan-pod-injector:$POD_INJECTOR_VERSION"
const val PATH = ""
const val TEMP_FOLDER = "tmp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,19 @@ class TalaiotInjectorTest : BehaviorSpec({
val file = File("tmp/talaiot.gradle.kts")
val content = """
buildscript {
repositories {
mavenCentral()
google()
mavenLocal()
jcenter()
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.cdsap:talaiot:1.0.10")
classpath("com.cdsap:talaiot:1.4.0")
}
}

apply<com.cdsap.talaiot.TalaiotPlugin>()
apply<com.cdsap.talaiot.plugin.TalaiotPlugin>()

configure<com.cdsap.talaiot.TalaiotExtension>() {
configure<com.cdsap.talaiot.plugin.TalaiotPluginExtension>() {
logger = com.cdsap.talaiot.logger.LogTracker.Mode.INFO
metrics {
customBuildMetrics("experiment" to "null")
Expand All @@ -96,7 +95,8 @@ configure<com.cdsap.talaiot.TalaiotExtension>() {
buildMetricName = "build"
}
}
}""".trimIndent()
}
""".trimIndent()
file.readText() should haveSubstring(content)
}
TestFolder.recursiveDelete(File("tmp"))
Expand Down
7 changes: 4 additions & 3 deletions docker/installer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM openjdk:8
FROM openjdk:11

RUN apt-get update
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get -q -y install curl zip unzip
RUN curl -s https://get.sdkman.io | bash

RUN echo "sdkman_auto_complete=false" >> "$HOME/.sdkman/etc/config"
RUN set -x \
&& echo "sdkman_auto_answer=true" > $SDKMAN_DIR/etc/config \
&& echo "sdkman_auto_selfupdate=false" >> $SDKMAN_DIR/etc/config \
&& echo "sdkman_insecure_ssl=false" >> $SDKMAN_DIR/etc/config

RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& sdk install kotlin 1.3.31
&& sdk install kotlin 1.4.21

RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& sdk install kscript
&& sdk install kscript 3.1.0



Expand Down
4 changes: 2 additions & 2 deletions docker/installer/bin/generator/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package com.cdsap.bagan.generator


object Versions {
const val CHART_EXPERIMENT = "0.1.20"
const val POD_INJECTOR_VERSION = "0.1.20"
const val CHART_EXPERIMENT = "0.1.4"
const val POD_INJECTOR_VERSION = "0.1.4"
const val POD_INJECTOR = "cdsap/bagan-pod-injector:$POD_INJECTOR_VERSION"
const val PATH = ""
const val TEMP_FOLDER = "tmp"
Expand Down
46 changes: 27 additions & 19 deletions docker/pod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jdk
FROM openjdk:11-jdk

RUN apt-get update
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
Expand All @@ -16,14 +16,18 @@ ENV PATH /home/bagan/.local/bin:/home/bagan/bin:${PATH}
CMD ["/bin/sh"]
ENV HOME /home/bagan
RUN curl -s https://get.sdkman.io | bash
RUN echo "sdkman_auto_complete=false" >> "$HOME/.sdkman/etc/config"
RUN chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh"
RUN source "$HOME/.sdkman/bin/sdkman-init.sh"

RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& sdk install kotlin 1.3.61 \
&& sdk install kscript 2.9.3
&& sdk install kotlin 1.4.21 \
&& sdk install kscript 3.1.0 \
&& sdk install java 11.0.11.hs-adpt

ARG sdk_version=sdk-tools-linux-4333796.zip
ARG cmdline_tools=https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip

ARG android_home=/opt/android/sdk

RUN sudo apt-get update && \
Expand All @@ -33,43 +37,47 @@ RUN sudo apt-get update && \
libglu1-mesa-dev && \
sudo rm -rf /var/lib/apt/lists/*

RUN sudo mkdir -p ${android_home} && \

RUN sudo mkdir -p ${android_home}/cmdline-tools && \
sudo chown -R bagan:bagan ${android_home} && \
curl --silent --show-error --location --fail --retry 3 --output /tmp/${sdk_version} https://dl.google.com/android/repository/${sdk_version} && \
unzip -q /tmp/${sdk_version} -d ${android_home} && \
rm /tmp/${sdk_version}
wget -O /tmp/cmdline-tools.zip -t 5 "${cmdline_tools}" && \
unzip -q /tmp/cmdline-tools.zip -d ${android_home}/cmdline-tools && \
rm /tmp/cmdline-tools.zip

ENV ANDROID_HOME ${android_home}
ENV PATH=${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}
ENV ANDROID_SDK_ROOT ${android_home}
ENV ADB_INSTALL_TIMEOUT 120
ENV PATH=${ANDROID_SDK_ROOT}/emulator:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin:${ANDROID_SDK_ROOT}/tools:${ANDROID_SDK_ROOT}/tools/bin:${ANDROID_SDK_ROOT}/platform-tools:${PATH}

RUN mkdir ~/.android && echo '### User Sources for Android SDK Manager' > ~/.android/repositories.cfg

RUN yes | sdkmanager --licenses && yes | sdkmanager --update

RUN sdkmanager \
"tools" \
"platform-tools"
"platform-tools" \
"emulator"

RUN sdkmanager \
"build-tools;25.0.0" \
"build-tools;25.0.1" \
"build-tools;25.0.2" \
"build-tools;25.0.3" \
"build-tools;26.0.1" \
"build-tools;26.0.2" \
"build-tools;27.0.0" \
"build-tools;27.0.1" \
"build-tools;27.0.2" \
"build-tools;27.0.3" \
"build-tools;28.0.0" \
# 28.0.0 is failing to download from Google for some reason
#"build-tools;28.0.0" \
"build-tools;28.0.1" \
"build-tools;28.0.2" \
"build-tools;28.0.3" \
"build-tools;29.0.0" \
"build-tools;29.0.1" \
"build-tools;29.0.2"

RUN sdkmanager "platforms;android-29"
"build-tools;29.0.2" \
"build-tools;29.0.3" \
"build-tools;30.0.0" \
"build-tools;30.0.1" \
"build-tools;30.0.2"

# API_LEVEL string gets replaced by m4
RUN sdkmanager "platforms;android-23"

RUN mkdir -p /home/bagan/workspace
RUN cd /home/bagan/workspace
Expand Down
15 changes: 7 additions & 8 deletions docker/pod/bin/experiments/TalaiotInjector.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,19 @@ class TalaiotInjector(
val file = File("$path/talaiot.gradle.kts")
val content = """
buildscript {
repositories {
mavenCentral()
google()
mavenLocal()
jcenter()
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.cdsap:talaiot:1.0.10")
classpath("com.cdsap:talaiot:1.4.0")
}
}
apply<com.cdsap.talaiot.TalaiotPlugin>()
apply<com.cdsap.talaiot.plugin.TalaiotPlugin>()
configure<com.cdsap.talaiot.TalaiotExtension>() {
configure<com.cdsap.talaiot.plugin.TalaiotPluginExtension>() {
logger = com.cdsap.talaiot.logger.LogTracker.Mode.INFO
metrics {
customBuildMetrics("experiment" to "$id")
Expand Down

0 comments on commit 56a2a03

Please sign in to comment.