-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2719: Wrap image creation with make (#17)
Co-authored-by: pmacius <[email protected]>
- Loading branch information
Showing
7 changed files
with
186 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,18 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'Makefile' | ||
- '.github/workflows/test-make.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'Makefile' | ||
- '.github/workflows/test-make.yml' | ||
|
||
env: | ||
ACS_CHART_VERSION: 8.3.0 | ||
ACS_VALUES_VERSION: cfb0d426eff14a8b581c31e61db5e670da09ba3b | ||
ACS_CHART_VERSION: 172410cfb4ad44d4839d9aefd31b4bcefc44f316 | ||
ARTIFACT_NAME: alfresco-docker-images | ||
|
||
concurrency: | ||
|
@@ -47,7 +52,7 @@ jobs: | |
echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc | ||
- name: Fetch artifacts from nexus | ||
run: ./scripts/fetch-artifact.sh | ||
run: ./scripts/fetch-artifacts.sh | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | ||
|
@@ -119,6 +124,7 @@ jobs: | |
|
||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
|
||
|
||
helm-test: | ||
name: helm test | ||
needs: build-test | ||
|
@@ -160,25 +166,30 @@ jobs: | |
--from-file=.dockerconfigjson=$HOME/.docker/config.json | ||
--type=kubernetes.io/dockerconfigjson | ||
- name: Fetch upstream values for tests | ||
run: >- | ||
curl -ssfL | ||
https://raw.githubusercontent.com/Alfresco/acs-deployment/${{ env.ACS_VALUES_VERSION }}/test/enterprise-integration-test-values.yaml | ||
-o test/helm/enterprise-integration-test-values.yaml && | ||
ls -l test/helm/enterprise-integration-test-values.yaml && | ||
cat test/helm/enterprise-integration-test-values.yaml | ||
- name: Checkout acs-deployment sources | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Alfresco/acs-deployment | ||
ref: ${{ env.ACS_CHART_VERSION }} | ||
path: github-source | ||
|
||
- name: Setup helm repository | ||
working-directory: github-source/helm/alfresco-content-services | ||
run: | | ||
helm repo add self https://alfresco.github.io/alfresco-helm-charts/ | ||
helm repo add activiti https://activiti.github.io/activiti-cloud-helm-charts | ||
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami/ | ||
helm repo add elastic https://helm.elastic.co | ||
helm dependency build | ||
- name: Helm install | ||
id: helm_install | ||
run: | | ||
helm repo add alfresco https://kubernetes-charts.alfresco.com/stable | ||
helm repo update | ||
helm install acs alfresco/alfresco-content-services \ | ||
--version ${{ env.ACS_CHART_VERSION }} \ | ||
helm install acs ./github-source/helm/alfresco-content-services \ | ||
--set global.search.sharedSecret="$(openssl rand -hex 24)" \ | ||
--set global.known_urls=http://localhost \ | ||
--set global.alfrescoRegistryPullSecrets=regcred \ | ||
--values test/helm/enterprise-integration-test-values.yaml \ | ||
--values ./github-source/test/enterprise-integration-test-values.yaml \ | ||
--values test/helm/test-overrides.yaml | ||
- name: Watch Helm deployment | ||
|
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,50 @@ | ||
name: Test building using the make wrapper | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'Makefile' | ||
- '.github/workflows/test-make.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'Makefile' | ||
- '.github/workflows/test-make.yml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
make-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
|
||
- name: Setup nexus authentication | ||
run: | | ||
echo "machine nexus.alfresco.com" >> ~/.netrc | ||
echo "login ${{ secrets.NEXUS_USERNAME }}" >> ~/.netrc | ||
echo "password ${{ secrets.NEXUS_PASSWORD }}" >> ~/.netrc | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Make Docker images | ||
id: make | ||
run: | | ||
make all_ci | ||
- name: Check Images are loaded | ||
run: | | ||
echo -n "Checking images are loaded in local Docker Engine..." | ||
docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco || { echo "No Alfresco image found"; exit 1; } |
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,8 +1,9 @@ | ||
*.zip | ||
*.amp | ||
dist | ||
*.jar | ||
*.rpm | ||
*.deb | ||
*.jar | ||
*.tgz | ||
*.gz | ||
*.tgz | ||
|
||
|
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,54 @@ | ||
clean: | ||
@echo "Cleaning up Artifacts" | ||
@find . \( -name "*.jar" -o -name "*.zip" -o -name "*.gz" -o -name "*.tgz" -o -name "*.rpm" -o -name "*.deb" \) -type f -delete | ||
|
||
prepare_repo: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts for repository target" | ||
@./scripts/fetch-artifacts.sh repository | ||
|
||
prepare_tengines: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts for tengines targets" | ||
@./scripts/fetch-artifacts.sh tengine | ||
|
||
prepare_ats: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts for ats targets" | ||
@./scripts/fetch-artifacts.sh ats | ||
|
||
prepare_search_enterprise: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts for Search Enterprise targets" | ||
@./scripts/fetch-artifacts.sh search/enterprise | ||
|
||
prepare_connectors: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts for Connectors targets" | ||
@./scripts/fetch-artifacts.sh connector | ||
|
||
prepare_all: scripts/fetch-artifacts.sh | ||
@echo "Fetching all artifacts" | ||
@./scripts/fetch-artifacts.sh | ||
|
||
repo: prepare_repo | ||
@echo "Building repository image" | ||
@docker buildx bake --no-cache --progress=plain repository | ||
|
||
tengines: prepare_tengines | ||
@echo "Building Transform Egnine images" | ||
@docker buildx bake --no-cache --progress=plain tengines | ||
|
||
ats: prepare_ats prepare_tengines | ||
@echo "Building Transform Service images" | ||
@docker buildx bake --no-cache --progress=plain ats tengines | ||
|
||
search_enterprise: prepare_search_enterprise | ||
@echo "Building Search Enterprise images" | ||
@docker buildx bake --no-cache --progress=plain enterprise-search | ||
|
||
connectors: prepare_connectors | ||
@echo "Building Connectors images" | ||
@docker buildx bake --no-cache --progress=plain connectors | ||
|
||
all: docker-bake.hcl prepare_all | ||
@echo "Building all images" | ||
@docker buildx bake --no-cache --progress=plain | ||
|
||
all_ci: repo tengines ats search_enterprise clean connectors | ||
@echo "Building all images using individual targets for Continuous Integration" |
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,39 @@ | ||
# Alfresco Docker images builder | ||
|
||
This projects aims at providing a quick and easy to build and maintain Alfresco | ||
Docker images. | ||
|
||
## Getting started quickly | ||
|
||
If you do not plan on applying specific customizations but just want to get | ||
Alfresco images updated (e.g. with the latest OS security patches), you can | ||
simply run the command below from the root of this project: | ||
|
||
```bash | ||
make all | ||
``` | ||
|
||
This command will build locally all the docjker images this project offers. | ||
At the time of writing, these are: | ||
|
||
* Alfresco Content Repository (Enterprise) 23.2.2 | ||
* Alfresco Search Enterprise 4.4.0 | ||
* Alfresco Transformation Services 4.1.3 | ||
|
||
## Building the specific images | ||
|
||
If you want to build a specific image, you can run one of the following make target: | ||
|
||
* repo: build the Alfresco Content Repository image | ||
* search_enterprise: build the Alfresco Search Enterprise images | ||
* ats: build the Alfresco Transformation Service images | ||
|
||
## Customizing the images | ||
|
||
### Customizing the Alfresco Content Repository image | ||
|
||
The Alfresco Content Repository image can be customized by adding different | ||
types of files in the right locations: | ||
|
||
* Alfresco Module Packages (AMPs) files in the [amps}(repository/amps/README.md) folder | ||
* Additional JAR files for the JRE in the [libs](repository/libs/README.md) folder |
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