From 0ec0085bb08bc8e262770ae59562cd43a729d96f Mon Sep 17 00:00:00 2001 From: git Date: Mon, 30 Oct 2023 14:39:02 +0000 Subject: [PATCH] 'update files with ansible' --- Containerfile | 24 ++++++++++++++++++++++++ Jenkinsfile | 6 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..69ad73a --- /dev/null +++ b/Containerfile @@ -0,0 +1,24 @@ +# Base on latest (edge) alpine image +FROM node:current-alpine as builder +RUN apk add -U git build-base python3 curl && \ + curl -L https://github.com/butlerx/wetty/archive/refs/tags/v2.7.0.tar.gz -o /tmp/wetty.tar.gz && \ + tar zxvf /tmp/wetty.tar.gz -C /tmp +WORKDIR /usr/src/app +COPY . /usr/src/app +RUN mv /tmp/wetty-2.7.0/* . && \ + yarn && \ + yarn build && \ + yarn install --production --ignore-scripts --prefer-offline + +FROM node:current-alpine +LABEL maintainer="docker@ervine.org" +WORKDIR /usr/src/app +ENV NODE_ENV=production +EXPOSE 3000 +COPY --from=builder /usr/src/app/build /usr/src/app/build +COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules +COPY --from=builder /usr/src/app/package.json /usr/src/app/ +RUN apk add -U openssh-client sshpass && \ + mkdir ~/.ssh + +ENTRYPOINT [ "yarn", "docker-entrypoint", "--conf", "config.json" ] diff --git a/Jenkinsfile b/Jenkinsfile index 7d219e4..36a4503 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,12 +27,12 @@ spec: stage('Build with Kaniko') { git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-wetty.git', credentialsId: 'jenkins-to-git' container('kaniko') { - sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:2.0.3' + sh '/kaniko/executor -f `pwd`/Containerfile -c `pwd` --cache=false --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:2.7.0' } } stage('Notify gchat') { - hangoutsNotify message: "WeTTy 2.0.3 on Alpine Linux has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false - } + googlechatnotification (url: 'https://chat.googleapis.com/v1/spaces/AAAA-nNKzdA/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=FySO2Zy2wfNJ7QKoqT9zy0uzNJF8bwj74ansor3BTu0%3D', message: "weTTY 2.7.0 on Node Alpine has built") + } } }