Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBT upgrade build parameter ignore attribute #1050

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1759aa7
modified: internal/archive/fsops.go
May 15, 2023
a02ba4d
modified: internal/archive/fsops.go
May 18, 2023
e55f8a7
modified: internal/archive/fsops.go
May 18, 2023
449c51a
modified: cmd/testdata/mta/mta.yaml
May 19, 2023
f41f873
modified: micromatch/micromatch-wrapper.js
May 19, 2023
62b41a8
modified: internal/archive/fsops.go
May 19, 2023
5ac069a
modified: cmd/testdata/mta/mta.yaml
May 25, 2023
149060d
modified: internal/archive/fsops.go
May 26, 2023
612167d
modified: internal/archive/fsops_test.go
May 29, 2023
cff81bc
modified: internal/archive/fsops.go
May 29, 2023
5ce5b74
new file: cmd/build_parameter_test.go
May 30, 2023
4a1ac67
new file: cmd/testdata/mtaignore/mta-ignore-all-node_modules.yaml
May 30, 2023
24bb1ae
modified: Makefile
Jun 1, 2023
b125c84
modified: cmd/testdata/mta/mta.yaml
Jun 2, 2023
9c98d39
modified: .circleci/config.yml
Jun 8, 2023
bba9ea4
modified: Makefile
Jun 20, 2023
2bda78a
modified: cmd/build_parameter_test.go
Jun 20, 2023
245dd37
modified: Makefile
Jun 27, 2023
34981d4
modified: cmd/build_parameter_test.go
Jun 27, 2023
a2c7e80
modified: .circleci/config.yml
Jun 27, 2023
f673bf8
modified: cmd/build_parameter_test.go
Jun 27, 2023
db29514
modified: cmd/build_parameter_test.go
Jun 27, 2023
9703e2e
modified: cmd/build_parameter_test.go
Jun 27, 2023
7a19401
modified: .circleci/config.yml
Jun 27, 2023
7657366
modified: cmd/build_parameter_test.go
Jun 27, 2023
29f92f3
modified: .circleci/config.yml
Jun 28, 2023
5d998d5
modified: Dockerfile_mbtci_template
Jun 29, 2023
7015efe
modified: .circleci/config.yml
Jun 29, 2023
6e6526a
modified: internal/commands/builder_type_cfg.go
Jun 29, 2023
31a68ad
modified: docs/docs/configuration.md
Jul 3, 2023
b138d3c
modified: docs/docs/configuration.md
Jul 3, 2023
4b568e5
modified: docs/docs/micromatch-wrapper.md
Jul 4, 2023
9e52246
modified: Dockerfile_mbtci_template
Jul 4, 2023
5e44988
modified: cmd/testdata/mta/mta.yaml
Jul 5, 2023
4897150
modified: docs/docs/configuration.md
Jul 10, 2023
3a896b3
modified: cmd/build_parameter_test.go
Jul 13, 2023
71f4d6e
modified: cmd/testdata/mtaignore/mta-ignore-all-invisible-dir-and-…
Jul 13, 2023
2bd540d
modified: micromatch/test-micromatch.js
Jul 14, 2023
4297ce7
modified: docs/docs/configuration.md
Jul 17, 2023
f3c1f60
modified: docs/docs/configuration.md
Jul 17, 2023
d978026
modified: docs/docs/configuration.md
Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 93 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

build:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
environment:
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
Expand All @@ -23,8 +23,38 @@ jobs:
name: install dependencies
command: |
go mod vendor
- run: go test -v ./...
- run: sudo chown circleci:circleci $GOPATH/bin
- run:
name: install node16 npm and npx
command: |
sudo apt-get update
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs
echo "node version:"
node --version
echo "npm version:"
npm --version
echo "npx version:"
npx --version
- run:
name: install micromatch wrapper
command: |
MICROMATCH_WRAPPER_DIR=micromatch
MICROMATCH_WRAPPER_BINARY_NAME=micromatch-wrapper
MICROMATCH_WRAPPER_OS=Linux
chmod ug+rwx ${MICROMATCH_WRAPPER_DIR}/${MICROMATCH_WRAPPER_OS}/${MICROMATCH_WRAPPER_BINARY_NAME}
cp ${MICROMATCH_WRAPPER_DIR}/${MICROMATCH_WRAPPER_OS}/${MICROMATCH_WRAPPER_BINARY_NAME} ${GOPATH}/bin/${MICROMATCH_WRAPPER_BINARY_NAME}
echo "${MICROMATCH_WRAPPER_BINARY_NAME} help:"
${MICROMATCH_WRAPPER_BINARY_NAME} --help
- run:
name: build mbt binary
command: |
BINARY_NAME=mbt
BUILD_DIR=release
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${BUILD_DIR}/${BINARY_NAME} -v
chmod ug+rwx ${BUILD_DIR}/${BINARY_NAME}
cp ${BUILD_DIR}/${BINARY_NAME} ${GOPATH}/bin/${BINARY_NAME}
${BINARY_NAME} --version
- run: sudo chown circleci:circleci ${GOPATH}/bin
- run: make tools
- run: make lint
- run:
Expand Down Expand Up @@ -80,7 +110,7 @@ jobs:

release-to-github:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- add_ssh_keys:
Expand All @@ -91,6 +121,12 @@ jobs:
name: install dependencies
command: |
go mod vendor
- run:
name: install goreleaser
command: |
go install github.com/goreleaser/[email protected]
echo "goreleaser --version:"
goreleaser --version
- run:
name: bump version
command: |
Expand Down Expand Up @@ -137,11 +173,12 @@ jobs:
#Make sure HEAD points to master
git checkout master
export GITHUB_TOKEN=${CLOUD_MTA_BOT_GITHUB_TOKEN}
curl -sfL https://goreleaser.com/static/run | bash
goreleaser release
#curl -sfL https://goreleaser.com/static/run | bash

publish-to-dockerhub-java8-node14:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -155,25 +192,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 8.1.091 & Node 14.21.1 image
name: build Java 8.1.094 & Node 14.21.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 8.1.091 14.21.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 8.1.094 14.21.1 ${MBT_VERSION}
- run:
name: publish Java 8.1.091 & Node 14.21.1 image
name: publish Java 8.1.094 & Node 14.21.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 14.21.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 8.1.094 14.21.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 14.21.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 8.1.094 14.21.1 ${MBT_VERSION} "ghcr.io/sap"

publish-to-dockerhub-java8-node16:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -187,25 +224,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 8.1.091 & Node 16.18.1 image
name: build Java 8.1.094 & Node 16.18.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 8.1.091 16.18.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 8.1.094 16.18.1 ${MBT_VERSION}
- run:
name: publish Java 8.1.091 & Node 16.18.1 image
name: publish Java 8.1.094 & Node 16.18.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 16.18.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 8.1.094 16.18.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 16.18.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 8.1.094 16.18.1 ${MBT_VERSION} "ghcr.io/sap"

publish-to-dockerhub-java8-node18:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -219,25 +256,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 8.1.091 & Node 18.12.1 image
name: build Java 8.1.094 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 8.1.091 18.12.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 8.1.094 18.16.1 ${MBT_VERSION}
- run:
name: publish Java 8.1.091 & Node 18.12.1 image
name: publish Java 8.1.094 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 18.12.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 8.1.094 18.16.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 8.1.091 18.12.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 8.1.094 18.16.1 ${MBT_VERSION} "ghcr.io/sap"

publish-to-dockerhub-java11-node14:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -269,7 +306,7 @@ jobs:

publish-to-dockerhub-java11-node16:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -301,7 +338,7 @@ jobs:

publish-to-dockerhub-java11-node18:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -315,25 +352,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 11.0.17 & Node 18.12.1 image
name: build Java 11.0.17 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 11.0.17 18.12.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 11.0.17 18.16.1 ${MBT_VERSION}
- run:
name: publish Java 11.0.17 & Node 18.12.1 image
name: publish Java 11.0.17 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 11.0.17 18.12.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 11.0.17 18.16.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 11.0.17 18.12.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 11.0.17 18.16.1 ${MBT_VERSION} "ghcr.io/sap"

publish-to-dockerhub-java17-node14:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -365,7 +402,7 @@ jobs:

publish-to-dockerhub-java17-node16:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -397,7 +434,7 @@ jobs:

publish-to-dockerhub-java17-node18:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -411,25 +448,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 17.0.5 & Node 18.12.1 image
name: build Java 17.0.5 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 17.0.5 18.12.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 17.0.5 18.16.1 ${MBT_VERSION}
- run:
name: publish Java 17.0.5 & Node 18.12.1 image
name: publish Java 17.0.5 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 17.0.5 18.12.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 17.0.5 18.16.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 17.0.5 18.12.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 17.0.5 18.16.1 ${MBT_VERSION} "ghcr.io/sap"

publish-to-dockerhub-java19-node14:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -461,7 +498,7 @@ jobs:

publish-to-dockerhub-java19-node16:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -493,7 +530,7 @@ jobs:

publish-to-dockerhub-java19-node18:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand All @@ -507,25 +544,25 @@ jobs:
git fetch
git rebase
- run:
name: build Java 19.0.1 & Node 18.12.1 image
name: build Java 19.0.1 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
sh $PWD/scripts/build_image 19.0.1 18.12.1 ${MBT_VERSION}
sh $PWD/scripts/build_image 19.0.1 18.16.1 ${MBT_VERSION}
- run:
name: publish Java 19.0.1 & Node 18.12.1 image
name: publish Java 19.0.1 & Node 18.16.1 image
command: |
MBT_VERSION=$(cat ./VERSION)
echo "Image release: ${MBT_VERSION}"
#Push to Docker Hub
echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_USER --password-stdin
sh $PWD/scripts/publish_image 19.0.1 18.12.1 ${MBT_VERSION} "devxci"
sh $PWD/scripts/publish_image 19.0.1 18.16.1 ${MBT_VERSION} "devxci"
#Push to GitHub Container Registry
echo "$CLOUD_MTA_BOT_GITHUB_TOKEN" | docker login "ghcr.io" --username $CLOUD_MTA_BOT_USER --password-stdin
sh $PWD/scripts/publish_image 19.0.1 18.12.1 ${MBT_VERSION} "ghcr.io/sap"
sh $PWD/scripts/publish_image 19.0.1 18.16.1 ${MBT_VERSION} "ghcr.io/sap"

remove-github-release-tag:
docker:
- image: cimg/go:1.17
- image: cimg/go:1.19
working_directory: ~/go/src/github.com/SAP/cloud-mta-build-tool
steps:
- checkout
Expand Down Expand Up @@ -571,10 +608,10 @@ workflows:
filters:
branches:
ignore: master
- build-node:
filters:
branches:
ignore: master
# - build-node:
# filters:
# branches:
# ignore: master
- compliance:
filters:
branches:
Expand All @@ -593,10 +630,10 @@ workflows:
filters:
branches:
only: master
- build-node:
filters:
branches:
only: master
# - build-node:
# filters:
# branches:
# only: master
- compliance:
filters:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ archives:
- README*
- changelog*
- CHANGELOG*
- src: 'micromatch/{{ .Os }}/*'
dst: ./
strip_parent: true
dist: dist
checksum:
name_template: 'checksums.txt'
Expand Down
Loading