我正在尝试运行一个管道,其中 terraform 代码将在 AWS 上启动几个实例,然后 cp-ansible 脚本将在这些实例上启动 confluent kafka .....但是每次运行 gitlab 管道后都会出现此错误
INFO] Building archetype jar: /builds/psyncopate/psyncopate-cp-ansible-terraform-aws/target/cp-ansible-terraform-aws-1.0.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.183 s
[INFO] Finished at: 2021-05-30T17:47:05+00:00
[INFO] Final Memory: 18M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:jar (default-jar) on project cp-ansible-terraform-aws: Execution default-jar of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:jar failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
这是我的 .gitlab-ci.yaml
# This template uses jdk8 for verifying and deploying images
image: maven:3.3.9-jdk-8
variables:
MAVEN_CLI_OPTS: "-DskipMunitTests -U clean package"
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
paths:
- .m2/repository/
- target/
# To deploy packages from CI, create a ci_settings.xml file
# For deploying packages to GitLab's Maven Repository: See https://docs.gitlab.com/ee/user/project/packages/maven_repository.html#creating-maven-packages-with-gitlab-cicd for more details.
# Please note: The GitLab Maven Repository is currently only available in GitLab Premium / Ultimate.
# For `master` branch run `mvn deploy` automatically.
deploy:jdk8:
stage: build
script:
- if [ ! -f ci_settings.xml ];
then echo "CI settings missing\! If deploying to GitLab Maven Repository, please see https://docs.gitlab.com/ee/user/project/packages/maven_repository.html#creating-maven-packages-with-gitlab-cicd for instructions.";
fi
- mvn clean package deploy -s ci_settings.xml
only:
- master
这是我的 ci-settings.xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
谁能帮我解决问题?