Skip to content

Commit

Permalink
test getting rstspec from parser version in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
seungpark committed Jun 24, 2024
1 parent 8aff996 commit 8ca781e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ RUN cd ./modules/oas-page-builder \
# where repo work will happen
FROM ubuntu:20.04
ARG WORK_DIRECTORY=/home/docsworker-xlarge
ARG SNOOTY_PARSER_VERSION=0.16.10
ARG SNOOTY_FRONTEND_VERSION=0.16.20
ARG MUT_VERSION=0.11.3
ARG REDOC_CLI_VERSION=1.2.3
ENV SNOOTY_PARSER_VERSION=0.16.10
ENV SNOOTY_FRONTEND_VERSION=0.16.20
ENV MUT_VERSION=0.11.3
ENV REDOC_CLI_VERSION=1.2.3
ARG NPM_BASE_64_AUTH
ARG NPM_EMAIL
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM arm64v8/ubuntu:20.04 as initial
ARG NPM_BASE_64_AUTH
ARG NPM_EMAIL
ARG SNOOTY_PARSER_VERSION=0.16.10
ARG SNOOTY_FRONTEND_VERSION=0.16.20
ARG MUT_VERSION=0.11.3
ARG REDOC_CLI_VERSION=1.2.3
ENV SNOOTY_PARSER_VERSION=0.16.10
ENV SNOOTY_FRONTEND_VERSION=0.16.20
ENV MUT_VERSION=0.11.3
ENV REDOC_CLI_VERSION=1.2.3
ARG NPM_BASE_64_AUTH
ARG NPM_EMAIL
ARG WORK_DIRECTORY=/home/docsworker-xlarge
Expand Down
7 changes: 6 additions & 1 deletion src/commands/src/shared/next-gen-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Job } from '../../../entities/job';
import { getDirectory } from '../../../job/jobHandler';
import { CliCommandResponse, ExecuteCommandError, executeCliCommand } from '../helpers';

const RSTSPEC_FLAG = '--rstspec=https://raw.githubusercontent.com/mongodb/snooty-parser/latest/snooty/rstspec.toml';
const SNOOTY_PARSER_VERSION = process.env['SNOOTY_PARSER_VERSION'];
const RSTSPEC_FLAG = `--rstspec=https://raw.githubusercontent.com/mongodb/snooty-parser/${SNOOTY_PARSER_VERSION}/snooty/rstspec.toml`;
interface NextGenParseParams {
job: Job;
patchId?: string;
Expand All @@ -22,6 +23,10 @@ export async function nextGenParse({ job, patchId, isProd }: NextGenParseParams)
commandArgs.push('--patch');
commandArgs.push(patchId);
}
// log rstspect flag here
// log branch name here
console.log(`check rstspect_flag ${RSTSPEC_FLAG}`);

commandArgs.push(RSTSPEC_FLAG);

// Not currently used in production builds, adding functionality
Expand Down

0 comments on commit 8ca781e

Please sign in to comment.