Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5f25db74f | ||
|
|
1335faa7f1 | ||
|
|
2a15396ad8 | ||
|
|
59a082619b | ||
|
|
8f127fa775 | ||
|
|
b79e5e1910 | ||
|
|
7e7a097586 | ||
|
|
e856b32d7e | ||
|
|
4c17f087cb | ||
|
|
5979fddadd | ||
|
|
d0a3985c4b | ||
|
|
807dc55dba | ||
|
|
56b9fae266 | ||
|
|
c3c4511cf1 | ||
|
|
f3695b7f5f | ||
|
|
3afc29c6bc | ||
|
|
f79423ae3f | ||
|
|
f579e142b4 | ||
|
|
a163ca49e5 | ||
|
|
83cc136ea8 | ||
|
|
cc405b5985 | ||
|
|
367d513182 |
+9
-68
@@ -1,77 +1,18 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: clone-cbt-ui
|
||||
image: docker.freeicu.top/alpine/git:latest
|
||||
commands:
|
||||
- >
|
||||
git clone
|
||||
-b proj-shopee-test
|
||||
--depth 1
|
||||
--no-tags
|
||||
https://zwzeng:glpat-nuzkafsdgYKM0KAgvpL4Bm86MQp1OnkH.01.0w0tr4xa1@git.ittx.com.cn/cybertrans/frontend/cbt-ui.git
|
||||
|
||||
- name: build-cbt-ui
|
||||
image: docker.freeicu.top/library/node:22-alpine
|
||||
pull: if-not-exists
|
||||
environment:
|
||||
NPM_USERNAME:
|
||||
from_secret: nexus_username
|
||||
NPM_PASSWORD:
|
||||
from_secret: nexus_password
|
||||
CBT_BUILD_OUTPUT_DIR: dist/release
|
||||
commands:
|
||||
- >
|
||||
test -w /cache ||
|
||||
(echo "Cache directory /cache is not mounted or writable" && exit 1)
|
||||
- cd cbt-ui
|
||||
- >
|
||||
sed -i
|
||||
's#https://dl-cdn.alpinelinux.org/alpine#https://mirrors.aliyun.com/alpine#'
|
||||
/etc/apk/repositories
|
||||
- apk add --no-cache expect
|
||||
- corepack enable
|
||||
- |
|
||||
node <<'NODE'
|
||||
const fs = require('fs')
|
||||
const workspacePath = 'pnpm-workspace.yaml'
|
||||
const workspace = fs.readFileSync(workspacePath, 'utf8')
|
||||
const updated = workspace.replace(
|
||||
/: set this to true or false$/gm,
|
||||
': true',
|
||||
)
|
||||
|
||||
if (updated === workspace) {
|
||||
throw new Error('pnpm-workspace.yaml has no allowBuilds placeholders')
|
||||
}
|
||||
fs.writeFileSync(workspacePath, updated)
|
||||
NODE
|
||||
- pnpm config set store-dir /cache/cbt-ui/pnpm-store
|
||||
- sh install.sh
|
||||
- pnpm build:wes
|
||||
- test -f dist/release/index.html
|
||||
- >
|
||||
sed -i
|
||||
's#registry-vpc.cn-hangzhou.aliyuncs.com#registry.cn-hangzhou.aliyuncs.com#'
|
||||
Dockerfile
|
||||
|
||||
- name: package-cbt-ui
|
||||
image: docker.freeicu.top/plugins/docker:latest
|
||||
# docker 打包
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
context: ./cbt-ui
|
||||
dockerfile: ./cbt-ui/Dockerfile
|
||||
registry: registry.cn-hangzhou.aliyuncs.com
|
||||
repo: registry.cn-hangzhou.aliyuncs.com/loghub/wes
|
||||
tags:
|
||||
- shopee-ui-test-1
|
||||
cache_from:
|
||||
- registry.cn-hangzhou.aliyuncs.com/loghub/wes:shopee-ui-test-1
|
||||
context: ./
|
||||
dockerfile: ./Dockerfile
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
purge: true
|
||||
registry: https://registry.cn-hangzhou.aliyuncs.com
|
||||
repo: registry.cn-hangzhou.aliyuncs.com/loghub/wms-system-service
|
||||
tags:
|
||||
- gradle6
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.idea/
|
||||
@@ -0,0 +1,6 @@
|
||||
[Credentials]
|
||||
language=EN
|
||||
endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
AccessKeyID=LTAIiOKICUiT4Mxf
|
||||
AccessKeySecret=Y2srJsSPJiRNx41fomps0zmWHvCges
|
||||
region = cn-hangzhou # 增加此行,配置Region
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
FROM gradle:6.9-jdk8
|
||||
|
||||
RUN set -eux; \
|
||||
sed -i 's|http://archive.ubuntu.com/ubuntu|https://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list; \
|
||||
sed -i 's|http://security.ubuntu.com/ubuntu|https://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
nodejs \
|
||||
npm; \
|
||||
command -v node; \
|
||||
command -v npm; \
|
||||
npm config set registry https://registry.npmmirror.com; \
|
||||
npm install -g coffeescript@2.7.0 stylus@0.54.8; \
|
||||
stylus --version; \
|
||||
coffee --version; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD ossutil /usr/local/bin/ossutil
|
||||
RUN chmod +x /usr/local/bin/ossutil
|
||||
ADD .ossutilconfig /root/.ossutilconfig
|
||||
|
||||
ADD init.gradle /root/.gradle/
|
||||
ADD config.json /root/.docker/
|
||||
@@ -0,0 +1,90 @@
|
||||
FROM eclipse-temurin:8-jdk-alpine
|
||||
|
||||
CMD ["gradle"]
|
||||
|
||||
ENV GRADLE_HOME=/opt/gradle
|
||||
|
||||
RUN set -o errexit -o nounset \
|
||||
&& echo "Adding gradle user and group" \
|
||||
&& addgroup --system --gid 1000 gradle \
|
||||
&& adduser --system --ingroup gradle --uid 1000 --shell /bin/ash gradle \
|
||||
&& mkdir /home/gradle/.gradle \
|
||||
&& chown -R gradle:gradle /home/gradle \
|
||||
&& chmod -R o+rwx /home/gradle \
|
||||
\
|
||||
&& echo "Symlinking root Gradle cache to gradle Gradle cache" \
|
||||
&& ln -s /home/gradle/.gradle /root/.gradle
|
||||
|
||||
VOLUME /home/gradle/.gradle
|
||||
|
||||
WORKDIR /home/gradle
|
||||
|
||||
RUN set -o errexit -o nounset \
|
||||
&& echo "Switching apk mirror to aliyun" \
|
||||
&& sed -i 's|https\?://dl-cdn.alpinelinux.org/alpine|https://mirrors.aliyun.com/alpine|g' /etc/apk/repositories \
|
||||
&& apk update \
|
||||
\
|
||||
&& apk add --no-cache \
|
||||
curl \
|
||||
make \
|
||||
breezy \
|
||||
py3-tzlocal \
|
||||
git \
|
||||
git-lfs \
|
||||
mercurial \
|
||||
subversion \
|
||||
\
|
||||
&& echo "Testing common utilities" \
|
||||
&& which awk \
|
||||
&& which curl \
|
||||
&& which cut \
|
||||
&& which grep \
|
||||
&& which gunzip \
|
||||
&& which sha256sum \
|
||||
&& which sed \
|
||||
&& which tar \
|
||||
&& which tr \
|
||||
&& which unzip \
|
||||
&& which wget \
|
||||
\
|
||||
&& echo "Testing VCSes" \
|
||||
&& which git \
|
||||
&& which git-lfs \
|
||||
&& which hg \
|
||||
&& which svn
|
||||
|
||||
ENV GRADLE_VERSION=6.9.4
|
||||
ARG GRADLE_DOWNLOAD_SHA256=3e240228538de9f18772a574e99a0ba959e83d6ef351014381acd9631781389a
|
||||
RUN set -o errexit -o nounset \
|
||||
&& echo "Downloading Gradle" \
|
||||
&& wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \
|
||||
\
|
||||
&& echo "Checking Gradle download hash" \
|
||||
&& echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \
|
||||
\
|
||||
&& echo "Installing Gradle" \
|
||||
&& unzip gradle.zip \
|
||||
&& rm gradle.zip \
|
||||
&& mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \
|
||||
&& ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle
|
||||
|
||||
USER gradle
|
||||
|
||||
RUN set -o errexit -o nounset \
|
||||
&& echo "Testing Gradle installation" \
|
||||
&& gradle --version
|
||||
|
||||
USER root
|
||||
|
||||
RUN set -eux; \
|
||||
apk add nodejs npm
|
||||
|
||||
RUN set -eux; \
|
||||
npm install -g coffee-script stylus
|
||||
|
||||
ADD ossutil /usr/local/bin/ossutil
|
||||
RUN chmod +x /usr/local/bin/ossutil
|
||||
ADD .ossutilconfig /root/.ossutilconfig
|
||||
|
||||
ADD init.gradle /root/.gradle/
|
||||
ADD config.json /root/.docker/
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"auths": {
|
||||
"qa-wms-acr-registry.cn-shanghai.cr.aliyuncs.com": {
|
||||
"auth": "c2hhbnl1bi5ndUBTSElOVEFDQ1FBUzAxOnNmakxqemZmRThEMCNWZE4="
|
||||
},
|
||||
"registry-vpc.cn-hangzhou.aliyuncs.com": {
|
||||
"auth": "c3d1QGl0dHguY29tLmNuOml0dHgyMDE4"
|
||||
},
|
||||
"registry.cn-hangzhou.aliyuncs.com": {
|
||||
"auth": "c3d1QGl0dHguY29tLmNuOml0dHgyMDE4"
|
||||
},
|
||||
"registry.cn-shanghai.aliyuncs.com": {
|
||||
"auth": "Zy5zaGFueXVuQGdtYWlsLmNvbTpBYTExMTIzNA=="
|
||||
},
|
||||
"sh2-cnepb-acr-pd-epp-registry.cn-shanghai.cr.aliyuncs.com": {
|
||||
"auth": "U2h1aHVpLlBFTkctQURNQDEwNjU1NTY0ODc1NDYzNDI6eWRCQ2QyWVdxVWhUdExqMSUzb0RzRWxQQDJ3UmdI"
|
||||
},
|
||||
"ttx-registry-vpc.cn-hangzhou.cr.aliyuncs.com": {
|
||||
"auth": "Y2J0X2plbmtpbnNfY3JAMTU0MzYwMDc2MDE3NjU0MDpzYmhXUXJWSFBWUU11SyEz"
|
||||
},
|
||||
"ttx-registry.cn-hangzhou.cr.aliyuncs.com": {
|
||||
"auth": "c3lndUAxNTQzNjAwNzYwMTc2NTQwOlR0eEAyMDI1"
|
||||
},
|
||||
"wms-acr-registry.cn-shanghai.cr.aliyuncs.com": {
|
||||
"auth": "c2hhbnl1bi5ndUBTSElOVEFDQ1BSRDAxOkFhMTIzNDU2"
|
||||
}
|
||||
},
|
||||
"HttpHeaders": {
|
||||
"User-Agent": "Docker-Client/19.03.1 (linux)"
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://nexus.freeicu.top/repository/maven-public/' }
|
||||
maven { url "https://repo.huaweicloud.com/repository/maven/huaweicloudsdk" }
|
||||
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
|
||||
maven {
|
||||
url 'https://nexus.loghub.com/repository/public/'
|
||||
credentials {
|
||||
username = "developer"
|
||||
password = "95bb05e9-1540-4caa"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
allprojects {
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://nexus.freeicu.top/repository/maven-public/' }
|
||||
maven { url "https://repo.huaweicloud.com/repository/maven/huaweicloudsdk" }
|
||||
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
|
||||
|
||||
maven {
|
||||
url 'https://nexus.loghub.com/repository/public/'
|
||||
credentials {
|
||||
username = "developer"
|
||||
password = "95bb05e9-1540-4caa"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://nexus.freeicu.top/repository/maven-public/' }
|
||||
maven { url "https://repo.huaweicloud.com/repository/maven/huaweicloudsdk" }
|
||||
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
|
||||
|
||||
maven {
|
||||
url 'https://nexus.loghub.com/repository/public/'
|
||||
credentials {
|
||||
username = "developer"
|
||||
password = "95bb05e9-1540-4caa"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
settingsEvaluated { settings ->
|
||||
settings.pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url 'https://nexus.freeicu.top/repository/maven-public/' }
|
||||
maven { url "https://repo.huaweicloud.com/repository/maven/huaweicloudsdk" }
|
||||
maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
|
||||
|
||||
maven {
|
||||
url 'https://nexus.loghub.com/repository/public/'
|
||||
credentials {
|
||||
username = "developer"
|
||||
password = "95bb05e9-1540-4caa"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user