Merge branch 'main' into bug6170

This commit is contained in:
Axel Uhl committed 2025-10-30 10:34:38 +01:00
commit a1e949151f
8 files changed
+151 -39

No files matched your search

+17 -4
View File
@@ -4,9 +4,12 @@ if [ $# -eq 0 ]; then
echo ""
echo
echo "Constructs a Hudson job for the given bugid"
echo "Example: $0 4221"
echo "Example: $0 4221 [ {Bugzilla-API-Key} ]"
echo "Builds a Hudson job for bug branch bug4221, linking to the Bugzilla bug and copying a release"
echo "from Github to https://releases.sapsailing.com if the Github Actions Workflow built one"
echo "from Github to https://releases.sapsailing.com if the Github Actions Workflow built one."
echo "If a Bugzilla API Key is provided (may also be specified in the BUGZILLA_API_KEY environment"
echo "variable), it is used to add the bug summary to the build job's description."
echo "Get a Bugzilla API Key for your user account at https://bugzilla.sapsailing.com/bugzilla/userprefs.cgi?tab=apikey"
exit 2
fi
@@ -18,6 +21,16 @@ HUDSON_BASE_URL=https://hudson.sapsailing.com
BUGZILLA_BASE=https://bugzilla.sapsailing.com/bugzilla
COPY_TEMPLATE_JOB=CopyTemplate
OS_FOR_GSED="darwin"
if [ -n "$2" ]; then
BUGZILLA_API_KEY="$2"
fi
if [ -n "${BUGZILLA_API_KEY}" ]; then
echo "Trying to obtain bug summary/title from Bugzilla..."
BUG_SUMMARY="$( curl -s -H 'Content-Type: application/json' -H 'Accept: application/json' ${BUGZILLA_BASE}'/rest/bug/'${BUG_ID}'?Bugzilla_api_key='${BUGZILLA_API_KEY}'&include_fields=summary' | jq -r '.bugs[0].summary' )"
echo "Found: ${BUG_SUMMARY}"
else
BUG_SUMMARY=""
fi
read -p "Username: " USERNAME
read -s -p "Password: " PASSWORD
echo
@@ -27,9 +40,9 @@ curl -s -X GET $COPY_TEMPLATE_CONFIG_URL -u "$USERNAME:$PASSWORD" -o "$CONFIGFIL
# On macosx is gnu-sed needed
if [[ "$OSTYPE" == *"$OS_FOR_GSED"* ]]; then
echo "Using gsed"
gsed -i'' -e 's|<description>..*</description>|<description>This is the CI job for \&lt;a href=\&quot;'$BUGZILLA_BASE'/show_bug.cgi?id='$BUG_ID'\&quot;\&gt;Bug '$BUG_ID'\&lt;/a\&gt;. See its latest \&lt;a href=\&quot;/userContent/measurements.html?job=bug'$BUG_ID'\&quot;\&gt;quality and performance measurements here.\&lt;/a\&gt;</description>|' -e 's|<disabled>true</disabled>|<disabled>false</disabled>|' "$CONFIGFILE"
gsed -i'' -e 's|<description>..*</description>|<description>This is the CI job for \&lt;a href=\&quot;'$BUGZILLA_BASE'/show_bug.cgi?id='$BUG_ID'\&quot;\&gt;Bug '$BUG_ID'\&lt;/a\&gt; ('"${BUG_SUMMARY}"'). See its latest \&lt;a href=\&quot;/userContent/measurements.html?job=bug'$BUG_ID'\&quot;\&gt;quality and performance measurements here.\&lt;/a\&gt;</description>|' -e 's|<disabled>true</disabled>|<disabled>false</disabled>|' "$CONFIGFILE"
else
sed -i -e 's|<description>..*</description>|<description>This is the CI job for \&lt;a href=\&quot;'$BUGZILLA_BASE'/show_bug.cgi?id='$BUG_ID'\&quot;\&gt;Bug '$BUG_ID'\&lt;/a\&gt;. See its latest \&lt;a href=\&quot;/userContent/measurements.html?job=bug'$BUG_ID'\&quot;\&gt;quality and performance measurements here.\&lt;/a\&gt;</description>|' -e 's|<disabled>true</disabled>|<disabled>false</disabled>|' "$CONFIGFILE"
sed -i -e 's|<description>..*</description>|<description>This is the CI job for \&lt;a href=\&quot;'$BUGZILLA_BASE'/show_bug.cgi?id='$BUG_ID'\&quot;\&gt;Bug '$BUG_ID'\&lt;/a\&gt; ('"${BUG_SUMMARY}"'). See its latest \&lt;a href=\&quot;/userContent/measurements.html?job=bug'$BUG_ID'\&quot;\&gt;quality and performance measurements here.\&lt;/a\&gt;</description>|' -e 's|<disabled>true</disabled>|<disabled>false</disabled>|' "$CONFIGFILE"
fi
# On macosx is gnu-sed needed
@@ -66,12 +66,14 @@ gem install gollum -v 5.3.2
gem update --system 3.5.7
cd /home
# copy bugzilla
scp -o StrictHostKeyChecking=no root@sapsailing.com:/var/www/static/bugzilla-5.0.4.tar.gz /usr/local/src
scp -o StrictHostKeyChecking=no root@sapsailing.com:/var/www/static/bugzilla-5.2.tar.gz /usr/local/src
cd /usr/local/src
tar -xzvf bugzilla-5.0.4.tar.gz
mv bugzilla-5.0.4 /usr/share/bugzilla
tar -xzvf bugzilla-5.2.tar.gz
mv bugzilla-5.2 /usr/share/bugzilla
cd /usr/share/bugzilla/
mkdir data
scp -o StrictHostKeyChecking=no root@sapsailing.com:/usr/share/bugzilla/localconfig .
scp -o StrictHostKeyChecking=no root@sapsailing.com:/usr/share/bugzilla/data/params.json ./data/
echo "Bugzilla has been copied. Now setting up bugzilla modules."
echo "This can take 5 minutes or so. The output is muted (but sent to log.txt) to prevent excessive warnings and clutter in the terminal."
SECONDEOF
@@ -79,6 +81,8 @@ terminationCheck "$?"
ssh -A "root@${IP}" "bash -s" << BUGZILLAEOF &>log.txt
cd /usr/share/bugzilla/
# essentials bugzilla
/usr/bin/perl -MCPAN -e 'install App::cpanminus'
cpanm --notest SOAP::Lite
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl Email::Sender
@@ -91,7 +95,9 @@ cd /usr/share/bugzilla/
/usr/bin/perl install-module.pl Email::Address
/usr/bin/perl install-module.pl autodie
/usr/bin/perl install-module.pl Class::XSAccessor
/usr/bin/perl install-module.pl DBIx::Connector
# nice to have for buzilla
/usr/bin/perl install-module.pl Encode::Detect
/usr/bin/perl install-module.pl Date::Parse
/usr/bin/perl install-module.pl Email::Send
/usr/bin/perl install-module.pl DBI
@@ -109,6 +115,15 @@ cd /usr/share/bugzilla/
/usr/bin/perl install-module.pl File::Copy::Recursive
/usr/bin/perl install-module.pl MIME::Base64
/usr/bin/perl install-module.pl Authen::SASL
/usr/bin/perl install-module.pl XML::Twig
/usr/bin/perl install-module.pl Net::LDAP
/usr/bin/perl install-module.pl Net::SMTP::SSL
/usr/bin/perl install-module.pl XMLRPC::Lite
/usr/bin/perl install-module.pl Test::Taint
/usr/bin/perl install-module.pl HTML::Scrubber
/usr/bin/perl install-module.pl Email::Reply
/usr/bin/perl install-module.pl HTML::FormatText::WithLinks
/usr/bin/perl install-module.pl Cache::Memcached
BUGZILLAEOF
terminationCheck "$?"
read -n 1 -p "Bugzilla installation complete, when ready press a key to continue." key_pressed
@@ -1,9 +1,9 @@
/**
* Website footer styling
*/
@def SITEFOOTER_BACKGROUND_COLOR #333;
@def SITEFOOTER_TEXT_COLOR #fff;
/**
* Mobile footer styling
*/
.sitefooter {
font-size: 1rem;
background: SITEFOOTER_BACKGROUND_COLOR;
@@ -50,6 +50,74 @@
}
@media (min-width: 45em) {
.sitefooter_language {
float: right;
text-align: right;
}
}
/**
* Desktop footer styling
*/
.dfooter {
background: SITEFOOTER_BACKGROUND_COLOR;
color: SITEFOOTER_TEXT_COLOR;
font-size: 1rem;
border-top: 0.333333333333333em solid SITEFOOTER_BACKGROUND_COLOR;
padding: 0 1.333333333333333em;
margin-top: -5.333333333333333em;
display: block;
line-height: normal;
width: 100%;
position: relative;
z-index: 1000;
}
.dfooter_row {
display: flex;
flex-wrap: wrap;
align-items: center;
min-height: 5em;
row-gap: 0.25em;
column-gap: 2em;
}
.dfooter_left {
display: flex;
flex-wrap: wrap;
align-items: baseline;
/*change rem here to configure preferred width before right block drops */
flex: 1 1 14rem;
row-gap: 0.25em;
column-gap: 2em;
min-width: 0;
}
.dfooter_right {
display: flex;
align-items: center;
margin-left: auto;
flex: 0 0 auto;
min-width: 8rem;
}
.dfooter_item,
.dfooter_link,
.dfooter_copyright {
line-height: 1;
margin: 0;
padding: 0;
display: inline-flex;
align-items: center;
}
.dfooter_copyright {
font-weight: 600;
white-space: nowrap;
color: SITEFOOTER_TEXT_COLOR;
}
.dfooter_link {
text-decoration: none;
color: SITEFOOTER_TEXT_COLOR;
}
.dfooter_link:hover,
.dfooter_link:focus { text-decoration: underline; }
.dfooter_language { text-align: right; white-space: nowrap; }
.dfooter_language select {
background-color: SITEFOOTER_BACKGROUND_COLOR;
color: SITEFOOTER_TEXT_COLOR;
max-width: 100%;
}
@@ -38,6 +38,7 @@ public class Footer extends Composite {
@UiField AnchorElement imprintAnchorLink;
@UiField AnchorElement privacyAnchorLink;
@UiField AnchorElement mobileUi;
@UiField AnchorElement sapJobsAnchor;
@UiField(provided = true)
final PlaceNavigation<WhatsNewPlace> releaseNotesNavigation;
@@ -65,6 +66,7 @@ public class Footer extends Composite {
whatsNewAnchor.getStyle().setDisplay(Display.NONE);
imprintAnchorLink.getStyle().setDisplay(Display.NONE);
privacyAnchorLink.getStyle().setDisplay(Display.NONE);
sapJobsAnchor.getStyle().setDisplay(Display.NONE);
}
copyrightDiv.setAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, "copyrightDiv");
supportAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "supportAnchor");
@@ -6,37 +6,36 @@
<ui:with field="res" type="com.sap.sailing.gwt.common.client.SharedResources" />
<ui:with field="local_res" type="com.sap.sailing.gwt.home.desktop.partials.footer.FooterResources" />
<ui:with field="releaseNotesNavigation" type="com.sap.sailing.gwt.home.shared.app.PlaceNavigation" />
<g:HTMLPanel tag="footer" addStyleNames="{local_res.css.sitefooter}">
<g:HTMLPanel tag="footer" addStyleNames="{local_res.css.dfooter}">
<!-- Website footer-->
<div class="{res.mediaCss.grid}">
<div class="{res.mediaCss.small12} {res.mediaCss.medium9} {res.mediaCss.columns}">
<div ui:field="copyrightDiv" class="{local_res.css.sitefooter_copyright}">
<div class="{res.mediaCss.grid} {local_res.css.dfooter_row}">
<div class="{local_res.css.dfooter_left}">
<div ui:field="copyrightDiv" class="{local_res.css.dfooter_item} {local_res.css.dfooter_copyright}">
<ui:text from='{i18n.footerCopyright}' />
</div>
<div class="{local_res.css.sitefooter_links}">
<a ui:field="imprintAnchorLink" target="_blank" class="{local_res.css.sitefooter_links_link}">
</div>
<a ui:field="imprintAnchorLink" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerLegal}' />
</a>
<a ui:field="privacyAnchorLink" href="https://www.sap.com/about/legal/privacy.html?campaigncode=CRM-XH21-OSP-Sailing" target="_blank" class="{local_res.css.sitefooter_links_link}">
<a ui:field="privacyAnchorLink" href="https://www.sap.com/about/legal/privacy.html?campaigncode=CRM-XH21-OSP-Sailing" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerPrivacy}' />
</a>
<a ui:field="sapJobsAnchor" href="https://jobs.sapsailing.com" target="_blank" class="{local_res.css.sitefooter_links_link}">
<a ui:field="sapJobsAnchor" href="https://jobs.sapsailing.com" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerJobs}'/>
</a>
<a ui:field="supportAnchor" href="https://support.sapsailing.com" target="_blank" class="{local_res.css.sitefooter_links_link}">
<a ui:field="supportAnchor" href="https://support.sapsailing.com" target="_blank" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.footerSupport}' />
</a>
<a ui:field="mobileUi" title="{i18n.mobile}" href=""
class="{local_res.css.sitefooter_links_link} {res.mediaCss.showonsmall} {res.mediaCss.hideonmedium} {res.mediaCss.hideonlarge}">
<ui:text from='{i18n.mobile}' />
</a>
<a ui:field="whatsNewAnchor" href="{releaseNotesNavigation.getSafeTargetUrl}" class="{local_res.css.sitefooter_links_link}">
<a ui:field="whatsNewAnchor" href="{releaseNotesNavigation.getSafeTargetUrl}" class="{local_res.css.dfooter_item} {local_res.css.dfooter_link}">
<ui:text from='{i18n.whatsNew}' />
</a>
<a ui:field="mobileUi" title="{i18n.mobile}" href=""
class="{local_res.css.dfooter_item} {local_res.css.dfooter_link} {res.mediaCss.showonsmall} {res.mediaCss.hideonmedium} {res.mediaCss.hideonlarge}">
<ui:text from='{i18n.mobile}' />
</a>
</div>
<div class="{local_res.css.dfooter_right}">
<l:LanguageSelector ui:field="languageSelector" labelText="{i18n.footerLanguage}" addStyleNames="{local_res.css.dfooter_language}" />
</div>
<l:LanguageSelector ui:field="languageSelector" labelText="{i18n.footerLanguage}" addStyleNames="{res.mediaCss.small12}
{res.mediaCss.medium3} {res.mediaCss.columns} {local_res.css.sitefooter_language}" />
</div>
</div>
</g:HTMLPanel>
</ui:UiBinder>
@@ -16,5 +16,13 @@ public interface FooterResources extends ClientBundle {
String sitefooter_links();
String sitefooter_links_link();
String sitefooter_language();
String dfooter();
String dfooter_row();
String dfooter_left();
String dfooter_right();
String dfooter_item();
String dfooter_copyright();
String dfooter_link();
String dfooter_language();
}
}
@@ -5,6 +5,7 @@ import static com.google.gwt.dom.client.Style.Display.NONE;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.AnchorElement;
import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.SpanElement;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
@@ -38,6 +39,9 @@ public class Footer extends Composite {
@UiField DivElement copyrightDiv;
@UiField AnchorElement imprintAnchorLink;
@UiField AnchorElement desktopUi;
@UiField AnchorElement sapJobsAnchor;
@UiField AnchorElement privacyAnchor;
@UiField SpanElement pipe;
private final MobilePlacesNavigator placeNavigator;
@@ -62,6 +66,10 @@ public class Footer extends Composite {
supportAnchor.getStyle().setDisplay(Display.NONE);
whatsNewLinkUi.getElement().getStyle().setDisplay(Display.NONE);
imprintAnchorLink.getStyle().setDisplay(Display.NONE);
sapJobsAnchor.getStyle().setDisplay(Display.NONE);
privacyAnchor.getStyle().setDisplay(Display.NONE);
} else {
pipe.setInnerText("|");
}
}
@@ -9,13 +9,14 @@
<!-- Footer mobile -->
<footer class="{local_res.css.sitefooter}">
<div class="{res.mediaCss.grid}">
<l:LanguageSelector ui:field="languageSelector" labelText="{i18n.footerLanguage}"
addStyleNames="{local_res.css.sitefooter_language} {res.mediaCss.small12} {res.mediaCss.columns}"/>
<div ui:field="copyrightDiv" class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.sitefooter_copyright}">
<ui:text from='{i18n.footerCopyright}' />
</div>
<div class="{local_res.css.sitefooter_links} {res.mediaCss.small12} {res.mediaCss.columns}">
<a ui:field="imprintAnchorLink">
<ui:text from='{i18n.footerLegal}' />
</a>
<a href="https://www.sap.com/about/legal/privacy.html?campaigncode=CRM-XH21-OSP-Sailing"
<a ui:field="privacyAnchor" href="https://www.sap.com/about/legal/privacy.html?campaigncode=CRM-XH21-OSP-Sailing"
title="{i18n.footerPrivacy}">
<ui:text from='{i18n.footerPrivacy}' />
</a>
@@ -27,18 +28,16 @@
title="{i18n.footerSupport}">
<ui:text from='{i18n.footerSupport}' />
</a>
|
<a ui:field="desktopUi" title="{i18n.desktop}" href="">
<ui:text from='{i18n.desktop}' />
</a>
<br></br>
<g:Anchor title="{i18n.whatsNew}" ui:field="whatsNewLinkUi">
<ui:text from='{i18n.whatsNew}' />
</g:Anchor>
<span ui:field="pipe"></span>
<a ui:field="desktopUi" title="{i18n.desktop}" href="">
<ui:text from='{i18n.desktop}' />
</a>
</div>
<div ui:field="copyrightDiv" class="{res.mediaCss.small12} {res.mediaCss.columns} {local_res.css.sitefooter_copyright}">
<ui:text from='{i18n.footerCopyright}' />
</div>
<l:LanguageSelector ui:field="languageSelector" labelText="{i18n.footerLanguage}"
addStyleNames="{local_res.css.sitefooter_language} {res.mediaCss.small12} {res.mediaCss.columns}"/>
</div>
</footer>
</g:HTMLPanel>