update docker

This commit is contained in:
Sean Macfarlane
2020-04-16 19:42:40 -04:00
parent 236c990f21
commit d320660728
2 changed files with 2 additions and 20 deletions

View File

@@ -17,25 +17,7 @@ env:
IMAGE_NAME: wlan-cloud-ui
jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build --build-arg NPM_TOKEN=${{secrets.NPM_REPO_AUTH_TOKEN}} .
fi
push:
# Ensure test job passes before pushing image.
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
@@ -51,7 +33,7 @@ jobs:
password: ${{ secrets.REPO_PASSWORD }}
- name: Build image
run: docker build --build-arg NPM_TOKEN=${{secrets.NPM_REPO_AUTH_TOKEN}} . --tag image
run: docker build --build-arg NPM_TOKEN=${{secrets.NPM_REPO_AUTH_TOKEN}} . --tag image
- name: Push image
run: |

View File

@@ -16,7 +16,7 @@ COPY package*.json ./
#RUN npm install
# If you are building your code for production
RUN (echo "@tip-wlan:registry=https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/" && echo "//tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/:_authToken=$NPM_TOKEN" && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN") > .npmrc
RUN (echo "@tip-wlan:registry=https://tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/" && echo "//tip.jfrog.io/artifactory/api/npm/tip-wlan-cloud-npm-repo/:_authToken=$NPM_TOKEN") > .npmrc
RUN npm ci --only=production
RUN rm -f .npmrc