Skip to content

Commit

Permalink
EREQ-85 Use authenticated mirror on Repox for Reddeer
Browse files Browse the repository at this point in the history
  • Loading branch information
jblievremont committed Dec 6, 2024
1 parent d1c5121 commit 25bb2a2
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .cirrus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2
# "build-essential" (containing gcc/g++/make) for C/C++ analysis
# Webkit libraries for rendering the SonarQube Rule Description view
ARG NODE_VERSION=20
RUN apt-get update && apt-get install -y build-essential metacity xvfb ffmpeg nodejs=${NODE_VERSION}.* gettext-base \
RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg \
gettext-base \
libwebkit2gtk-4.* \
metacity \
nodejs=${NODE_VERSION}.* \
xvfb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --chmod=755 .cirrus/init.d/xvfb /etc/init.d/
Expand All @@ -30,3 +36,5 @@ ENV JAVA_HOME_11_X64=/opt/java/openjdk-11
ENV JAVA_HOME_17_X64=/opt/java/openjdk
ENV JAVA_HOME_21_X64=/opt/java/openjdk-21
COPY --chown=sonarsource .cirrus/toolchains.xml .m2/toolchains.xml
# Fix for authenticated access to Reddeer mirror on Repox
COPY --chown=sonarsource .cirrus/settings-public-auth.xml .m2/settings-public-auth.xml
101 changes: 101 additions & 0 deletions .cirrus/settings-public-auth.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
<!--
Imported from SonarSource/ci-common-scripts
-->
<localRepository>${env.CIRRUS_WORKING_DIR}/.m2/repository</localRepository>
<servers>
<server>
<id>sonarsource</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Bearer ${env.ARTIFACTORY_ACCESS_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
<!-- Authenticated P2 repo part 1 -->
<server>
<id>reddeerLatest</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Bearer ${env.ARTIFACTORY_ACCESS_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
<server>
<id>reddeer420</id>
<configuration>
<httpHeaders>
<property>
<name>Authorization</name>
<value>Bearer ${env.ARTIFACTORY_ACCESS_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
<!-- /Authenticated P2 repo part 1 -->
</servers>
<profiles>
<profile>
<id>sonarsource-repo</id>
<activation>
<property>
<name>!skip-sonarsource-repo</name>
</property>
</activation>
<repositories>
<repository>
<id>sonarsource</id>
<name>SonarSource Central Repository</name>
<url>https://repox.jfrog.io/artifactory/sonarsource</url>
<releases>
<enabled>true</enabled>
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<!-- Authenticated P2 repo part 2 -->
<repository>
<id>reddeerLatest</id>
<url>https://repox.jfrog.io/artifactory/reddeer/releases/latest</url>
<layout>p2</layout>
</repository>
<repository>
<id>reddeer420</id>
<url>https://repox.jfrog.io/artifactory/reddeer/releases/4.2.0</url>
<layout>p2</layout>
</repository>
<!-- /Authenticated P2 repo part 2 -->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonarsource</id>
<name>SonarSource Central Repository</name>
<url>https://repox.jfrog.io/artifactory/sonarsource</url>
<releases>
<enabled>true</enabled>
<!-- no need to always check if new versions are available when
executing a maven plugin without specifying the version -->
<updatePolicy>interval:60</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>

0 comments on commit 25bb2a2

Please sign in to comment.