Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Dec 19, 2024
1 parent 65d9115 commit 640234f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
74 changes: 37 additions & 37 deletions .github/workflows/deploy-ALPHA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,43 @@
#######################################
# Start the job on all push to master #
#######################################
name: 'Build & Deploy - ALPHA'
name: "Build & Deploy - ALPHA"
on:
push:
branches:
- 'alpha'
- "alpha"

###############
# Set the Job #
###############
jobs:
deploy:
name: Deploy alpha
runs-on: ubuntu-latest
permissions: read-all
environment:
name: alpha
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
always-auth: true
# Defaults to the user or organization that owns the workflow file
scope: 'hardisgroupcom'
- run: yarn install --frozen-lockfile && yarn run compile
- run: yarn config set version-git-tag false
- run: ALPHAID=$(date '+%Y%m%d%H%M') && yarn version --prepatch --preid="alpha$ALPHAID"
- run: yarn config set network-timeout 300000
- run: yarn publish --tag alpha
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# deploy:
# name: Deploy alpha
# runs-on: ubuntu-latest
# permissions: read-all
# environment:
# name: alpha
# steps:
# - uses: actions/checkout@v4
# # Setup .npmrc file to publish to npm
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# registry-url: 'https://registry.npmjs.org'
# always-auth: true
# # Defaults to the user or organization that owns the workflow file
# scope: 'hardisgroupcom'
# - run: yarn install --frozen-lockfile && yarn run compile
# - run: yarn config set version-git-tag false
# - run: ALPHAID=$(date '+%Y%m%d%H%M') && yarn version --prepatch --preid="alpha$ALPHAID"
# - run: yarn config set network-timeout 300000
# - run: yarn publish --tag alpha
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

push_alpha_to_registry:
name: Push alpha Docker image to Docker Hub
needs: deploy
#needs: deploy
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -92,17 +92,17 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/hardisgroupcom/sfdx-hardis:alpha'
format: 'table'
exit-code: '1'
image-ref: "docker.io/hardisgroupcom/sfdx-hardis:alpha"
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
vuln-type: "os,library"
security-checks: vuln
severity: 'CRITICAL,HIGH'
severity: "CRITICAL,HIGH"

push_alpha_to_registry_sfdx_recommended:
name: Push alpha Docker image to Docker Hub (with @salesforce/cli version recommended by hardis)
needs: deploy
#needs: deploy
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -151,10 +151,10 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/hardisgroupcom/sfdx-hardis:alpha-sfdx-recommended'
format: 'table'
exit-code: '1'
image-ref: "docker.io/hardisgroupcom/sfdx-hardis:alpha-sfdx-recommended"
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: 'os,library'
vuln-type: "os,library"
security-checks: vuln
severity: 'CRITICAL,HIGH'
severity: "CRITICAL,HIGH"
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ ENV PUPPETEER_EXECUTABLE_PATH="${CHROMIUM_PATH}"
# hadolint ignore=DL3044
ENV PATH="/node_modules/.bin:${PATH}"

RUN adduser -D sfdxhardis
USER sfdxhardis

ARG SFDX_CLI_VERSION=latest
ARG SFDX_HARDIS_VERSION=latest

Expand All @@ -41,3 +38,6 @@ RUN npm install --no-cache yarn -g && \
# Workaround for https://github.com/forcedotcom/salesforcedx-apex/issues/213
COPY ref/workarounds/dateUtil.js /usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/apex-node/lib/src/utils/dateUtil.js
COPY ref/workarounds/junitReporter.js /usr/local/lib/node_modules/@salesforce/cli/node_modules/@salesforce/apex-node/lib/src/reporters/junitReporter.js

RUN adduser -D sfdxhardis
USER sfdxhardis

0 comments on commit 640234f

Please sign in to comment.