-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from napalm-automation/code-refresh
Code refresh: drop Python 3.6 (and earlier support) and ZMQ 2
- Loading branch information
Showing
56 changed files
with
1,922 additions
and
1,928 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
on: | ||
push: | ||
tags: | ||
- '.*' | ||
workflow_run: | ||
workflows: ["Test code"] | ||
branches: [master, develop] | ||
types: | ||
- completed | ||
|
||
name: Docker Build | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check Out Repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Extract tag name | ||
id: extract_tag_name | ||
shell: bash | ||
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF##*/})" | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: ./Dockerfile | ||
push: true | ||
tags: napalmautomation/napalm-logs:${{ steps.extract_tag_name.outputs.tag }} | ||
|
||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
FROM python:3.6-alpine | ||
FROM python:3.9-slim-buster | ||
|
||
COPY docker/config.txt /etc/napalm/logs | ||
COPY ./ /var/cache/napalm-logs/ | ||
|
||
# Install napalm-logs and pre-requisites | ||
RUN apk add --no-cache \ | ||
libffi \ | ||
libffi-dev \ | ||
python3-dev \ | ||
build-base \ | ||
&& pip --no-cache-dir install cffi pyzmq==19.0.2 /var/cache/napalm-logs/ \ | ||
&& rm -rf /var/cache/napalm-logs/ | ||
|
||
CMD napalm-logs --config-file /etc/napalm/logs | ||
RUN apt-get update \ | ||
&& apt-get install -y dumb-init python3-dev python3-cffi libffi-dev \ | ||
&& pip --no-cache-dir install -U pip \ | ||
&& pip --no-cache-dir install /var/cache/napalm-logs/ \ | ||
&& rm -rf /var/cache/napalm-logs/ | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
|
||
CMD ["napalm-logs", "--config-file", "/etc/napalm/logs"] |
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
Oops, something went wrong.