mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-22 02:02:14 +00:00
Updates
- Tweak JVM memory parameters for build - Add GitHub action for releasing vNext docker images - Upgrade jQuery to 3.5.1 due to SECVULN - Update Java in all containers to v11 (LTS)
This commit is contained in:
parent
1840116d6d
commit
af5bc89c4f
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -1,4 +1,11 @@
|
|||||||
name: Continuous Integration
|
name: Continuous Integration
|
||||||
|
concurrency:
|
||||||
|
cancel-in-progress: false
|
||||||
|
group: "build-test"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -22,7 +29,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
shell: bash
|
|
||||||
run: cd build/ && ./assemble_api.sh && ./run_all_tests.sh
|
run: cd build/ && ./assemble_api.sh && ./run_all_tests.sh
|
||||||
|
|
||||||
- name: Codecov
|
- name: Codecov
|
||||||
|
8
.github/workflows/publish-site.yml
vendored
8
.github/workflows/publish-site.yml
vendored
@ -1,4 +1,11 @@
|
|||||||
name: Microsite
|
name: Microsite
|
||||||
|
concurrency:
|
||||||
|
cancel-in-progress: true
|
||||||
|
group: "publish-site"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -15,7 +22,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- run: "build/publish_docs.sh"
|
- run: "build/publish_docs.sh"
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
SBT_MICROSITES_PUBLISH_TOKEN: ${{ secrets.VINYLDNS_MICROSITE }}
|
SBT_MICROSITES_PUBLISH_TOKEN: ${{ secrets.VINYLDNS_MICROSITE }}
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
|
93
.github/workflows/release-vnext.yml
vendored
Executable file
93
.github/workflows/release-vnext.yml
vendored
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
name: VinylDNS Release vNext
|
||||||
|
concurrency:
|
||||||
|
cancel-in-progress: true
|
||||||
|
group: "release-vnext"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'master','main' ]
|
||||||
|
workflow_dispatch:
|
||||||
|
branches: [ 'master', 'main' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
verify:
|
||||||
|
name: Verify Release
|
||||||
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout current branch (full)
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Build and Test
|
||||||
|
id: build
|
||||||
|
shell: bash
|
||||||
|
run: cd build/ && \
|
||||||
|
./assemble_api.sh && \
|
||||||
|
./run_all_tests.sh
|
||||||
|
|
||||||
|
docker-release-api:
|
||||||
|
name: Release API vNext Image
|
||||||
|
needs: [ verify ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout current branch (full)
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Import Content Trust Key
|
||||||
|
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
||||||
|
env:
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Publish API Docker Image
|
||||||
|
run: make -C build/docker/api publish-vnext
|
||||||
|
env:
|
||||||
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
|
||||||
|
docker-release-portal:
|
||||||
|
name: Release Portal vNext Image
|
||||||
|
needs: [ verify ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout current branch (full)
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USER }}
|
||||||
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
|
- name: Import Content Trust Key
|
||||||
|
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
||||||
|
env:
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
|
||||||
|
- name: Publish Portal Docker Image
|
||||||
|
run: make -C build/docker/portal publish-vnext
|
||||||
|
env:
|
||||||
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@ -1,4 +1,11 @@
|
|||||||
name: VinylDNS Release
|
name: VinylDNS Official Docker Release
|
||||||
|
concurrency:
|
||||||
|
cancel-in-progress: true
|
||||||
|
group: "release"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -21,7 +28,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and Test
|
- name: Build and Test
|
||||||
id: build
|
id: build
|
||||||
shell: bash
|
|
||||||
run: cd build/ && \
|
run: cd build/ && \
|
||||||
./assemble_api.sh && \
|
./assemble_api.sh && \
|
||||||
./run_all_tests.sh
|
./run_all_tests.sh
|
||||||
@ -40,12 +46,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Artifacts
|
- name: Build Artifacts
|
||||||
id: build
|
id: build
|
||||||
shell: bash
|
|
||||||
run: cd build/ && ./assemble_api.sh && ./assemble_portal.sh
|
run: cd build/ && ./assemble_api.sh && ./assemble_portal.sh
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: get-version
|
id: get-version
|
||||||
shell: bash
|
|
||||||
run: echo "::set-output name=vinyldns_version::$(awk -F'"' '{print $2}' ./version.sbt)"
|
run: echo "::set-output name=vinyldns_version::$(awk -F'"' '{print $2}' ./version.sbt)"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
@ -77,13 +81,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Import Content Trust Key
|
- name: Import Content Trust Key
|
||||||
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
|
||||||
- name: Publish API Docker Image
|
- name: Publish API Docker Image
|
||||||
shell: bash
|
|
||||||
run: make -C build/docker/api publish
|
run: make -C build/docker/api publish
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
@ -107,13 +109,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Import Content Trust Key
|
- name: Import Content Trust Key
|
||||||
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
run: docker trust key load <(echo "${SIGNING_KEY}") --name vinyldns_svc
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
|
||||||
- name: Publish Portal Docker Image
|
- name: Publish Portal Docker Image
|
||||||
shell: bash
|
|
||||||
run: make -C build/docker/portal publish
|
run: make -C build/docker/portal publish
|
||||||
env:
|
env:
|
||||||
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ secrets.DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE }}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
## Developer Requirements (Local)
|
## Developer Requirements (Local)
|
||||||
|
|
||||||
- Java 8 (at least u162)
|
- Java 8+
|
||||||
- Scala 2.12
|
- Scala 2.12
|
||||||
- sbt 1.4+
|
- sbt 1.4+
|
||||||
|
|
||||||
|
64
README.md
64
README.md
@ -36,16 +36,17 @@ Integration is simple with first-class language support including:
|
|||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [Quickstart](#quickstart)
|
* [Quickstart](#quickstart)
|
||||||
- [Things to Try in the Portal](#things-to-try-in-the-portal)
|
- [Quickstart Optimization](#quickstart-optimization)
|
||||||
- [Verifying Your Changes](#verifying-your-changes)
|
* [Things to Try in the Portal](#things-to-try-in-the-portal)
|
||||||
- [Other things to note](#other-things-to-note)
|
+ [Verifying Your Changes](#verifying-your-changes)
|
||||||
- [Code of Conduct](#code-of-conduct)
|
+ [Other things to note](#other-things-to-note)
|
||||||
- [Developer Guide](#developer-guide)
|
* [Code of Conduct](#code-of-conduct)
|
||||||
- [Contributing](#contributing)
|
* [Developer Guide](#developer-guide)
|
||||||
- [Contact](#contact)
|
* [Contributing](#contributing)
|
||||||
- [Maintainers and Contributors](#maintainers-and-contributors)
|
* [Contact](#contact)
|
||||||
- [Credits](#credits)
|
* [Maintainers and Contributors](#maintainers-and-contributors)
|
||||||
|
* [Credits](#credits)
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
@ -62,7 +63,21 @@ VinylDNS on your machine with docker:
|
|||||||
1. To stop the local setup, run `./utils/clean-vinyldns-containers.sh`.
|
1. To stop the local setup, run `./utils/clean-vinyldns-containers.sh`.
|
||||||
|
|
||||||
There exist several clients at <https://github.com/vinyldns> that can be used to make API requests, using the
|
There exist several clients at <https://github.com/vinyldns> that can be used to make API requests, using the
|
||||||
endpoint `http://localhost:9000`
|
endpoint `http://localhost:9000`.
|
||||||
|
|
||||||
|
#### Quickstart Optimization
|
||||||
|
|
||||||
|
If you are experimenting with Quickstart, you may encounter a delay each time you run it. This is because the API and
|
||||||
|
Portal are rebuilt every time you launch Quickstart. If you'd like to cache the builds of the API and Portal, you may
|
||||||
|
want to first run:
|
||||||
|
|
||||||
|
| Script | Description |
|
||||||
|
|----------------------------|------------------------------------------------------------------------------|
|
||||||
|
| `build/assemble_api.sh` | This will create the API `jar` file which will then be used by Quickstart |
|
||||||
|
| `build/assemble_portal.sh` | This will create the Portal `zip` file which will then be used by Quickstart |
|
||||||
|
|
||||||
|
Once these scripts are run, the artifacts are placed into the `artifacts/` directory and will be reused for each
|
||||||
|
Quickstart launch. If you'd like to regenerate the artifacts, simply delete them and rerun the scripts above.
|
||||||
|
|
||||||
## Things to Try in the Portal
|
## Things to Try in the Portal
|
||||||
|
|
||||||
@ -71,11 +86,11 @@ endpoint `http://localhost:9000`
|
|||||||
3. Navigate to the `groups` tab: <http://localhost:9001/groups>
|
3. Navigate to the `groups` tab: <http://localhost:9001/groups>
|
||||||
4. Click on the **New Group** button and create a new group, the group id is the uuid in the url after you view the
|
4. Click on the **New Group** button and create a new group, the group id is the uuid in the url after you view the
|
||||||
group
|
group
|
||||||
5. Connect a zone by going to the `zones` tab: <http://localhost:9001/zones>.
|
5. Connect a zone by going to the `zones` tab: <http://localhost:9001/zones>.
|
||||||
1. Click the `-> Connect` button
|
1. Click the `-> Connect` button
|
||||||
2. For `Zone Name` enter `ok` with an email of `test@test.com`
|
2. For `Zone Name` enter `ok` with an email of `test@test.com`
|
||||||
3. For `Admin Group`, choose a group you created from the previous step
|
3. For `Admin Group`, choose a group you created from the previous step
|
||||||
4. Leave everything else as-is and click the `Connect` button at the bottom of the form
|
4. Leave everything else as-is and click the `Connect` button at the bottom of the form
|
||||||
6. A new zone `ok` should appear in your `My Zones` tab _(you may need to refresh your browser)_
|
6. A new zone `ok` should appear in your `My Zones` tab _(you may need to refresh your browser)_
|
||||||
7. You will see that some records are preloaded in the zone already, this is because these records are preloaded in the
|
7. You will see that some records are preloaded in the zone already, this is because these records are preloaded in the
|
||||||
local docker DNS server and VinylDNS automatically syncs records with the backend DNS server upon zone connection
|
local docker DNS server and VinylDNS automatically syncs records with the backend DNS server upon zone connection
|
||||||
@ -130,7 +145,8 @@ See the [Contributing Guide](CONTRIBUTING.md).
|
|||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
- If you have any security concerns please contact the maintainers directly [vinyldns-core@googlegroups.com](mailto:vinyldns-core@googlegroups.com)
|
- If you have any security concerns please contact the maintainers
|
||||||
|
directly [vinyldns-core@googlegroups.com](mailto:vinyldns-core@googlegroups.com)
|
||||||
|
|
||||||
## Maintainers and Contributors
|
## Maintainers and Contributors
|
||||||
|
|
||||||
@ -153,14 +169,14 @@ Given the Apache 2.0 license of VinylDNS, we specifically want to call out the f
|
|||||||
corresponding licenses shown below.
|
corresponding licenses shown below.
|
||||||
|
|
||||||
- [logback-classic](https://github.com/qos-ch/logback)
|
- [logback-classic](https://github.com/qos-ch/logback)
|
||||||
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
||||||
- [logback-core](https://github.com/qos-ch/logback)
|
- [logback-core](https://github.com/qos-ch/logback)
|
||||||
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
||||||
- [h2 database](http://h2database.com)
|
- [h2 database](http://h2database.com)
|
||||||
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
||||||
- [pureconfig](https://github.com/pureconfig/pureconfig)
|
- [pureconfig](https://github.com/pureconfig/pureconfig)
|
||||||
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
||||||
- [pureconfig-macros](https://github.com/pureconfig/pureconfig)
|
- [pureconfig-macros](https://github.com/pureconfig/pureconfig)
|
||||||
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
- [Mozilla Public License, version 2.0](https://www.mozilla.org/MPL/2.0/)
|
||||||
- [junit](https://junit.org/junit4/)
|
- [junit](https://junit.org/junit4/)
|
||||||
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
- [Eclipse Public License 1.0](https://www.eclipse.org/legal/epl-v10.html)
|
||||||
|
@ -7,18 +7,17 @@ WORKDIR /build
|
|||||||
RUN mkdir -p /opt/vinyldns/conf && \
|
RUN mkdir -p /opt/vinyldns/conf && \
|
||||||
if [ -f artifacts/vinyldns-api.jar ]; then cp artifacts/vinyldns-api.jar /opt/vinyldns/; fi && \
|
if [ -f artifacts/vinyldns-api.jar ]; then cp artifacts/vinyldns-api.jar /opt/vinyldns/; fi && \
|
||||||
if [ ! -f /opt/vinyldns/vinyldns-api.jar ]; then \
|
if [ ! -f /opt/vinyldns/vinyldns-api.jar ]; then \
|
||||||
env SBT_OPTS="-XX:+UseConcMarkSweepGC -Xmx4G -Xms1G" \
|
env SBT_OPTS="-Xmx2G -Xms512M -Xss2M -XX:MaxMetaspaceSize=2G" \
|
||||||
sbt -Dbuild.scalafmtOnCompile=false -Dbuild.lintOnCompile=fase ";project api;coverageOff;assembly" \
|
sbt -Dbuild.scalafmtOnCompile=false -Dbuild.lintOnCompile=fase ";project api;coverageOff;assembly" \
|
||||||
&& cp artifacts/vinyldns-api.jar /opt/vinyldns/; \
|
&& cp artifacts/vinyldns-api.jar /opt/vinyldns/; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FROM adoptopenjdk/openjdk11:jdk-11.0.8_10-alpine
|
FROM openjdk:11-slim
|
||||||
ARG DOCKER_FILE_PATH
|
ARG DOCKER_FILE_PATH
|
||||||
ARG VINYLDNS_VERSION
|
ARG VINYLDNS_VERSION
|
||||||
|
|
||||||
RUN test -n "VINYLDNS_VERSION" || (echo "VINYLDNS_VERSION not set" && false) && \
|
RUN test -n "VINYLDNS_VERSION" || (echo "VINYLDNS_VERSION not set" && false) && \
|
||||||
test -n "DOCKER_FILE_PATH" || (echo "DOCKER_FILE_PATH not set" && false) && \
|
test -n "DOCKER_FILE_PATH" || (echo "DOCKER_FILE_PATH not set" && false) && \
|
||||||
apk add --update --no-cache bash && \
|
|
||||||
mkdir -p /opt/vinyldns/lib_extra && \
|
mkdir -p /opt/vinyldns/lib_extra && \
|
||||||
echo "${VINYLDNS_VERSION}" > /opt/vinyldns/version
|
echo "${VINYLDNS_VERSION}" > /opt/vinyldns/version
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ endif
|
|||||||
|
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
|
|
||||||
.PHONY: all build run publish
|
.PHONY: all artifact build run publish build-vnext publish-vnext
|
||||||
|
|
||||||
all: build run
|
all: build run
|
||||||
|
|
||||||
@ -55,3 +55,13 @@ publish: build
|
|||||||
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):$(IMAGE_TAG)
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):$(IMAGE_TAG)
|
||||||
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):latest
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):latest
|
||||||
|
|
||||||
|
build-vnext:
|
||||||
|
@set -euo pipefail
|
||||||
|
cd ../../..
|
||||||
|
docker build $(BUILD_ARGS) --build-arg DOCKER_FILE_PATH="$$(realpath --relative-to="." "$(ROOT_DIR)")" --build-arg VINYLDNS_VERSION="vnext" -t $(IMAGE_NAME):vnext -f "$(ROOT_DIR)/Dockerfile" .
|
||||||
|
docker tag $(IMAGE_NAME):$(IMAGE_TAG) "$(IMAGE_NAME):vnext-$$(date -u +"%Y%m%d")"
|
||||||
|
|
||||||
|
publish-vnext: build-vnext
|
||||||
|
@set -euo pipefail
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):vnext
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker push "$(IMAGE_NAME):vnext-$$(date -u +"%Y%m%d")"
|
||||||
|
@ -20,13 +20,12 @@ RUN mkdir -p /opt/vinyldns/conf && \
|
|||||||
rm -rf /opt/vinyldns/vinyldns-portal*; \
|
rm -rf /opt/vinyldns/vinyldns-portal*; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FROM adoptopenjdk/openjdk11:jdk-11.0.8_10-alpine
|
FROM openjdk:11-slim
|
||||||
ARG DOCKER_FILE_PATH
|
ARG DOCKER_FILE_PATH
|
||||||
ARG VINYLDNS_VERSION
|
ARG VINYLDNS_VERSION
|
||||||
|
|
||||||
RUN test -n "VINYLDNS_VERSION" || (echo "VINYLDNS_VERSION not set" && false) && \
|
RUN test -n "VINYLDNS_VERSION" || (echo "VINYLDNS_VERSION not set" && false) && \
|
||||||
test -n "DOCKER_FILE_PATH" || (echo "DOCKER_FILE_PATH not set" && false) && \
|
test -n "DOCKER_FILE_PATH" || (echo "DOCKER_FILE_PATH not set" && false) && \
|
||||||
apk add --update --no-cache bash && \
|
|
||||||
mkdir -p /opt/vinyldns/lib_extra && \
|
mkdir -p /opt/vinyldns/lib_extra && \
|
||||||
echo "${VINYLDNS_VERSION}" > /opt/vinyldns/version
|
echo "${VINYLDNS_VERSION}" > /opt/vinyldns/version
|
||||||
|
|
||||||
|
@ -27,11 +27,7 @@ endif
|
|||||||
|
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
|
|
||||||
.PHONY: all build run
|
.PHONY: all artifact build run publish build-vnext publish-vnext
|
||||||
|
|
||||||
all: build run
|
|
||||||
|
|
||||||
.PHONY: all build run publish
|
|
||||||
|
|
||||||
all: build run
|
all: build run
|
||||||
|
|
||||||
@ -59,3 +55,13 @@ publish: build
|
|||||||
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):$(IMAGE_TAG)
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):$(IMAGE_TAG)
|
||||||
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):latest
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):latest
|
||||||
|
|
||||||
|
build-vnext:
|
||||||
|
@set -euo pipefail
|
||||||
|
cd ../../..
|
||||||
|
docker build $(BUILD_ARGS) --build-arg DOCKER_FILE_PATH="$$(realpath --relative-to="." "$(ROOT_DIR)")" --build-arg VINYLDNS_VERSION="vnext" -t $(IMAGE_NAME):vnext -f "$(ROOT_DIR)/Dockerfile" .
|
||||||
|
docker tag $(IMAGE_NAME):$(IMAGE_TAG) "$(IMAGE_NAME):vnext-$$(date -u +'%Y%m%d')"
|
||||||
|
|
||||||
|
publish-vnext: build-vnext
|
||||||
|
@set -euo pipefail
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker push $(IMAGE_NAME):vnext
|
||||||
|
DOCKER_CONTENT_TRUST=1 docker push "$(IMAGE_NAME):vnext-$$(date -u +'%Y%m%d')"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"grunt-mocha-phantomjs": "^3.0.0",
|
"grunt-mocha-phantomjs": "^3.0.0",
|
||||||
"jasmine-core": "^2.99.1",
|
"jasmine-core": "^2.99.1",
|
||||||
"jasmine-jquery": "2.1.1",
|
"jasmine-jquery": "2.1.1",
|
||||||
"jquery": "^2.2.4",
|
"jquery": "^3.5.1",
|
||||||
"karma": "^2.0.5",
|
"karma": "^2.0.5",
|
||||||
"karma-chrome-launcher": "^2.2.0",
|
"karma-chrome-launcher": "^2.2.0",
|
||||||
"karma-jasmine": "^1.0.2",
|
"karma-jasmine": "^1.0.2",
|
||||||
|
@ -26,6 +26,6 @@ addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
|
|||||||
|
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-license-report" % "1.2.0")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-license-report" % "1.2.0")
|
||||||
|
|
||||||
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
|
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.4")
|
||||||
|
|
||||||
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24" )
|
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "3.5"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@ -31,13 +31,14 @@ services:
|
|||||||
# The VinylDNS API
|
# The VinylDNS API
|
||||||
api:
|
api:
|
||||||
container_name: "vinyldns-api"
|
container_name: "vinyldns-api"
|
||||||
|
oom_kill_disable: true
|
||||||
image: "vinyldns/api:${VINYLDNS_IMAGE_VERSION}"
|
image: "vinyldns/api:${VINYLDNS_IMAGE_VERSION}"
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
dockerfile: build/docker/api/Dockerfile
|
dockerfile: build/docker/api/Dockerfile
|
||||||
args:
|
args:
|
||||||
VINYLDNS_VERSION: "${VINYLDNS_IMAGE_VERSION}"
|
VINYLDNS_VERSION: "${VINYLDNS_IMAGE_VERSION}"
|
||||||
DOCKER_FILE_PATH: "../build/docker/api"
|
DOCKER_FILE_PATH: "build/docker/api"
|
||||||
volumes:
|
volumes:
|
||||||
- ../build/docker/api/application.conf:/opt/vinyldns/conf/application.conf
|
- ../build/docker/api/application.conf:/opt/vinyldns/conf/application.conf
|
||||||
env_file:
|
env_file:
|
||||||
@ -50,12 +51,13 @@ services:
|
|||||||
# The VinylDNS portal
|
# The VinylDNS portal
|
||||||
portal:
|
portal:
|
||||||
container_name: "vinyldns-portal"
|
container_name: "vinyldns-portal"
|
||||||
|
oom_kill_disable: true
|
||||||
image: "vinyldns/portal:${VINYLDNS_IMAGE_VERSION}"
|
image: "vinyldns/portal:${VINYLDNS_IMAGE_VERSION}"
|
||||||
build:
|
build:
|
||||||
context: ../
|
context: ../
|
||||||
dockerfile: build/docker/portal/Dockerfile
|
dockerfile: build/docker/portal/Dockerfile
|
||||||
args:
|
args:
|
||||||
DOCKER_FILE_PATH: "../build/docker/portal"
|
DOCKER_FILE_PATH: "build/docker/portal"
|
||||||
VINYLDNS_VERSION: "${VINYLDNS_IMAGE_VERSION}"
|
VINYLDNS_VERSION: "${VINYLDNS_IMAGE_VERSION}"
|
||||||
env_file:
|
env_file:
|
||||||
.env
|
.env
|
||||||
|
@ -11,7 +11,7 @@ WORKDIR /build
|
|||||||
ARG SKIP_API_BUILD="false"
|
ARG SKIP_API_BUILD="false"
|
||||||
RUN if [ -f artifacts/vinyldns-api.jar ]; then cp artifacts/vinyldns-api.jar /opt/vinyldns; fi && \
|
RUN if [ -f artifacts/vinyldns-api.jar ]; then cp artifacts/vinyldns-api.jar /opt/vinyldns; fi && \
|
||||||
if [ ! -f /opt/vinyldns/vinyldns-api.jar ] && [ "$SKIP_API_BUILD" == "false" ]; then \
|
if [ ! -f /opt/vinyldns/vinyldns-api.jar ] && [ "$SKIP_API_BUILD" == "false" ]; then \
|
||||||
env SBT_OPTS="-XX:+UseConcMarkSweepGC -Xmx4G -Xms1G" \
|
env SBT_OPTS="-Xmx2G -Xms512M -Xss2M -XX:MaxMetaspaceSize=2G" \
|
||||||
sbt -Dbuild.scalafmtOnCompile=false -Dbuild.lintOnCompile=fase ";project api;coverageOff;assembly" \
|
sbt -Dbuild.scalafmtOnCompile=false -Dbuild.lintOnCompile=fase ";project api;coverageOff;assembly" \
|
||||||
&& cp artifacts/vinyldns-api.jar /opt/vinyldns/; \
|
&& cp artifacts/vinyldns-api.jar /opt/vinyldns/; \
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user