-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JavaScript (v3): Update Dockerfile to correctly build for, and run, i…
…nteg tests. (#5589) * JavaScript (v3): Update scripts location in dockerfile and log all test output * JavaScript (v3): Update docker file to correctly run integ tests.
- Loading branch information
1 parent
87c117a
commit 557f64b
Showing
8 changed files
with
50 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM node:18 | ||
FROM node:20 | ||
|
||
# Update image | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy source code | ||
COPY . /javascriptv3 | ||
|
||
# Perform build steps | ||
RUN npm install -C /javascriptv3 | ||
|
||
# Set non-root user | ||
RUN useradd -m automation && \ | ||
chown -R automation:automation /javascriptv3/ | ||
chown -R automation:automation /home/automation | ||
USER automation:automation | ||
|
||
# Add config | ||
RUN mkdir /home/automation/.aws && \ | ||
echo "[default]\nregion = us-east-1" > /home/automation/.aws/config | ||
|
||
# Copy source code | ||
COPY --chown=automation:automation ./javascriptv3 /home/automation/javascriptv3 | ||
|
||
# Copy resources | ||
COPY --chown=automation:automation ./resources /home/automation/resources | ||
COPY --chown=automation:automation ./python/example_code/glue/flight_etl_job_script.py /home/automation/python/example_code/glue/flight_etl_job_script.py | ||
COPY --chown=automation:automation ./workflows /home/automation/workflows | ||
|
||
# Set default command | ||
CMD ["./scripts/run_tests.sh", "integration"] | ||
# `npm i` needs to be run in the container. Otherwise it causes a dependency issue: https://github.com/evanw/esbuild/issues/1646#issuecomment-1238080595 | ||
CMD npm i --prefix /home/automation/javascriptv3 && npm run --prefix /home/automation/javascriptv3 integration-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*/node_modules | ||
*/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.