mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
lock yarn dependency
This commit is contained in:
parent
4e61528ad5
commit
5d6075b475
4 changed files with 16 additions and 5 deletions
|
|
@ -58,7 +58,7 @@ ruby-2.3.3-golang-1.8-git-2.13-phantomjs-2.1-node-7.1-postgresql-9.6 test: *test
|
||||||
ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6 test: *test_custom
|
ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6 test: *test_custom
|
||||||
ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6 test: *test_custom
|
ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6 test: *test_custom
|
||||||
ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6 test: *test_custom
|
ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6 test: *test_custom
|
||||||
ruby-2.4.1-golang-1.8-git-2.13-chrome-61.0-node-7.1-postgresql-9.6 test: *test_custom
|
ruby-2.4.1-golang-1.8-git-2.13-chrome-61.0-node-7.1-yarn-1.0-postgresql-9.6 test: *test_custom
|
||||||
golang-1.8-git-2.8.4 test: *test_custom
|
golang-1.8-git-2.8.4 test: *test_custom
|
||||||
golang-1.8-git-2.13 test: *test_custom
|
golang-1.8-git-2.13 test: *test_custom
|
||||||
|
|
||||||
|
|
@ -87,7 +87,7 @@ ruby-2.3.3-golang-1.8-git-2.13-phantomjs-2.1-node-7.1-postgresql-9.6: *build_and
|
||||||
ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
ruby-2.3.3-golang-1.8-git-2.7-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
||||||
ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
ruby-2.3.3-golang-1.8-git-2.13-chrome-60.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
||||||
ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
ruby-2.4.1-golang-1.8-git-2.7-phantomjs-2.1-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
||||||
ruby-2.4.1-golang-1.8-git-2.13-chrome-61.0-node-7.1-postgresql-9.6: *build_and_deploy_custom
|
ruby-2.4.1-golang-1.8-git-2.13-chrome-61.0-node-7.1-yarn-1.0-postgresql-9.6: *build_and_deploy_custom
|
||||||
golang-1.8-git-2.8.4: *build_and_deploy_custom
|
golang-1.8-git-2.8.4: *build_and_deploy_custom
|
||||||
golang-1.8-git-2.13: *build_and_deploy_custom
|
golang-1.8-git-2.13: *build_and_deploy_custom
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,10 @@ RUN if [ -n "$CHROME_VERSION" ]; then /scripts/install-chrome $CHROME_VERSION &&
|
||||||
ARG PHANTOMJS_VERSION
|
ARG PHANTOMJS_VERSION
|
||||||
RUN if [ -n "$PHANTOMJS_VERSION" ] ; then /scripts/install-phantomjs $PHANTOMJS_VERSION; fi
|
RUN if [ -n "$PHANTOMJS_VERSION" ] ; then /scripts/install-phantomjs $PHANTOMJS_VERSION; fi
|
||||||
|
|
||||||
# NodeJS
|
# NodeJS and Yarn
|
||||||
ARG NODE_VERSION
|
ARG NODE_VERSION
|
||||||
RUN if [ -n "$NODE_VERSION" ] ; then /scripts/install-node $NODE_VERSION && node --version; fi
|
ARG YARN_VERSION
|
||||||
|
RUN if [ -n "$NODE_VERSION" ] ; then /scripts/install-node $NODE_VERSION $YARN_VERSION && node --version && yarn --version; fi
|
||||||
|
|
||||||
# Golang
|
# Golang
|
||||||
ARG GOLANG_VERSION
|
ARG GOLANG_VERSION
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@ function print_node_args() {
|
||||||
printf -- "--build-arg NODE_VERSION=%s " "$NODE_VERSION"
|
printf -- "--build-arg NODE_VERSION=%s " "$NODE_VERSION"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print_yarn_args() {
|
||||||
|
case "$1" in
|
||||||
|
1.0) YARN_VERSION=1.0.2-1 ;;
|
||||||
|
*) echo "Unknown yarn version $1"; exit 1;
|
||||||
|
esac
|
||||||
|
printf -- "--build-arg YARN_VERSION=%s " "$YARN_VERSION"
|
||||||
|
}
|
||||||
|
|
||||||
function print_postgres_args() {
|
function print_postgres_args() {
|
||||||
printf -- "--build-arg POSTGRES_VERSION=%s " "$1"
|
printf -- "--build-arg POSTGRES_VERSION=%s " "$1"
|
||||||
}
|
}
|
||||||
|
|
@ -82,6 +90,7 @@ function parse_arguments() {
|
||||||
git) print_git_args $version ;;
|
git) print_git_args $version ;;
|
||||||
phantomjs) print_phantomjs_args $version ;;
|
phantomjs) print_phantomjs_args $version ;;
|
||||||
node) print_node_args $version ;;
|
node) print_node_args $version ;;
|
||||||
|
yarn) print_yarn_args $version ;;
|
||||||
postgresql) print_postgres_args $version ;;
|
postgresql) print_postgres_args $version ;;
|
||||||
*) exit 1;;
|
*) exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
set -xeo pipefail
|
set -xeo pipefail
|
||||||
|
|
||||||
NODE_VERSION=${1:-7.x}
|
NODE_VERSION=${1:-7.x}
|
||||||
|
YARN_VERSION=${2:-0.27.5-1}
|
||||||
|
|
||||||
# add official debian repos for node and yarn
|
# add official debian repos for node and yarn
|
||||||
curl -sS -L https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
|
curl -sS -L https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
|
||||||
|
|
@ -10,4 +11,4 @@ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y nodejs yarn
|
apt-get install -y nodejs yarn=$YARN_VERSION
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue