mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
fix: CI stage/job setup
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -49,11 +49,13 @@ RUN apt-get update && \
|
||||
unzip \
|
||||
wget \
|
||||
gpg-agent \
|
||||
jq
|
||||
jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
### Install Java Development Kit 11
|
||||
RUN add-apt-repository -y ppa:openjdk-r/ppa && apt-get update && \
|
||||
apt-get install --no-install-recommends -y openjdk-11-jdk
|
||||
apt-get install --no-install-recommends -y openjdk-11-jdk \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
### Setup the locale
|
||||
RUN sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
@@ -91,12 +93,6 @@ RUN curl $ANDROID_SDK_TOOLS_DOWNLOAD_URL > /tmp/android-sdk.zip && \
|
||||
### Install platform tools
|
||||
sdkmanager "platforms;$ANDROID_APIS" "build-tools;$ANDROID_BUILD_TOOLS_VERSION"
|
||||
|
||||
### Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
### Add contents to working directory
|
||||
ADD . /app
|
||||
|
||||
### Copy scripts directory into the tmp folder, so it's available to the following commands
|
||||
COPY $SCRIPTS_DIRECTORY/$NODE_SETUP_SCRIPT /tmp/
|
||||
|
||||
@@ -106,9 +102,12 @@ RUN bash /tmp/$NODE_SETUP_SCRIPT && apt-get install -y nodejs && \
|
||||
### Install needed global npm packages
|
||||
npm install -g --unsafe-perm @ionic/cli@$IONIC_VERSION cordova-res@$CORDOVA_RES_VERSION
|
||||
|
||||
RUN cd / && ionic start $TMP_PROJECT_NAME blank --type=ionic-angular --capacitor --no-git --no-interactive && \
|
||||
cd $TMP_PROJECT_NAME && ionic capacitor platform add android && ionic capacitor build android --no-open && \
|
||||
RUN cd / && ionic start $TMP_PROJECT_NAME blank --type=angular --capacitor --no-git --no-interactive && \
|
||||
cd $TMP_PROJECT_NAME && ionic capacitor add android && export NG_CLI_ANALYTICS=ci && ionic capacitor build android --no-open && \
|
||||
cd android && ./gradlew assembleDebug && \
|
||||
cd / && rm -rf $TMP_PROJECT_NAME
|
||||
|
||||
### Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
CMD [""]
|
||||
|
||||
@@ -93,8 +93,10 @@ node_deprecation_warning() {
|
||||
"X${NODENAME}" == "XNode.js 7.x" ||
|
||||
"X${NODENAME}" == "XNode.js 8.x LTS Carbon" ||
|
||||
"X${NODENAME}" == "XNode.js 9.x" ||
|
||||
"X${NODENAME}" == "XNode.js 10.x" ||
|
||||
"X${NODENAME}" == "XNode.js 11.x" ||
|
||||
"X${NODENAME}" == "XNode.js 13.x" ]]; then
|
||||
"X${NODENAME}" == "XNode.js 13.x" ||
|
||||
"X${NODENAME}" == "XNode.js 15.x" ]]; then
|
||||
|
||||
print_bold \
|
||||
" DEPRECATION WARNING " "\
|
||||
@@ -106,10 +108,10 @@ ${bold}${NODENAME} is no longer actively supported!${normal}
|
||||
Use the installation script that corresponds to the version of Node.js you
|
||||
wish to install. e.g.
|
||||
|
||||
* ${green}https://deb.nodesource.com/setup_10.x — Node.js 10 LTS \"Dubnium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_12.x — Node.js 12 LTS \"Erbium\"${normal} (recommended)
|
||||
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 LTS \"Fermium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_15.x — Node.js 15 \"Fifteen\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_12.x — Node.js 12 LTS \"Erbium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 LTS \"Fermium\"${normal} (recommended)
|
||||
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 \"Eighteen\"${normal} (current)
|
||||
|
||||
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
|
||||
version may be appropriate for you.
|
||||
@@ -136,10 +138,11 @@ This script, located at ${bold}https://deb.nodesource.com/setup${normal}, used t
|
||||
You should use the script that corresponds to the version of Node.js you
|
||||
wish to install. e.g.
|
||||
|
||||
* ${green}https://deb.nodesource.com/setup_10.x — Node.js 10 LTS \"Dubnium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_12.x — Node.js 12 LTS \"Erbium\"${normal} (recommended)
|
||||
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 LTS \"Fermium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_15.x — Node.js 15 \"Fifteen\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_12.x — Node.js 12 LTS \"Erbium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 LTS \"Fermium\"${normal} (recommended)
|
||||
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
|
||||
* ${green}https://deb.nodesource.com/setup_17.x — Node.js 18 \"Eighteen\"${normal} (current)
|
||||
|
||||
Please see ${bold}https://github.com/nodejs/Release${normal} for details about which
|
||||
version may be appropriate for you.
|
||||
|
||||
@@ -224,9 +227,11 @@ check_alt "Kali" "sana" "Debian" "jessie"
|
||||
check_alt "Kali" "kali-rolling" "Debian" "bullseye"
|
||||
check_alt "Sparky Linux" "Tyche" "Debian" "stretch"
|
||||
check_alt "Sparky Linux" "Nibiru" "Debian" "buster"
|
||||
check_alt "Sparky Linux" "Po-Tolo" "Debian" "bullseye"
|
||||
check_alt "MX Linux 17" "Horizon" "Debian" "stretch"
|
||||
check_alt "MX Linux 18" "Continuum" "Debian" "stretch"
|
||||
check_alt "MX Linux 19" "patito feo" "Debian" "buster"
|
||||
check_alt "MX Linux 21" "wildflower" "Debian" "bullseye"
|
||||
check_alt "Linux Mint" "maya" "Ubuntu" "precise"
|
||||
check_alt "Linux Mint" "qiana" "Ubuntu" "trusty"
|
||||
check_alt "Linux Mint" "rafaela" "Ubuntu" "trusty"
|
||||
@@ -242,15 +247,19 @@ check_alt "Linux Mint" "tina" "Ubuntu" "bionic"
|
||||
check_alt "Linux Mint" "tricia" "Ubuntu" "bionic"
|
||||
check_alt "Linux Mint" "ulyana" "Ubuntu" "focal"
|
||||
check_alt "Linux Mint" "ulyssa" "Ubuntu" "focal"
|
||||
check_alt "Linux Mint" "uma" "Ubuntu" "focal"
|
||||
check_alt "Linux Mint" "una" "Ubuntu" "focal"
|
||||
check_alt "LMDE" "betsy" "Debian" "jessie"
|
||||
check_alt "LMDE" "cindy" "Debian" "stretch"
|
||||
check_alt "LMDE" "debbie" "Debian" "buster"
|
||||
check_alt "LMDE" "elsie" "Debian" "bullseye"
|
||||
check_alt "elementaryOS" "luna" "Ubuntu" "precise"
|
||||
check_alt "elementaryOS" "freya" "Ubuntu" "trusty"
|
||||
check_alt "elementaryOS" "loki" "Ubuntu" "xenial"
|
||||
check_alt "elementaryOS" "juno" "Ubuntu" "bionic"
|
||||
check_alt "elementaryOS" "hera" "Ubuntu" "bionic"
|
||||
check_alt "elementaryOS" "odin" "Ubuntu" "focal"
|
||||
check_alt "elementaryOS" "jolnir" "Ubuntu" "focal"
|
||||
check_alt "Trisquel" "toutatis" "Ubuntu" "precise"
|
||||
check_alt "Trisquel" "belenos" "Ubuntu" "trusty"
|
||||
check_alt "Trisquel" "flidas" "Ubuntu" "xenial"
|
||||
@@ -266,9 +275,11 @@ check_alt "bunsenlabs" "lithium" "Debian" "buster"
|
||||
check_alt "Tanglu" "chromodoris" "Debian" "jessie"
|
||||
check_alt "PureOS" "green" "Debian" "sid"
|
||||
check_alt "PureOS" "amber" "Debian" "buster"
|
||||
check_alt "PureOS" "byzantium" "Debian" "bullseye"
|
||||
check_alt "Devuan" "jessie" "Debian" "jessie"
|
||||
check_alt "Devuan" "ascii" "Debian" "stretch"
|
||||
check_alt "Devuan" "beowulf" "Debian" "buster"
|
||||
check_alt "Devuan" "chimaera" "Debian" "bullseye"
|
||||
check_alt "Devuan" "ceres" "Debian" "sid"
|
||||
check_alt "Deepin" "panda" "Debian" "sid"
|
||||
check_alt "Deepin" "unstable" "Debian" "sid"
|
||||
@@ -312,28 +323,35 @@ if [ -f "/etc/apt/sources.list.d/chris-lea-node_js-$DISTRO.list" ]; then
|
||||
fi
|
||||
|
||||
print_status 'Adding the NodeSource signing key to your keyring...'
|
||||
keyring='/usr/share/keyrings'
|
||||
node_key_url="https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
|
||||
local_node_key="$keyring/nodesource.gpg"
|
||||
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
exec_cmd 'curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
|
||||
exec_cmd "curl -s $node_key_url | gpg --dearmor | tee $local_node_key >/dev/null"
|
||||
else
|
||||
exec_cmd 'wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -'
|
||||
exec_cmd "wget -q -O - $node_key_url | gpg --dearmor | tee $local_node_key >/dev/null"
|
||||
fi
|
||||
|
||||
print_status "Creating apt sources list file for the NodeSource ${NODENAME} repo..."
|
||||
|
||||
exec_cmd "echo 'deb https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' > /etc/apt/sources.list.d/nodesource.list"
|
||||
exec_cmd "echo 'deb-src https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' >> /etc/apt/sources.list.d/nodesource.list"
|
||||
exec_cmd "echo 'deb [signed-by=$local_node_key] https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' > /etc/apt/sources.list.d/nodesource.list"
|
||||
exec_cmd "echo 'deb-src [signed-by=$local_node_key] https://deb.nodesource.com/${NODEREPO} ${DISTRO} main' >> /etc/apt/sources.list.d/nodesource.list"
|
||||
|
||||
print_status 'Running `apt-get update` for you...'
|
||||
|
||||
exec_cmd 'apt-get update'
|
||||
|
||||
yarn_site='https://dl.yarnpkg.com/debian'
|
||||
yarn_key_url="$yarn_site/pubkey.gpg"
|
||||
local_yarn_key="$keyring/yarnkey.gpg"
|
||||
|
||||
print_status """Run \`${bold}sudo apt-get install -y ${NODEPKG}${normal}\` to install ${NODENAME} and npm
|
||||
## You may also need development tools to build native addons:
|
||||
sudo apt-get install gcc g++ make
|
||||
## To install the Yarn package manager, run:
|
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
||||
echo \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
curl -sL $yarn_key_url | gpg --dearmor | sudo tee $local_yarn_key >/dev/null
|
||||
echo \"deb [signed-by=$local_yarn_key] $yarn_site stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list
|
||||
sudo apt-get update && sudo apt-get install yarn
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user