Compare commits
137 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2182a3f3e | |||
| 73dd4c34e7 | |||
| 28e99c1420 | |||
| e999577bad | |||
| 94420c3a54 | |||
| 2a9136ba59 | |||
| afa0fed385 | |||
| c507405605 | |||
| 0d9941fb09 | |||
| 24f7eef3af | |||
| c719f6a14b | |||
| 03a3ecdf7b | |||
| 4b8cbc0fba | |||
| 1f0c39da64 | |||
| 4e426e7bf7 | |||
| bbd13b879f | |||
| 1f12882f03 | |||
| e4aed1d051 | |||
| 3bba9c114b | |||
| ee1769f6aa | |||
| 7b79104520 | |||
| ee8ad96796 | |||
| 15e001b126 | |||
| 8d6415f5d0 | |||
| 50845053ad | |||
| 2ff559917d | |||
| cf21b33831 | |||
| c2a493ae5a | |||
| eef4ab8ca3 | |||
| 01ac9b637d | |||
| 181d0ff6d7 | |||
| 0d06199c58 | |||
| 7aa27daebc | |||
| 6671bdd6a6 | |||
| 36d3466a48 | |||
| 62b9a1574d | |||
| 617c9f993f | |||
| 6f91132d22 | |||
| e4d88c1732 | |||
| f5cc4d4339 | |||
| 665c7aaada | |||
| a47ab357f7 | |||
| a8a72799b5 | |||
| f1a516dfb5 | |||
| 60afae8582 | |||
| e8ad105aed | |||
| 65cdb2c53a | |||
| 05fd503a20 | |||
| 29e987c20e | |||
| 1fee89324c | |||
| abf5c60429 | |||
| 90a0574d10 | |||
| 046862d402 | |||
| 4d578e69d5 | |||
| b68d149ac4 | |||
| a907fbb334 | |||
| 25c7a6dc49 | |||
| 0c3ce8b6d7 | |||
| fccaeeb47c | |||
| d806a0db1d | |||
| bdffd6452c | |||
| 1248416ed9 | |||
| 9651c1a889 | |||
| 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 |
@@ -1,34 +1,30 @@
|
||||
# gitzone ci_docker
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci-cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
# gitzone custom
|
||||
image: docker:20.10.8
|
||||
services:
|
||||
- docker:stable-dind
|
||||
|
||||
before_script:
|
||||
- npmci npm prepare
|
||||
- apk update
|
||||
- apk add --no-cache git openssl ca-certificates bash curl
|
||||
- apk add --no-cache make gcc g++ python3 py3-pip linux-headers paxctl
|
||||
- apk add --no-cache libgcc libstdc++ gnupg nodejs-current npm
|
||||
- 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"
|
||||
- npm config set unsafe-perm true
|
||||
- node -v && npm -v
|
||||
- npm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
|
||||
testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
release:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
||||
services:
|
||||
- docker:18-dind
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
@@ -40,13 +36,16 @@ release:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
script:
|
||||
- npmci trigger
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
46
Dockerfile
46
Dockerfile
@@ -1,22 +1,58 @@
|
||||
FROM docker:19.03.1
|
||||
FROM docker:20.10.8
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
ca-certificates \
|
||||
bash \
|
||||
curl \
|
||||
make \
|
||||
gcc \
|
||||
g++ \
|
||||
python \
|
||||
python3 \
|
||||
python3-dev \
|
||||
py3-pip \
|
||||
linux-headers \
|
||||
paxctl \
|
||||
libgcc \
|
||||
libstdc++ \
|
||||
gnupg \
|
||||
nodejs \
|
||||
nodejs-npm \
|
||||
&& update-ca-certificates
|
||||
nodejs-current \
|
||||
npm \
|
||||
krb5-libs \
|
||||
&& update-ca-certificates \
|
||||
rust \
|
||||
docker-cli \
|
||||
libffi-dev \
|
||||
libc-dev \
|
||||
docker-compose
|
||||
|
||||
RUN apk update && apk add bash libc6-compat alpine-sdk
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
|
||||
# Add the patch fix
|
||||
COPY ./stack-fix.c /lib/
|
||||
|
||||
RUN node -v && npm -v
|
||||
|
||||
#pnpm
|
||||
ENV PNPM_HOME="/root/.local/share/pnpm/pnpm"
|
||||
RUN mkdir -p ${PNPM_HOME}
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
|
||||
RUN pnpm -v
|
||||
|
||||
# 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
|
||||
|
||||
58
Dockerfile_dind
Normal file
58
Dockerfile_dind
Normal file
@@ -0,0 +1,58 @@
|
||||
FROM docker:20-dind
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
ca-certificates \
|
||||
bash \
|
||||
curl \
|
||||
make \
|
||||
gcc \
|
||||
g++ \
|
||||
python3 \
|
||||
python3-dev \
|
||||
py3-pip \
|
||||
linux-headers \
|
||||
paxctl \
|
||||
libgcc \
|
||||
libstdc++ \
|
||||
gnupg \
|
||||
nodejs-current \
|
||||
npm \
|
||||
krb5-libs \
|
||||
&& update-ca-certificates \
|
||||
rust \
|
||||
docker-cli \
|
||||
libffi-dev \
|
||||
libc-dev \
|
||||
docker-compose
|
||||
|
||||
RUN apk update && apk add bash libc6-compat alpine-sdk
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
|
||||
# Add the patch fix
|
||||
COPY ./stack-fix.c /lib/
|
||||
|
||||
RUN node -v && npm -v
|
||||
|
||||
#pnpm
|
||||
ENV PNPM_HOME="/root/.local/share/pnpm/pnpm"
|
||||
RUN mkdir -p ${PNPM_HOME}
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
|
||||
RUN pnpm -v
|
||||
|
||||
# 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
|
||||
58
Dockerfile_dindrootless
Normal file
58
Dockerfile_dindrootless
Normal file
@@ -0,0 +1,58 @@
|
||||
FROM docker:20-dind-rootless
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
openssl \
|
||||
openssl-dev \
|
||||
ca-certificates \
|
||||
bash \
|
||||
curl \
|
||||
make \
|
||||
gcc \
|
||||
g++ \
|
||||
python3 \
|
||||
python3-dev \
|
||||
py3-pip \
|
||||
linux-headers \
|
||||
paxctl \
|
||||
libgcc \
|
||||
libstdc++ \
|
||||
gnupg \
|
||||
nodejs-current \
|
||||
npm \
|
||||
krb5-libs \
|
||||
&& update-ca-certificates \
|
||||
rust \
|
||||
docker-cli \
|
||||
libffi-dev \
|
||||
libc-dev \
|
||||
docker-compose
|
||||
|
||||
RUN apk update && apk add bash libc6-compat alpine-sdk
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
||||
|
||||
# Add the patch fix
|
||||
COPY ./stack-fix.c /lib/
|
||||
|
||||
RUN node -v && npm -v
|
||||
|
||||
#pnpm
|
||||
ENV PNPM_HOME="/root/.local/share/pnpm/pnpm"
|
||||
RUN mkdir -p ${PNPM_HOME}
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN curl -fsSL "https://github.com/pnpm/pnpm/releases/latest/download/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
|
||||
RUN pnpm -v
|
||||
|
||||
# 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
|
||||
@@ -1,2 +1,2 @@
|
||||
FROM hosttoday/ht-docker-dbase:latest
|
||||
RUN npm install -g @shipzone/npmci
|
||||
RUN pnpm install -g @shipzone/npmci
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ht-docker-dbase",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.85",
|
||||
"lockfileVersion": 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ht-docker-dbase",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.85",
|
||||
"description": "easy CI for docker images",
|
||||
"main": "index.js",
|
||||
"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
|
||||
node --version
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
node -v
|
||||
npm -v
|
||||
yarn --version
|
||||
npm init --yes
|
||||
npmci -v
|
||||
git clone https://gitlab.com/sandboxzone/sandbox-npmts.git
|
||||
17
tslint.json
17
tslint.json
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
||||
Reference in New Issue
Block a user