Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f6809ac84a | |||
| c61c4499a4 | |||
| f23c44906c | |||
| 39b54a483f | |||
| ea2c39ef97 | |||
| 8305d05c54 | |||
| 5599f9f86c | |||
| c4ac975bae | |||
| 7189d01599 | |||
| 8687ad4816 | |||
| 88e1a637ce | |||
| e0fa2b14b7 | |||
| 5dccdbb9e9 | |||
| e3e2f86ac5 | |||
| 5fe8f04159 | |||
| e3b2144182 | |||
| 6c255d39f1 | |||
| 259195d267 | |||
| 3395159064 | |||
| 7ce81d1a7c | |||
| 96c116b0b5 | |||
| b8a643d174 | |||
| a8f42b0ac3 | |||
| 09470996d4 | |||
| 8378ffb419 | |||
| 01dc4c19a8 | |||
| 32eccccf22 | |||
| 0188f92f4b | |||
| f00c0dd88d | |||
| 62d1938c89 | |||
| 7021f177f6 | |||
| 944190eedc | |||
| ad3e4ad739 | |||
| 711e71709a | |||
| cebd14e338 | |||
| 8968bb5450 | |||
| 726c32f5ea | |||
| ab23734e25 | |||
| 9137d51267 | |||
| a6bc8055f1 | |||
| 4ff525cf64 | |||
| 272a82e06a | |||
| 8a70aa4c49 | |||
| e95c68243f | |||
| 102747d49d | |||
| 909fb5bc1f | |||
| a771587de6 | |||
| 20eb639907 | |||
| 3caa5a6694 | |||
| d92cfa0988 | |||
| 6b74db9326 | |||
| 874740924d | |||
| 038867c450 | |||
| 690b683723 | |||
| 4f7fb662f1 | |||
| 563425d7c4 | |||
| 29404533c6 | |||
| 26f0a6a26b | |||
| 3c8c51c8a0 | |||
| cf23013036 | |||
| 98f7a8fd65 | |||
| bdc3a7b093 | |||
| e5eca3c967 | |||
| 63de7e6388 | |||
| 413bea2579 | |||
| 71490f8d8e | |||
| 3ca85c4c31 | |||
| 44226c3c53 | |||
| 09b0bfa4ce | |||
| cb23895d0c | |||
| 16dca34c6d | |||
| 13ff525fd2 | |||
| bd18aa1aac | |||
| 6c21042373 | |||
| 99c16ce1f2 | |||
| f30e0afdcd | |||
| 9fb74ed327 | |||
| ab7b4a2fed |
@@ -1,35 +1,33 @@
|
|||||||
# gitzone ci_docker
|
# gitzone custom
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
image: docker:19.03.1
|
||||||
|
services:
|
||||||
cache:
|
- docker:stable-dind
|
||||||
paths:
|
|
||||||
- .npmci-cache/
|
|
||||||
key: "$CI_BUILD_STAGE"
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g @shipzone/npmci
|
- apk update
|
||||||
- npmci npm prepare
|
- apk add --no-cache git openssl ca-certificates bash curl
|
||||||
|
- apk add --no-cache make gcc g++ python linux-headers paxctl
|
||||||
|
- apk add --no-cache libgcc libstdc++ gnupg
|
||||||
|
- apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
|
||||||
|
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
|
||||||
|
- update-ca-certificates
|
||||||
|
- cp ./stack-fix.c /lib/
|
||||||
|
- set -ex
|
||||||
|
- apk add --no-cache --virtual .build-deps build-base
|
||||||
|
- gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so
|
||||||
|
- apk del .build-deps
|
||||||
|
- export LD_PRELOAD="/lib/stack-fix.so"
|
||||||
|
- nvm install stable -s
|
||||||
|
- npm config set unsafe-perm true
|
||||||
|
- node -v && npm -v
|
||||||
|
- npm install -g @shipzone/npmci
|
||||||
|
- npmci npm prepare
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
|
||||||
- release
|
- release
|
||||||
- trigger
|
- trigger
|
||||||
- pages
|
|
||||||
|
|
||||||
testSTABLE:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- npmci node install stable
|
|
||||||
- npmci npm install
|
|
||||||
- npmci npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
@@ -41,6 +39,7 @@ release:
|
|||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
- lossless
|
||||||
- priv
|
- priv
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
@@ -51,3 +50,5 @@ trigger:
|
|||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
- lossless
|
||||||
|
- priv
|
||||||
|
|||||||
16
Dockerfile
16
Dockerfile
@@ -1,6 +1,7 @@
|
|||||||
FROM docker:git
|
FROM docker:19.03.1
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache \
|
RUN apk update && apk add --no-cache \
|
||||||
|
git \
|
||||||
openssl \
|
openssl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
bash \
|
bash \
|
||||||
@@ -16,6 +17,19 @@ RUN apk update && apk add --no-cache \
|
|||||||
gnupg \
|
gnupg \
|
||||||
nodejs \
|
nodejs \
|
||||||
nodejs-npm \
|
nodejs-npm \
|
||||||
|
krb5-libs \
|
||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
|
|
||||||
|
# Add the patch fix
|
||||||
|
COPY ./stack-fix.c /lib/
|
||||||
|
|
||||||
|
# Prepare the libraries packages
|
||||||
|
RUN set -ex \
|
||||||
|
&& apk add --no-cache --virtual .build-deps build-base \
|
||||||
|
&& gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so \
|
||||||
|
&& apk del .build-deps
|
||||||
|
|
||||||
|
# export the environment variable of LD_PRELOAD
|
||||||
|
ENV LD_PRELOAD /lib/stack-fix.so
|
||||||
|
|
||||||
RUN npm config set unsafe-perm true
|
RUN npm config set unsafe-perm true
|
||||||
|
|||||||
5
package-lock.json
generated
Normal file
5
package-lock.json
generated
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "ht-docker-dbase",
|
||||||
|
"version": "1.0.53",
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ht-docker-dbase",
|
"name": "ht-docker-dbase",
|
||||||
"version": "1.0.7",
|
"version": "1.0.53",
|
||||||
"description": "easy CI for docker images",
|
"description": "easy CI for docker images",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
|||||||
32
stack-fix.c
Normal file
32
stack-fix.c
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#include <dlfcn.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
// THIS IS TO AVOID A SIGFAULT WHEN RUNNING python3.6 manage.py runserver
|
||||||
|
// This should be fixed at some point by Alpine and/or Python
|
||||||
|
// Check this issue for more info
|
||||||
|
// https://github.com/docker-library/python/issues/211
|
||||||
|
typedef int (*func_t)(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);
|
||||||
|
|
||||||
|
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg) {
|
||||||
|
|
||||||
|
pthread_attr_t local;
|
||||||
|
int used = 0, ret;
|
||||||
|
|
||||||
|
if (!attr) {
|
||||||
|
used = 1;
|
||||||
|
pthread_attr_init(&local);
|
||||||
|
attr = &local;
|
||||||
|
}
|
||||||
|
pthread_attr_setstacksize((void*)attr, 2 * 1024 * 1024); // 2 MB
|
||||||
|
|
||||||
|
func_t orig = (func_t)dlsym(RTLD_NEXT, "pthread_create");
|
||||||
|
|
||||||
|
ret = orig(thread, attr, start_routine, arg);
|
||||||
|
|
||||||
|
if (used) {
|
||||||
|
pthread_attr_destroy(&local);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
yarn --version
|
|
||||||
npm --version
|
npm --version
|
||||||
node --version
|
node --version
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
node -v
|
node -v
|
||||||
npm -v
|
npm -v
|
||||||
yarn --version
|
npm init --yes
|
||||||
npmci -v
|
npmci -v
|
||||||
git clone https://gitlab.com/sandboxzone/sandbox-npmts.git
|
|
||||||
Reference in New Issue
Block a user